/// <summary> /// Creates the brush control. /// </summary> /// <param name="property"> /// The property. /// </param> /// <returns> /// The control. /// </returns> protected FrameworkElement CreateBrushControl(PropertyItem property) { var c = new ColorPicker(); c.SetBinding(ColorPicker.SelectedColorProperty, property.CreateBinding()); return(c); }
/// <summary> /// Creates a color picker control with data binding. /// </summary> /// <param name="propertyDefinition">The property definition.</param> /// <param name="bindingPath">The binding path.</param> /// <returns> /// A color picker. /// </returns> protected virtual FrameworkElement CreateColorPickerControl(PropertyDefinition propertyDefinition, string bindingPath) { var c = new ColorPicker { VerticalAlignment = VerticalAlignment.Center, HorizontalAlignment = HorizontalAlignment.Stretch, Focusable = false }; c.SetBinding(ColorPicker.SelectedColorProperty, propertyDefinition.CreateBinding(bindingPath)); return(c); }
/// <summary> /// Creates a color picker control with data binding. /// </summary> /// <param name="d">The cell definition.</param> /// <returns> /// A color picker. /// </returns> protected virtual FrameworkElement CreateColorPickerControl(CellDefinition d) { var c = new ColorPicker { VerticalAlignment = VerticalAlignment.Center, HorizontalAlignment = HorizontalAlignment.Stretch, Focusable = false }; c.SetBinding(ColorPicker.SelectedColorProperty, this.CreateBinding(d)); this.SetIsEnabledBinding(d, c); this.SetBackgroundBinding(d, c); return(c); }
/// <summary> /// Creates a color picker control with data binding. /// </summary> /// <param name="d">The cell definition.</param> /// <returns> /// A color picker. /// </returns> protected virtual FrameworkElement CreateColorPickerControl(CellDefinition d) { var c = new ColorPicker { VerticalAlignment = VerticalAlignment.Center, HorizontalAlignment = HorizontalAlignment.Stretch, Focusable = false }; c.SetBinding(ColorPicker.SelectedColorProperty, this.CreateBinding(d)); this.SetIsEnabledBinding(d, c); this.SetBackgroundBinding(d, c); return c; }
/// <summary> /// Creates the color control. /// </summary> /// <param name="property">The property.</param> /// <returns> /// The control. /// </returns> protected virtual FrameworkElement CreateColorControl(PropertyItem property) { var c = new ColorPicker(); c.SetBinding(ColorPicker.SelectedColorProperty, property.CreateBinding()); return c; }
/// <summary> /// Creates a color picker control with data binding. /// </summary> /// <param name="propertyDefinition">The property definition.</param> /// <param name="bindingPath">The binding path.</param> /// <returns> /// A color picker. /// </returns> protected virtual FrameworkElement CreateColorPickerControl(PropertyDefinition propertyDefinition, string bindingPath) { var c = new ColorPicker { VerticalAlignment = VerticalAlignment.Center, HorizontalAlignment = HorizontalAlignment.Stretch, Focusable = false }; c.SetBinding(ColorPicker.SelectedColorProperty, propertyDefinition.CreateBinding(bindingPath)); return c; }