public static void PropertyChangedCallback(DependencyObject depObj, DependencyPropertyChangedEventArgs args)
        {
            SfColorPicker c = depObj as SfColorPicker;

            if (c != null)
            {
                c.SelectedColorChanged += c_SelectedColorChanged;
            }
        }
Ejemplo n.º 2
0
        private void Picker_SelectedColorChanged_1(object sender, DependencyPropertyChangedEventArgs e)
        {
            SfColorPicker sf = (sender as SfColorPicker);

            if (this.DataContext != null)
            {
                if (this.DataContext is FloorPlannerDemo.FloorPlanNode)
                {
                    (this.DataContext as FloorPlannerDemo.FloorPlanNode).SelectedColor = sf.SelectedColor.ToString();
                }
            }
        }
        static void c_SelectedColorChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            SfColorPicker box = (sender as SfColorPicker);

            if (box != null)
            {
                ICommand command = box.GetValue(CommandProperty) as ICommand;
                if (command != null)
                {
                    command.Execute(box.SelectedColor);
                }
            }
        }