Class FocusControlOnSourceLoadedBehaviour
Focus the associated object if the SourceElement is loaded. If the SourceElements derives from IFocusableControlBase, the associated object is passed to the SourceElement property FocusOnStart.
Inheritance
System.Object
FocusControlOnSourceLoadedBehaviour
Namespace: Simplic.Studio.UI.Input
Assembly: Simplic.Studio.UI.Input.dll
Syntax
public class FocusControlOnSourceLoadedBehaviour : Behavior<FrameworkElement>
Examples
Import wpf behaviours:
xmlns:local="clr-namespace:Simplic.ERP.UI;assembly=Simplic.ERP.UI"
Add behaviour
<i:Interaction.Behaviors>
<simplic:FocusControlOnSourceLoadedBehaviour SourceElement = "{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TransactionWindow}}, Path=.}" />
</ i:Interaction.Behaviors>
Fields
| Improve this Doc View SourceSourceElementProperty
Dependency property for binding the source element.
Declaration
public static readonly DependencyProperty SourceElementProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty |
Examples
SourceElement="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TransactionWindow}}, Path=.}
Properties
| Improve this Doc View SourceSourceElement
Gets or sets the source control
Declaration
public FrameworkElement SourceElement { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.FrameworkElement |
Methods
| Improve this Doc View SourceOnAttached()
Declaration
protected override void OnAttached()
OnDetaching()
Detach behaviour and clear instances
Declaration
protected override void OnDetaching()