C# Class Fluent.RibbonControl

Represent base class for Fluent controls
Inheritance: System.Windows.Controls.Control, ICommandSource, IQuickAccessItemProvider, IRibbonControl
Datei anzeigen Open project: Gainedge/BetterExplorer Class Usage Examples

Public Properties

Property Type Description
CanAddToQuickAccessToolBarProperty System.Windows.DependencyProperty
CommandParameterProperty System.Windows.DependencyProperty
CommandProperty System.Windows.DependencyProperty
CommandTargetProperty System.Windows.DependencyProperty
HeaderProperty System.Windows.DependencyProperty
IconProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
Bind void
CoerceIsEnabled object
OnCommandCanExecuteChanged void
OnCommandChanged void
OnIconChanged void
RibbonControl System
UpdateCanExecute void

Public Methods

Method Description
BindQuickAccessItem ( FrameworkElement source, FrameworkElement element ) : void

Binds default properties of control to quick access element

CreateQuickAccessItem ( ) : FrameworkElement

Gets control which represents shortcut item. This item MUST be syncronized with the original and send command to original one control.

GetControlMonitor ( FrameworkElement control ) : Rect

Returns monitor in witch control is placed

GetControlWorkArea ( FrameworkElement control ) : Rect

Returns screen workarea in witch control is placed

OnCanAddToQuickAccessToolbarChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Occurs then CanAddToQuickAccessToolBar property changed

OnKeyTipBack ( ) : void

Handles back navigation with KeyTips

OnKeyTipPressed ( ) : void

Handles key tip pressed

Protected Methods

Method Description
CanExecuteCommand ( ) : bool

Determines whether the Command can be executed

ExecuteCommand ( ) : void

Execute command

Private Methods

Method Description
Bind ( object source, FrameworkElement target, string path, DependencyProperty property, BindingMode mode ) : void
CoerceIsEnabled ( DependencyObject d, object basevalue ) : object

Coerces IsEnabled

OnCommandCanExecuteChanged ( object sender, EventArgs e ) : void

Handles Command CanExecute changed

OnCommandChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles Command changed

OnIconChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
RibbonControl ( ) : System
UpdateCanExecute ( ) : void

Method Details

BindQuickAccessItem() public static method

Binds default properties of control to quick access element
public static BindQuickAccessItem ( FrameworkElement source, FrameworkElement element ) : void
source System.Windows.FrameworkElement Source item
element System.Windows.FrameworkElement Toolbar item
return void

CanExecuteCommand() protected method

Determines whether the Command can be executed
protected CanExecuteCommand ( ) : bool
return bool

CreateQuickAccessItem() public abstract method

Gets control which represents shortcut item. This item MUST be syncronized with the original and send command to original one control.
public abstract CreateQuickAccessItem ( ) : FrameworkElement
return System.Windows.FrameworkElement

ExecuteCommand() protected method

Execute command
protected ExecuteCommand ( ) : void
return void

GetControlMonitor() public static method

Returns monitor in witch control is placed
public static GetControlMonitor ( FrameworkElement control ) : Rect
control System.Windows.FrameworkElement Control
return System.Windows.Rect

GetControlWorkArea() public static method

Returns screen workarea in witch control is placed
public static GetControlWorkArea ( FrameworkElement control ) : Rect
control System.Windows.FrameworkElement Control
return System.Windows.Rect

OnCanAddToQuickAccessToolbarChanged() public static method

Occurs then CanAddToQuickAccessToolBar property changed
public static OnCanAddToQuickAccessToolbarChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
return void

OnKeyTipBack() public method

Handles back navigation with KeyTips
public OnKeyTipBack ( ) : void
return void

OnKeyTipPressed() public method

Handles key tip pressed
public OnKeyTipPressed ( ) : void
return void

Property Details

CanAddToQuickAccessToolBarProperty public_oe static_oe property

Using a DependencyProperty as the backing store for CanAddToQuickAccessToolBar. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows CanAddToQuickAccessToolBarProperty
return System.Windows.DependencyProperty

CommandParameterProperty public_oe static_oe property

Identifies the CommandParameter dependency property.
public static DependencyProperty,System.Windows CommandParameterProperty
return System.Windows.DependencyProperty

CommandProperty public_oe static_oe property

Identifies the routed Command dependency property.
public static DependencyProperty,System.Windows CommandProperty
return System.Windows.DependencyProperty

CommandTargetProperty public_oe static_oe property

Identifies the CommandTarget dependency property.
public static DependencyProperty,System.Windows CommandTargetProperty
return System.Windows.DependencyProperty

HeaderProperty public_oe static_oe property

Using a DependencyProperty as the backing store for Header. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows HeaderProperty
return System.Windows.DependencyProperty

IconProperty public_oe static_oe property

Using a DependencyProperty as the backing store for Icon. This enables animation, styling, binding, etc...
public static DependencyProperty,System.Windows IconProperty
return System.Windows.DependencyProperty