wp7 and dependency property : onChanged and onRead?
        Posted  
        
            by 
                user233150
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user233150
        
        
        
        Published on 2010-12-21T07:20:12Z
        Indexed on 
            2010/12/22
            14:54 UTC
        
        
        Read the original article
        Hit count: 174
        
c#
|windows-phone-7
hi here's my question :
well I want build a wp7 control,so I write it and all go well, but the problem is that I can intercept on write(see onItemsSourcePropertyChanged)but not on read I would like explain better:
public static readonly
DependencyProperty ItemsSourceProperty=
         DependencyProperty.Register(
             "ItemsSource",
             typeof(ObservableCollection<ObjWithDesc>),
             typeof(HorizontalListBox),
             new PropertyMetadata(OnItemsSourcePropertyChanged)
         );
    static void OnItemsSourcePropertyChanged(DependencyObject obj,DependencyPropertyChangedEventArgs e)
{
         ((HorizontalListBox) obj).OnItemsSourcePropertyChanged(e);
}
OnItemsSourcePropertyChanged is called when I use SetValue(dp,..) but there isn't onItemsSourcePropertyRead ? that is called when I Use GetValue()? thanks
© Stack Overflow or respective owner