Class Control
Implements base class for user interface controls
Inheritance
Inherited Members
Namespace: EmptyKeys.UserInterface.Controls
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class Control : UIElement
Constructors
Control()
Initializes a new instance of the Control class.
Declaration
public Control()
Fields
BackgroundProperty
The background dependency property
Declaration
public static readonly DependencyProperty BackgroundProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
BorderBrushProperty
The border brush property
Declaration
public static readonly DependencyProperty BorderBrushProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
BorderThicknessProperty
The border thickness property
Declaration
public static readonly DependencyProperty BorderThicknessProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
FontFamilyProperty
The font family property
Declaration
public static readonly DependencyProperty FontFamilyProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
FontProperty
The font property
Declaration
public static readonly DependencyProperty FontProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
FontSizeProperty
The font size property
Declaration
public static readonly DependencyProperty FontSizeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
FontStyleProperty
The font style property
Declaration
public static readonly DependencyProperty FontStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ForegroundProperty
The foreground dependency property
Declaration
public static readonly DependencyProperty ForegroundProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
HorizontalContentAlignmentProperty
The horizontal content alignment property
Declaration
public static readonly DependencyProperty HorizontalContentAlignmentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsTabStopProperty
The is tab stop property
Declaration
public static readonly DependencyProperty IsTabStopProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MouseDoubleClickEvent
The mouse double click event
Declaration
public static readonly RoutedEvent MouseDoubleClickEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
PaddingProperty
The padding dependency property
Declaration
public static readonly DependencyProperty PaddingProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
PreviewMouseDoubleClickEvent
The preview mouse double click event
Declaration
public static readonly RoutedEvent PreviewMouseDoubleClickEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
TabIndexProperty
The tab index property
Declaration
public static readonly DependencyProperty TabIndexProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TemplateProperty
The template property
Declaration
public static readonly DependencyProperty TemplateProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
VerticalContentAlignmentProperty
The vertical content alignment property
Declaration
public static readonly DependencyProperty VerticalContentAlignmentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
Background
Gets or sets the background.
Declaration
public Brush Background { get; set; }
Property Value
Type | Description |
---|---|
Brush | The background. |
BorderBrush
Gets or sets the border brush.
Declaration
public Brush BorderBrush { get; set; }
Property Value
Type | Description |
---|---|
Brush | The border brush. |
BorderThickness
Gets or sets the border thickness.
Declaration
public Thickness BorderThickness { get; set; }
Property Value
Type | Description |
---|---|
EmptyKeys.UserInterface.Thickness | The border thickness. |
Font
Gets or sets the font.
Declaration
public FontBase Font { get; set; }
Property Value
Type | Description |
---|---|
EmptyKeys.UserInterface.Media.FontBase | The font. |
FontFamily
Gets or sets the font family.
Declaration
public FontFamily FontFamily { get; set; }
Property Value
Type | Description |
---|---|
FontFamily | The font family. |
FontSize
Gets or sets the size of the font.
Declaration
public float FontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The size of the font. |
FontStyle
Gets or sets the font style.
Declaration
public FontStyle FontStyle { get; set; }
Property Value
Type | Description |
---|---|
FontStyle | The font style. |
Foreground
Gets or sets the foreground.
Declaration
public Brush Foreground { get; set; }
Property Value
Type | Description |
---|---|
Brush | The foreground. |
HorizontalContentAlignment
Gets or sets the horizontal content alignment.
Declaration
public HorizontalAlignment HorizontalContentAlignment { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAlignment | The horizontal content alignment. |
IsTabStop
Gets or sets a value indicating whether this instance is tab stop.
Declaration
public bool IsTabStop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Padding
Gets or sets the padding.
Declaration
public Thickness Padding { get; set; }
Property Value
Type | Description |
---|---|
EmptyKeys.UserInterface.Thickness | The padding. |
TabIndex
Gets or sets the index of the tab.
Declaration
public int TabIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the tab. |
Template
Gets or sets the template.
Declaration
public ControlTemplate Template { get; set; }
Property Value
Type | Description |
---|---|
ControlTemplate | The template. |
VerticalContentAlignment
Gets or sets the vertical content alignment.
Declaration
public VerticalAlignment VerticalContentAlignment { get; set; }
Property Value
Type | Description |
---|---|
VerticalAlignment | The vertical content alignment. |
Methods
ArrangeOverride(Size)
Arrange layout pass - overrider method for children
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Size | finalSize | The final size. |
Returns
Type | Description |
---|---|
EmptyKeys.UserInterface.Size |
Overrides
InvalidateIsEnabledOnChildren()
Invalidates the IsEnabled property value on children.
Declaration
protected override void InvalidateIsEnabledOnChildren()
Overrides
MeasureOverride(Size)
Measure layout pass
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Size | availableSize | available size for element |
Returns
Type | Description |
---|---|
EmptyKeys.UserInterface.Size |
Overrides
OnDraw(Renderer, Double, Single)
Called when [draw].
Declaration
protected override void OnDraw(Renderer spriterenderer, double elapsedGameTime, float opacity)
Parameters
Type | Name | Description |
---|---|---|
EmptyKeys.UserInterface.Renderers.Renderer | spriterenderer | The sprite renderer. |
System.Double | elapsedGameTime | The elapsed game time. |
System.Single | opacity | The opacity. |
Overrides
OnMouseDoubleClick(MouseButtonEventArgs)
Raises the MouseDoubleClick event.
Declaration
protected virtual void OnMouseDoubleClick(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
OnPreviewMouseDoubleClick(MouseButtonEventArgs)
Raises the PreviewMouseDoubleClick event.
Declaration
protected virtual void OnPreviewMouseDoubleClick(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
OnPropertyChanged(DependencyProperty)
Called when [property changed].
Declaration
protected override void OnPropertyChanged(DependencyProperty property)
Parameters
Type | Name | Description |
---|---|---|
DependencyProperty | property | The property. |
Overrides
Events
MouseDoubleClick
Occurs when [mouse double click].
Declaration
public event MouseButtonEventHandler MouseDoubleClick
Event Type
Type | Description |
---|---|
MouseButtonEventHandler |
PreviewMouseDoubleClick
Occurs when [preview mouse double click].
Declaration
public event MouseButtonEventHandler PreviewMouseDoubleClick
Event Type
Type | Description |
---|---|
MouseButtonEventHandler |