예제 #1
0
        private static void SelectedIndexChangedCallback(DependencyObject owner, DependencyPropertyChangedEventArgs args)
        {
            ColorsListbox clb   = owner as ColorsListbox;
            int           index = (int)args.NewValue;

            clb.SelectedIndex = index;
        }
예제 #2
0
        private static void SelectedItemChangedCallback(DependencyObject owner, DependencyPropertyChangedEventArgs args)
        {
            ColorsListbox clb  = owner as ColorsListbox;
            ColorItem     item = args.NewValue as ColorItem;

            clb.SelectedItem = item;
        }