Our team is experienced working on Winforms and ASP.net projects.
As what other programmers in programmers stack exchange recommend me to jump to WPF for our team next projects instead of using WinForms for our Client based business Applications.
Now i am starting to Develop my first project using WPF, its a little bit tricky for me as its my first attempt to use this.
Can you gave much deeper information why we need to jump to WPF instead of using winforms?
I need to convinced our manager that we can dig on WPF for our client based projects.
We are using VS 2008.
Pick up a good MVVM Framework. I personally use Microsoft Prism. For other alternatives, look at this StackOverflow question.
Routed Events are for the view only. For example, if you want to scroll to the end of a multiline textbox when the text changes.
Commands are used to bind events in which the logic resides on the view-model (business logic)… For example, a submit button.
If you have designers on your team, get them to start playing around with Expression Blend and understanding styles/layout. Expression Blend allows you to use sample data to see your applications layout without having to run it all the time.
Understand The difference between
ContentControlandContentPresenter.Understand how
ItemsControls work. There is a difference betweenSelectedItem,SelectedValue, andSelectedValuePath.Look at a lot of exmaples online. Dr. Wpf, WPFTutorial.net, Josh Smith on WPF, etc.
If you plan to take advantage of Code UI Testing (to test the actual User Interface), then make sure to name controls that matter (most MVVM tutorials tell you that you shouldn’t have to name any controls). If you don’t plan on doing Coded UI Testing, then don’t name your controls unless you need to reference them from the view itself.
IValueConverterandIMultiValueConvertershould only be used to convert properties to view-related items. The most commonly used converter is theBooleanToVisiblityconverter.TargetNullValue,FallbackValue, andStringFormatare important when using binding. Don’t make assumptions that the data being bound will always be available and correct.You will almost always expose
ObservableCollection<T>orReadOnlyObservableCollection<T>from your view-models. Very rarely will you ever return any other type of collection, including anIEnumerable<T>.Be careful in choosing your
BindingMode:OneWay,OneTime,TwoWay,OneWayToSource(WARNING: OneWayToSource is tricky… it still requires a getter because it is not a write-only binding).A good debugging tool that is free is Snoop. It is similar to a DOM explorer for a running WPF application. A more advanced (and not free) tool that is a bit more powerful is Mole.
That’s all I can think of for now… Oh, and if you run into road blocks, StackOverflow is your friend 🙂