Table of Contents

Class Uids

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

Provides attached properties and methods for managing unique identifiers (UIDs) on DependencyObject instances.

public static class Uids
Inheritance
Uids
Inherited Members

Remarks

The Uids class defines the UidProperty attached property, which can be used to assign and retrieve unique identifiers for DependencyObject instances. This is useful for scenarios such as localization or tracking objects within a visual tree.

Fields

UidProperty

Gets or sets the unique identifier (UID) for a DependencyObject.

public static readonly DependencyProperty UidProperty

Field Value

DependencyProperty

Methods

GetUid(DependencyObject)

Retrieves the value of the UidProperty attached property for the specified DependencyObject.

public static string GetUid(DependencyObject dependencyObject)

Parameters

dependencyObject DependencyObject

The DependencyObject from which to retrieve the UidProperty value.

Returns

string

The value of the UidProperty attached property, or null if no value is set.

SetUid(DependencyObject, string)

Sets the unique identifier (UID) for the specified DependencyObject.

public static void SetUid(DependencyObject dependencyObject, string uid)

Parameters

dependencyObject DependencyObject

The DependencyObject for which the UID is being set. Cannot be null.

uid string

The unique identifier to assign to the dependencyObject. Can be an empty string.

Remarks

This method assigns the specified UID to the dependencyObject by setting its UidProperty.