Table of Contents

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

DependencyProperty

Methods

GetKeepSquare(DependencyObject)

Gets the value of the KeepSquare attached property from the specified dependency object.

public static bool GetKeepSquare(DependencyObject obj)

Parameters

obj DependencyObject

The 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

obj DependencyObject

The dependency object on which to set the property value.

value bool

The value to set for the KeepSquare attached property.