Class ControlHelper
- Namespace
- WindowSill.API
- Assembly
- WindowSill.API.dll
Provides attached properties and helper methods for WinUI3 controls.
public static class ControlHelper
- Inheritance
-
ControlHelper
- Inherited Members
Fields
KeepSquareProperty
Identifies the KeepSquare attached property. When set to true, automatically adjusts the control's width to match its height, maintaining a square aspect ratio.
public static readonly DependencyProperty KeepSquareProperty
Field Value
Methods
GetKeepSquare(DependencyObject)
Gets the value of the KeepSquare attached property from the specified dependency object.
public static bool GetKeepSquare(DependencyObject obj)
Parameters
objDependencyObjectThe dependency object from which to read the property value.
Returns
- bool
The value of the KeepSquare attached property.
SetKeepSquare(DependencyObject, bool)
Sets the value of the KeepSquare attached property on the specified dependency object. When set to true, automatically adjusts the control's width to match its height, maintaining a square aspect ratio.
public static void SetKeepSquare(DependencyObject obj, bool value)
Parameters
objDependencyObjectThe dependency object on which to set the property value.
valueboolThe value to set for the KeepSquare attached property.