RibbonCommand Class
Defines an ICommand which is routed through the element tree and is suited for use with ribbon controls because of its IRibbonCommandUIProvider implementation.
public class RibbonCommand : RoutedCommand, IRibbonCommandUIProvider
- Inheritance:
- object RoutedCommand object
- Implements:
- IRibbonCommandUIProvider
Constructors
RibbonCommand()
Initializes an instance of the RibbonCommand
class.
public RibbonCommand()
RibbonCommand(string, Type)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
RibbonCommand(string, Type, string)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType, string label)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
label | string | The text label that will be displayed for controls that use this command. |
RibbonCommand(string, Type, string, string, string)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType, string label, string imageSourceLarge, string imageSourceSmall)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
label | string | The text label that will be displayed for controls that use this command. |
imageSourceLarge | string | The URL for the 32x32 image that will be displayed for controls that use this command. |
imageSourceSmall | string | The URL for the 16x16 image that will be displayed for controls that use this command. |
RibbonCommand(string, Type, string, string, string, object)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType, string label, string imageSourceLarge, string imageSourceSmall, object screenTipDescription)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
label | string | The text label that will be displayed for controls that use this command. |
imageSourceLarge | string | The URL for the 32x32 image that will be displayed for controls that use this command. |
imageSourceSmall | string | The URL for the 16x16 image that will be displayed for controls that use this command. |
screenTipDescription | object | The description object that will be displayed in screen tips for controls that use this command. |
RibbonCommand(string, Type, string, string, string, object, InputGestureCollection)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType, string label, string imageSourceLarge, string imageSourceSmall, object screenTipDescription, InputGestureCollection inputGestures)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
label | string | The text label that will be displayed for controls that use this command. |
imageSourceLarge | string | The URL for the 32x32 image that will be displayed for controls that use this command. |
imageSourceSmall | string | The URL for the 16x16 image that will be displayed for controls that use this command. |
screenTipDescription | object | The description object that will be displayed in screen tips for controls that use this command. |
inputGestures | InputGestureCollection | Default input gestures associated with this command. |
RibbonCommand(string, Type, string, ImageSource, ImageSource)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType, string label, ImageSource imageSourceLarge, ImageSource imageSourceSmall)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
label | string | The text label that will be displayed for controls that use this command. |
imageSourceLarge | ImageSource | The ImageSource for the 32x32 image that will be displayed for controls that use this command. |
imageSourceSmall | ImageSource | The ImageSource for the 16x16 image that will be displayed for controls that use this command. |
RibbonCommand(string, Type, string, ImageSource, ImageSource, object)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType, string label, ImageSource imageSourceLarge, ImageSource imageSourceSmall, object screenTipDescription)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
label | string | The text label that will be displayed for controls that use this command. |
imageSourceLarge | ImageSource | The ImageSource for the 32x32 image that will be displayed for controls that use this command. |
imageSourceSmall | ImageSource | The ImageSource for the 16x16 image that will be displayed for controls that use this command. |
screenTipDescription | object | The description object that will be displayed in screen tips for controls that use this command. |
RibbonCommand(string, Type, string, ImageSource, ImageSource, object, InputGestureCollection)
Initializes an instance of the RibbonCommand
class.
public RibbonCommand(string name, Type ownerType, string label, ImageSource imageSourceLarge, ImageSource imageSourceSmall, object screenTipDescription, InputGestureCollection inputGestures)
Parameter | Type | Description |
---|---|---|
name | string | Declared name for serialization. |
ownerType | Type | The type that is registering the command. |
label | string | The text label that will be displayed for controls that use this command. |
imageSourceLarge | ImageSource | The ImageSource for the 32x32 image that will be displayed for controls that use this command. |
imageSourceSmall | ImageSource | The ImageSource for the 16x16 image that will be displayed for controls that use this command. |
screenTipDescription | object | The description object that will be displayed in screen tips for controls that use this command. |
inputGestures | InputGestureCollection | Default input gestures associated with this command. |
Properties
ImageSourceLarge
Gets or sets the ImageSource for the 32x32 image that will be displayed for controls that use this command.
public ImageSource ImageSourceLarge { get; set; }
Property Value
- ImageSource:
The ImageSource for the 32x32 image that will be displayed for controls that use this command.
ImageSourceSmall
Gets or sets the ImageSource for the 16x16 image that will be displayed for controls that use this command.
public ImageSource ImageSourceSmall { get; set; }
Property Value
- ImageSource:
The ImageSource for the 16x16 image that will be displayed for controls that use this command.
KeyTipAccessText
Gets or sets the key tip access text that will be displayed for controls that use this command.
[Localizability(LocalizationCategory.Text)]
public string KeyTipAccessText { get; set; }
Property Value
- string:
The key tip access text that will be displayed for controls that use this command.
Label
Gets or sets the text label that will be displayed for controls that use this command.
[Localizability(LocalizationCategory.Label)]
public string Label { get; set; }
Property Value
- string:
The text label that will be displayed for controls that use this command.
ScreenTipDescription
Gets or sets the description object that will be displayed in screen tips for controls that use this command.
[Localizability(LocalizationCategory.ToolTip)]
public object ScreenTipDescription { get; set; }
Property Value
- object:
The description object that will be displayed in screen tips for controls that use this command.
ScreenTipFooter
Gets or sets the footer object that will be displayed in screen tips for controls that use this command.
[Localizability(LocalizationCategory.ToolTip)]
public object ScreenTipFooter { get; set; }
Property Value
- object:
The footer object that will be displayed in screen tips for controls that use this command.
ScreenTipHeader
Gets or sets the header object that will be displayed in screen tips for controls that use this command.
[Localizability(LocalizationCategory.ToolTip)]
public object ScreenTipHeader { get; set; }
Property Value
- object:
The header object that will be displayed in screen tips for controls that use this command.
ScreenTipHelpUri
Gets or sets the System.Uri specifying the location of context-sensitive help related to controls that use this command
when a screen tip is displayed and F1
is pressed.
public Uri ScreenTipHelpUri { get; set; }
Property Value
- Uri:
The System.Uri specifying the location of context-sensitive help related to controls that use this command when a screen tip is displayed and
F1
is pressed.
ScreenTipImageSource
Gets or sets the ImageSource for the image that will be displayed in screen tips for controls that use this command.
public ImageSource ScreenTipImageSource { get; set; }
Property Value
- ImageSource:
The ImageSource for the image that will be displayed in screen tips for controls that use this command.
Tag
Gets or sets an arbitrary object value that can be used to store custom information about this command.
public object Tag { get; set; }
Property Value
- object:
The intended value. This property has no default value.
Methods
NotifyPropertyChanged(string)
Notifies that a property's value has changed.
protected void NotifyPropertyChanged(string name)
Parameter | Type | Description |
---|---|---|
name | string | The name of the property. |
Events
PropertyChanged
Occurs when a property value is changed.