Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public partial class CustomView : UserControl, IViewFor<CustomViewModel>
  2. {
  3. public CustomViewModel ViewModel { get; set; }
  4. object IViewFor.ViewModel {
  5. get { return ViewModel; }
  6. set { ViewModel = value as CustomViewModel; }
  7. }
  8.  
  9. public BridgeGeometryView()
  10. {
  11. InitializeComponent();
  12.  
  13. this.Bind(ViewModel, x => x.SomeBindingList, x => x.DataGridBindingSource.DataSource);
  14. }
  15. }
  16.  
  17. customView.ViewModel = new CustomViewModel(model)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement