A WPF implementation of a Color Swatch for the Ribbon.
This is actually the data representation of a color swatch for ribbon. The data representation (its template) is supplied by the MaxColorSwatchUserControl class, and is associated in Themes\ColorSwatch.xaml
Public Member Functions |
|
MaxWpfColorSwatch () | |
override void | CopyFrom (RibbonItem source) |
Static Public Attributes |
|
static readonly String | ColorValuePropertyName = "ColorValue" |
static readonly String | ItemHeightPropertyName = "ItemHeight" |
Protected Member Functions |
|
override void | OnInitialized (object sender, EventArgs e) |
override void | ValueRefresh (String script) |
This method should be implemented by
deriving classes in such a way that the class anticipates what the
result of a script will be and processed it accordingly. |
|
Properties |
|
Color |
ColorValue [get, set] |
The current ColorValue of the swatch.
|
|
double |
ItemHeight [get, set] |
Sets the height of the Ribbon control
representation. |
WPFCustomControls::MaxWpfColorSwatch::MaxWpfColorSwatch | ( | ) | [inline] |
override void WPFCustomControls::MaxWpfColorSwatch::CopyFrom | ( | RibbonItem | source | ) | [inline] |
Reimplemented from WPFCustomControls::MaxWpfControlBase.
override void WPFCustomControls::MaxWpfColorSwatch::OnInitialized | ( | object | sender, |
EventArgs | e | ||
) | [inline, protected] |
override void WPFCustomControls::MaxWpfColorSwatch::ValueRefresh | ( | String | script | ) | [inline, protected, virtual] |
This method should be implemented by deriving classes in such a way that the class anticipates what the result of a script will be and processed it accordingly.
script | A script, normally in the format: "MaxscriptCallback.GetValue()", unless the formatting string method GetValueFormatString() is overriden by the deriving class. |
Implements WPFCustomControls::MaxWpfControlBase.
readonly String
WPFCustomControls::MaxWpfColorSwatch::ColorValuePropertyName =
"ColorValue" [static] |
readonly String
WPFCustomControls::MaxWpfColorSwatch::ItemHeightPropertyName =
"ItemHeight" [static] |
Color
WPFCustomControls::MaxWpfColorSwatch::ColorValue [get,
set] |
The current ColorValue of the swatch.
double
WPFCustomControls::MaxWpfColorSwatch::ItemHeight [get,
set] |
Sets the height of the Ribbon control representation.
This value should be used instead of the RibbonItem.Height value. That value only works for resizable height controls (which are almost never used.)