DCSIMG
ENG - אלעד כץ | Elad Katz
Sign in | Join | Help

אלעד כץ | Elad Katz

לגו של גדולים

Browse by Tags

What is the easiest way to set spacing between items in StackPanel?
29 May 11 11:11 PM | eladkatz | 5 comment(s)
What is the easiest way to set spacing between items in StackPanel or any other Panel? Seems like an easy question, but most of the time it requires just too much xaml work. If we’re just putting items of the same type, we can use “anonymous” styles, like so: 1: <StackPanel> 2: <StackPanel.Resources> 3: <Style TargetType= "Button" > 4: <Setter Property= "Margin" Value= "5" /> 5: </Style> 6: </StackPanel.Resources> 7: <Button Content...
Faking Forms Authentication in Silverlight
15 February 11 12:14 AM | eladkatz | with no comments
In a website that implements Forms Authentication Silverlight fits in very easily – Forms Authentication leaves a cookie on the client – and Silverlight just picks it off if you’re using the Browser Stack (which you normally would). In other words – It simply works. However, many times you would like to do the authentication yourself – that is – to fake an HTTP Post so that you can authenticate to a server without having the user actually fill the form and submit it – you’d like to do it programmatically...
תגים:, ,
MVVM: How to show a dialog box from the ViewModel using Behaviors
06 February 11 07:19 PM | eladkatz | 19 comment(s)
Behaviors seems like the killer feature for every possible problem we used to have with MVVM. Thank god for WPF4 Showing a Message Box is one of those navigational problems that comes with MVVM. It’s something that we want the ViewModel to control, but yet we don’t want the ViewModel to contain any hard reference to the View. My solution uses the Messenger class from MVVMLight toolkit, but can easily be adjusted to use Prism’s EventAggregator. Lauren Bugnion suggested a solution a while ago which...
תגים:, , ,
fix: SatisfyImports not working correctly in Prism over MEF
04 February 11 04:18 PM | eladkatz | 1 comment(s)
I’m working on a Silverlight project under Prism/MEF, and that’s the first time I’m using MEF and not Unity in Prism. Resolving dependencies works a bit differently with MEF, and so when I tried to resolve IRegionManager in a ViewModel class my first instinct was to do the following: 1: [Import] 2: public IRegionManager regionManager; 3:   4: public ViewModelConstructor() 5: { 6: CompositionInitializer.SatisfyImports( this ); 7: } I’m creating my view models using the ViewModelLocator pattern...
Mef or Unity?
25 January 11 02:45 AM | eladkatz | 1 comment(s)
  MEF or Unity? Recently I started developing a new Silverlight LOB project which required the assistance of Prism (now that it reached v4 and actually works fairly ok with MVVM I’m using it more often). Prism now supports both Unity and MEF, and very actively refuses to take sides.. MEF and Unity are similar in many ways, and many people like to think of MEF as yet another IOC Container. Although this line of thought helps us to see the big-picture, it is a bit wrong; MEF is targeted mainly...
Adapting Silverlight Navigation to MVVM
25 January 11 01:54 AM | eladkatz | 6 comment(s)
  Adapting Silverlight Navigation to MVVM The Navigation feature in Silverlight is pretty awesome. It adds support for two very critical issues: 1. Real web-compliancy (Browser Address changes, which adds support for: SEO, Deep Linking, Browser Journal) 2. View-Switching navigation (switching views easily to solve the ever-lasting navigation problem) It’s important to notice that these two issues are actually completely different problems, which for some reason were bundled together! Many times...
.Net User Group lecture–MVVM & Blendability
18 November 10 01:36 AM | eladkatz | 1 comment(s)
Thanks for everyone that have participated in my MVVM lecture in the .Net User Group yesterday at Microsoft – I really had fun, and was a pleasure to meet so many smart & interesting people The code that I showed during the presentation, and the presentation itself can be downloaded from my SkyDrive . Thanks again for Jackie Goldstein and Microsoft for organizing the event – I’m looking forward for the next time!
Freezable objects–It’s about thread safety! Parallel computing built in.
18 November 10 12:26 AM | eladkatz | 1 comment(s)
I just read Tomer Shamam’s post about Christian Mosers’ post about WPF Performace. Both posts are excellent, and Tomer pointed out something I never knew.. thanks Tomer! Adding my two cents to the issue at hand - Christian is saying that you should freeze Freezable objects (such as Brush, Pen, Geometry etc.) because it helps performance. Which is both very true and oh-so-very-important! (Please make sure that you do it.. it really is important) However, he continues to say that it’s important to...
UI testing for Silverlight!
17 November 10 11:39 PM | eladkatz | 2 comment(s)
Finally it’s here! Earlier this week Feature Pack 2 was released. Also known as Testing Feature Pack (hint: it’s mostly about Testing.. ) Finally – we can actually do UI testing with Silverlight apps – the one thing that always made me feel quizzy when working with Silverlight – not being able to do real testing on EVERYTHING is finally over! We can now record our user behavior and test it like it was supposed to be all along.. and now I can look in the eyes of web developers that are used to CodedUI...