Mvvm + behaviors

2,089 views
2,029 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,089
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mvvm + behaviors

  1. 1. MVVM + BEHAVIORS Better Silverlight Programing
  2. 2. MVVM Pattern ICommand PropertyChanged
  3. 3. What is Behavior  A Behavior is in essence a reusable piece of interactivity that can be applied directly to user interface elements  With Behavior, we can do interaction with out code  Behavior is reusable library, and can be shared
  4. 4. Behaviors in Silverlight
  5. 5. Behavior DEMO
  6. 6. Behavior DEMO
  7. 7. GDEIC.AppFx.ViewModel  ViewModelBase  Implements INorifyPropertyChanged  IsBusy Property  CanInvokeCommand Property  ShowError virtual method can be overrided  CommandBase  Basic implementation of ICommand  ViewModelCommand  Use withViewModel base
  8. 8. GDEIC.AppFx.ViewModel  BufferedEventTrigger  Buffer interaction event  Filter PropertyChanged with propertyName  Invoke ActionWith Dispatcher
  9. 9. Real Application Demo
  10. 10. Real Application Demo Controller Interface is a contract between Server and Client
  11. 11. Real Application Demo Client sideViewModel with Command
  12. 12. Real Application Demo Command Implementation Details
  13. 13. Real Application Demo Final XamlView, no code needed
  14. 14. MVVM + Behaviors Conclusion  View is completedly separate with Code  For Designers, Behavior is easy to use  Behavior is optimize for Blend, with blend, behaviors can be added to elements with drag and drop

×