Class QuickAccessBox
Custom control containing an Icon and Caption which opens a popup and a button as "QuickAccess" on the right side.
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TemplatePart(Name = "PART_QuickAccessButton", Type = typeof(Button))]
[TemplatePart(Name = "PART_Popup", Type = typeof(Popup))]
[TemplatePart(Name = "PART_ToggleButton", Type = typeof(ToggleButton))]
public class QuickAccessBox : ItemsControl, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IContainItemStorage, IAddChild
Fields
View SourceCaptionProperty
The caption property
Declaration
public static readonly DependencyProperty CaptionProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IconStyleProperty
The icon style property of the icon to the left of the caption
Declaration
public static readonly DependencyProperty IconStyleProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsWidthDependingOnMenuItemWidthProperty
The set width from menu items property
Declaration
public static readonly DependencyProperty IsWidthDependingOnMenuItemWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PopupHorizontalOffsetProperty
The popup horizontal offset property
Declaration
public static readonly DependencyProperty PopupHorizontalOffsetProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PopupPlacementProperty
The popup placement property. Default is bottom.
Declaration
public static readonly DependencyProperty PopupPlacementProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PopupVerticalOffsetProperty
The popup vertical offset property
Declaration
public static readonly DependencyProperty PopupVerticalOffsetProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PreventMouseDoubleClickFromBubblingProperty
The property to set to prevent mouse double click from bubbling
Declaration
public static readonly DependencyProperty PreventMouseDoubleClickFromBubblingProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
QuickAccessCommandParameterProperty
The quick access command parameter property
Declaration
public static readonly DependencyProperty QuickAccessCommandParameterProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
QuickAccessCommandProperty
The quick access command property
Declaration
public static readonly DependencyProperty QuickAccessCommandProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
QuickAccessIconStyleProperty
The quick access icon style property for the icon on the quick access button to the right of the caption
Declaration
public static readonly DependencyProperty QuickAccessIconStyleProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
WidthCorrectionProperty
The width correction property. Set this when the width of the control does not exactly fit while IsWidthDependingOnMenuItemWidth is set.
Declaration
public static readonly DependencyProperty WidthCorrectionProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
View SourceCaption
Gets or sets the caption.
Declaration
public string Caption { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IconStyle
Gets or sets the icon style.
Declaration
public Style IconStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| Style |
IsWidthDependingOnMenuItemWidth
Determines wether to set the Width of the QuickAccessBox to the maximum width of its items or not.
Declaration
public bool IsWidthDependingOnMenuItemWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
PopupHorizontalOffset
Gets or sets the horizontal offset of the popup.
Declaration
public double PopupHorizontalOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
PopupPlacement
Gets or sets the placement of the popup.
Declaration
public PlacementMode PopupPlacement { get; set; }
Property Value
| Type | Description |
|---|---|
| PlacementMode |
PopupVerticalOffset
Gets or sets the vertical offset of the popup.
Declaration
public double PopupVerticalOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
PreventMouseDoubleClickFromBubbling
Determines wether to prevent mouse double click from bubbling or not.
Declaration
public bool PreventMouseDoubleClickFromBubbling { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
QuickAccessCommand
Gets or sets the logout command.
Declaration
public ICommand QuickAccessCommand { get; set; }
Property Value
| Type | Description |
|---|---|
| ICommand |
QuickAccessCommandParameter
Gets or sets the logout command parameter.
Declaration
public object QuickAccessCommandParameter { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
QuickAccessIconStyle
Gets or sets the style of the quick access icon.
Declaration
public Style QuickAccessIconStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| Style |
WidthCorrection
The width correction. Set this when the width of the control does not exactly fit while IsWidthDependingOnMenuItemWidth is set.
Declaration
public double WidthCorrection { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
View SourceOnApplyTemplate()
Applies the template. Looks for the TemplatePart PART_QuickAccessButton to disable the MouseDoubleClick bubbling.
Declaration
public override void OnApplyTemplate()
Overrides
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException | PART_QuickAccessButton |
OnPreviewKeyDown(KeyEventArgs)
method that checks whether the event is further processed. it is processed if the maximal number of selectable items is not reached
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter e is never null")]
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyEventArgs | e |