menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ControlBehavior - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ControlBehavior

    Provides VisualStateManager base behavior for controls.

    Inheritance
    System.Object
    VisualStateBehavior
    ControlBehavior
    ButtonBaseBehavior
    ListBoxItemBehavior
    ProgressBarBehavior
    TextBoxBaseBehavior
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    VisualStateBehavior.AddValueChanged(DependencyProperty, Type, Object, EventHandler)
    VisualStateBehavior.GetVisualStateBehavior(DependencyObject)
    VisualStateBehavior.RegisterBehavior(VisualStateBehavior)
    VisualStateBehavior.RemoveValueChanged(DependencyProperty, Type, Object, EventHandler)
    VisualStateBehavior.SetVisualStateBehavior(DependencyObject, VisualStateBehavior)
    VisualStateBehavior.VisualStateBehaviorProperty
    Namespace: Syncfusion.Windows.Controls
    Assembly: Syncfusion.Shared.Wpf.dll
    Syntax
    public class ControlBehavior : VisualStateBehavior
    Remarks

    Provides focus states. Forwards the Loaded event to UpdateState.

    Constructors

    ControlBehavior()

    Declaration
    public ControlBehavior()

    Properties

    TargetType

    This behavior targets Control derived Controls.

    Declaration
    protected override Type TargetType { get; }
    Property Value
    Type
    System.Type
    Overrides
    VisualStateBehavior.TargetType

    Methods

    OnAttach(Control)

    Attaches to property changes and events.

    Declaration
    protected override void OnAttach(Control control)
    Parameters
    Type Name Description
    System.Windows.Controls.Control control

    An instance of the control.

    Overrides
    VisualStateBehavior.OnAttach(Control)

    OnDetach(Control)

    Detaches property changes and events.

    Declaration
    protected override void OnDetach(Control control)
    Parameters
    Type Name Description
    System.Windows.Controls.Control control

    The control

    Overrides
    VisualStateBehavior.OnDetach(Control)

    UpdateState(Control, Boolean)

    Called to update the control's visual state.

    Declaration
    protected override void UpdateState(Control control, bool useTransitions)
    Parameters
    Type Name Description
    System.Windows.Controls.Control control

    The instance of the control being updated.

    System.Boolean useTransitions

    Whether to use transitions or not.

    Overrides
    VisualStateBehavior.UpdateState(Control, Boolean)

    UpdateStateHandler(Object, EventArgs)

    Declaration
    protected override void UpdateStateHandler(object o, EventArgs e)
    Parameters
    Type Name Description
    System.Object o
    System.EventArgs e
    Overrides
    VisualStateBehavior.UpdateStateHandler(Object, EventArgs)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved