/// <summary>
        /// Creates the color control.
        /// </summary>
        /// <param name="property">
        /// The property.
        /// </param>
        /// <returns>
        /// The control.
        /// </returns>
        protected FrameworkElement CreateColorControl(PropertyItem property)
        {
            var c = new ColorPicker2();

            c.SetBinding(ColorPicker2.SelectedColorProperty, property.CreateBinding());
            return(c);
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a color picker control.
 /// </summary>
 /// <param name="d">
 /// The definition.
 /// </param>
 /// <param name="index">
 /// The index.
 /// </param>
 /// <returns>
 /// A color picker.
 /// </returns>
 protected virtual FrameworkElement CreateColorPickerControl(PropertyDefinition d, int index)
 {
     var c = new ColorPicker2
         {
             VerticalAlignment = VerticalAlignment.Center,
             HorizontalAlignment = HorizontalAlignment.Stretch,
             Focusable = false
         };
     c.SetBinding(ColorPicker2.SelectedColorProperty, d.CreateBinding(index));
     return c;
 }
 /// <summary>
 /// Creates the color control.
 /// </summary>
 /// <param name="property">
 /// The property.
 /// </param>
 /// <returns>
 /// The control.
 /// </returns>
 protected FrameworkElement CreateColorControl(PropertyItem property)
 {
     var c = new ColorPicker2();
     c.SetBinding(ColorPicker2.SelectedColorProperty, property.CreateBinding());
     return c;
 }