예제 #1
0
 /// <summary>
 /// Initializes static members of the <see cref="ColorPicker" /> class.
 /// </summary>
 static ColorPicker()
 {
     DefaultStyleKeyProperty.OverrideMetadata(
         typeof(ColorPicker), new FrameworkPropertyMetadata(typeof(ColorPicker)));
     SelectedValueProperty.OverrideMetadata(
         typeof(ColorPicker),
         new FrameworkPropertyMetadata(
             Color.FromArgb(0, 0, 0, 0),
             FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
             SelectedColorChanged,
             CoerceSelectedColorValue));
 }
예제 #2
0
        static SearchComboBox()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(SearchComboBox), new FrameworkPropertyMetadata(typeof(SearchComboBox)));

            SelectedIndexProperty.OverrideMetadata(typeof(SearchComboBox), new FrameworkPropertyMetadata {
                DefaultUpdateSourceTrigger = UpdateSourceTrigger.Explicit
            });
            SelectedItemProperty.OverrideMetadata(typeof(SearchComboBox), new FrameworkPropertyMetadata {
                DefaultUpdateSourceTrigger = UpdateSourceTrigger.Explicit
            });
            SelectedValueProperty.OverrideMetadata(typeof(SearchComboBox), new FrameworkPropertyMetadata {
                DefaultUpdateSourceTrigger = UpdateSourceTrigger.Explicit
            });
        }