Beispiel #1
0
        static void Selector_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            NullItemSelectorAdapter adapter = (NullItemSelectorAdapter)sender;

            adapter.Content = e.NewValue;
            Selector selector = (Selector)e.OldValue;

            if (selector != null)
            {
                selector.SelectionChanged -= adapter.Selector_SelectionChanged;
            }
            selector = (Selector)e.NewValue;
            if (selector != null)
            {
                selector.IsSynchronizedWithCurrentItem = true;
                selector.SelectionChanged += adapter.Selector_SelectionChanged;
            }
            adapter.Adapt( );
        }
Beispiel #2
0
        static void ItemsSource_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            NullItemSelectorAdapter adapter = (NullItemSelectorAdapter)sender;

            adapter.Adapt( );
        }