I have the following condition:
- I only have user controls with a single grid Is inside
- grid's first column is bound to the list of Aitmssors a checkbox as the column, which is connected to IsSelected property customer model
- Grid & lt; CustomerModel & gt;
- When the user checks any of the corresponding IsSelected property of CustomerModel is being updated
question:
- < P> I've added a dependency property to UserControl called "SelectCustomerItems", and I want to return it to a list & lt; CustomerModel & gt;
-
This UserControl is placed on a window
- dependency property "SelectedCustomerItems" is to "SelectedCustomers (only IsSelected to = For true) "Property inside WindowViewModel
But I am not getting the selected client item through this dependency property. Apply your DP to:
#region SomeProperty /// & lt; Summary & gt; ///; & Lt; See cref = "DependencyProperty" /> & Lt; Cref = "SomeProperty" /> See. /// & lt; / Summary & gt; Public static only DependencyProperty SomePropertyProperty = DependencyProperty.Register (SomePropertyPropertyName, typeof (object), typeof (SomeType), // other kinds of reading may be appropriate (minus its situ new FrameworkPropertyMetadata, OnSomePropertyPropertyChanged)); /// & lt; Summary & gt; The value of /// when & lt; Cref = "SomePropertyProperty" /> & Lt ;; Cref = "SomeType" /> Changes on given example /// & lt; / Summary & gt; /// & lt; Param name = "d" & gt; Example on which property changed & Lt; / Param & gt; /// & lt; Ultimate name = "E" & gt; & Lt; See cref = "System.Windows.DependencyPropertyChangedEventArgs" /> Example with event data & Lt; / Param & gt; Private static void OnSomePropertyPropertyChanged (DependencyObject d, DependencyPropertyChangedEventArgs e) {(as SomeType d) KOnSomePropertyChanged (in kind e.OldValue, in e.NewValue kind); } /// & lt; Summary & gt; When the & lt; See cref = "SomeProperty" /> Change. /// & lt; / Summary & gt; /// & lt; Param name = "oldValue" & gt; Old value & lt; / Param & gt; /// & lt; Param name = "newValue" & gt; New value & lt; / Param & gt; Private Zero onsomeproperty-chinged (Object Olderview, Object New Value) {} /// & lt; Summary & gt; Name of /// & lt; See cref = "SomeProperty" /> & Lt; Cref = "DependencyProperty" /> See. /// & lt; / Summary & gt; Public const string SomePropertyPropertyName = "SomeProperty"; /// & lt; Summary & gt; ////// & lt; / Summary & gt; Public Object SomeProperty {Return (Object) GetValue (SomePropertyProperty); } Set {set value (some property properties, values); }} #endregion
No comments:
Post a Comment