WPFCustomControls::MaxWpfColorSwatch Class Reference


Detailed Description

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

Inheritance diagram for WPFCustomControls::MaxWpfColorSwatch:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

WPFCustomControls::MaxWpfColorSwatch::MaxWpfColorSwatch ( ) [inline]

Member Function Documentation

override void WPFCustomControls::MaxWpfColorSwatch::CopyFrom ( RibbonItem  source ) [inline]
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.

Parameters:
script A script, normally in the format: "MaxscriptCallback.GetValue()", unless the formatting string method GetValueFormatString() is overriden by the deriving class.

Implements WPFCustomControls::MaxWpfControlBase.


Member Data Documentation

readonly String WPFCustomControls::MaxWpfColorSwatch::ColorValuePropertyName = "ColorValue" [static]
readonly String WPFCustomControls::MaxWpfColorSwatch::ItemHeightPropertyName = "ItemHeight" [static]

Property Documentation

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.)


WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch
WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch WPFCustomControls::MaxWpfColorSwatch