Windows.UI.Xaml Namespace

Provides general framework APIs and application model APIs, and a variety of support classes that are commonly used by many different feature areas.

Classes

AdaptiveTrigger

Represents a declarative rule that applies visual states based on window properties.

Equivalent WinUI class: Microsoft.UI.Xaml.AdaptiveTrigger.

Application

Encapsulates the app and its available services.

Equivalent WinUI class: Microsoft.UI.Xaml.Application.

ApplicationInitializationCallbackParams

A class that developers should derive from in order to pass information for a custom initialization sequence, in cases where both an Application subclass is present and the entry point Start call is adjusted to pass the information.

Equivalent WinUI class: Microsoft.UI.Xaml.ApplicationInitializationCallbackParams.

BindingFailedEventArgs

Provides event data for the DebugSettings.BindingFailed event.

Equivalent WinUI class: Microsoft.UI.Xaml.BindingFailedEventArgs.

BringIntoViewOptions

Represents the options that can be applied when an element is brought into view.

Equivalent WinUI class: Microsoft.UI.Xaml.BringIntoViewOptions.

BringIntoViewRequestedEventArgs

Provides data for the UIElement.BringIntoViewRequested event.

Equivalent WinUI class: Microsoft.UI.Xaml.BringIntoViewRequestedEventArgs.

BrushTransition

Provides the animated transition behavior when an element's brush changes. Currently limited to changes between SolidColorBrush objects.

Equivalent WinUI class: Microsoft.UI.Xaml.BrushTransition.

ColorPaletteResources

Represents a specialized resource dictionary that contains color resources used by XAML elements.

Equivalent WinUI class: Microsoft.UI.Xaml.ColorPaletteResources.

CornerRadiusHelper

Provides basic utility methods for processing CornerRadius values. C# and Microsoft Visual Basic code should use methods of CornerRadius instead.

Equivalent WinUI class: Microsoft.UI.Xaml.CornerRadiusHelper.

DataContextChangedEventArgs

Provides data for the DataContextChanged event.

Equivalent WinUI class: Microsoft.UI.Xaml.DataContextChangedEventArgs.

DataTemplate

Describes the visual structure of a data object. Use data binding for specific elements in the template that display the data values.

Equivalent WinUI class: Microsoft.UI.Xaml.DataTemplate.

DataTemplateKey

Represents the resource key for the DataTemplate class.

Equivalent WinUI class: Microsoft.UI.Xaml.DataTemplateKey.

DebugSettings

Declares how certain aspects of the app behave when it is run in a debug environment

Equivalent WinUI class: Microsoft.UI.Xaml.DebugSettings.

DependencyObject

Represents an object that participates in the dependency property system. DependencyObject is the immediate base class of many important UI-related classes, such as UIElement, Geometry, FrameworkTemplate, Style, and ResourceDictionary. For more info on how DependencyObject supports dependency properties, see Dependency properties overview.

Equivalent WinUI class: Microsoft.UI.Xaml.DependencyObject.

DependencyObjectCollection

Implements a practical collection class that can contain DependencyObject items.

Equivalent WinUI class: Microsoft.UI.Xaml.DependencyObjectCollection.

DependencyProperty

Represents a dependency property that is registered with the dependency property system. Dependency properties provide support for value expressions, data binding, animation, and property change notification. For more info on how DependencyProperty values serve as identifiers for dependency properties, see Dependency properties overview.

Equivalent WinUI class: Microsoft.UI.Xaml.DependencyProperty.

DependencyPropertyChangedEventArgs

Provides data for a PropertyChangedCallback implementation that is invoked when a dependency property changes its value. Also provides event data for the Control.IsEnabledChanged event and any other event that uses the DependencyPropertyChangedEventHandler delegate.

Equivalent WinUI class: Microsoft.UI.Xaml.DependencyPropertyChangedEventArgs.

DispatcherTimer

Provides a timer that is integrated into the Dispatcher queue, which is processed at a specified interval of time and at a specified priority.

Equivalent WinUI class: Microsoft.UI.Xaml.DispatcherTimer.

DragEventArgs

Provides data for drag-and-drop events.

Equivalent WinUI class: Microsoft.UI.Xaml.DragEventArgs.

DragOperationDeferral

Enables you to drag-and-drop content with a target app asynchronously.

Equivalent WinUI class: Microsoft.UI.Xaml.DragOperationDeferral.

DragStartingEventArgs

Provides event data for the DragStarting event.

Equivalent WinUI class: Microsoft.UI.Xaml.DragStartingEventArgs.

DragUI

Provides the visual representation of the data being dragged at the start of a drag-and-drop operation.

Equivalent WinUI class: Microsoft.UI.Xaml.DragUI.

DragUIOverride

Provides the visual representation of the data being dragged during a drag-and-drop operation, including feedback from the drop target.

Equivalent WinUI class: Microsoft.UI.Xaml.DragUIOverride.

DropCompletedEventArgs

Provides event data for the DropCompleted event.

Equivalent WinUI class: Microsoft.UI.Xaml.DropCompletedEventArgs.

DurationHelper

Provides basic utility methods for processing Duration values. C# and Microsoft Visual Basic code should use methods of Duration instead.

Equivalent WinUI class: Microsoft.UI.Xaml.DurationHelper.

EffectiveViewportChangedEventArgs

Provides data for the FrameworkElement.EffectiveViewportChanged event.

Equivalent WinUI class: Microsoft.UI.Xaml.EffectiveViewportChangedEventArgs.

ElementFactoryGetArgs

Represents the optional arguments to use when calling an implementation of the IElementFactory 's GetElement method.

Equivalent WinUI class: Microsoft.UI.Xaml.ElementFactoryGetArgs.

ElementFactoryRecycleArgs

Represents the optional arguments to use when calling an implementation of the IElementFactory 's RecycleElement method.

Equivalent WinUI class: Microsoft.UI.Xaml.ElementFactoryRecycleArgs.

ElementSoundPlayer

Represents a player for XAML control sounds.

Equivalent WinUI class: Microsoft.UI.Xaml.ElementSoundPlayer.

EventTrigger

Represents a trigger that applies a set of actions (animation storyboards) in response to an event. Not commonly used. See Remarks.

Equivalent WinUI class: Microsoft.UI.Xaml.EventTrigger.

ExceptionRoutedEventArgs

Provides event data for exceptions that are raised as events by asynchronous operations, such as ImageFailed.

Equivalent WinUI class: Microsoft.UI.Xaml.ExceptionRoutedEventArgs.

FrameworkElement

Provides a base element class for Windows Runtime UI objects. FrameworkElement defines common API that support UI interaction and the automatic layout system. FrameworkElement  also defines API related to data binding, defining and examining the object tree, and tracking object lifetime.

Equivalent WinUI class: Microsoft.UI.Xaml.FrameworkElement.

FrameworkTemplate

Creates an element tree of elements. FrameworkTemplate is a base class for classes that have specific templating behavior, including ControlTemplate and DataTemplate.

Equivalent WinUI class: Microsoft.UI.Xaml.FrameworkTemplate.

FrameworkView

Represents the UI window of an application.

Equivalent WinUI class: Microsoft.UI.Xaml.FrameworkView.

FrameworkViewSource

Creates views, specifically FrameworkView instances. This is infrastructure and does not need to be accessed in most app scenarios.

Equivalent WinUI class: Microsoft.UI.Xaml.FrameworkViewSource.

GridLengthHelper

Provides helper methods to evaluate or set GridLength values. C# and Microsoft Visual Basic code should use methods of GridLength instead.

Equivalent WinUI class: Microsoft.UI.Xaml.GridLengthHelper.

MediaFailedRoutedEventArgs

Provides event data for media failed events.

Equivalent WinUI class: Microsoft.UI.Xaml.MediaFailedRoutedEventArgs.

PointHelper

Provides helper methods to set Point values. C# and Microsoft Visual Basic code should use methods of Point instead.

Equivalent WinUI class: Microsoft.UI.Xaml.PointHelper.

PropertyMetadata

Defines behavior aspects of a dependency property, including conditions it was registered with. For more info on how PropertyMetadata is used for dependency properties, see Custom dependency properties.

Equivalent WinUI class: Microsoft.UI.Xaml.PropertyMetadata.

PropertyPath

Implements a data structure for describing a property as a path below another property, or below an owning type. Property paths are used in data binding to objects.

Equivalent WinUI class: Microsoft.UI.Xaml.PropertyPath.

RectHelper

Provides helper methods to evaluate or set Rect values. C# and Microsoft Visual Basic code should use members of Rect instead.

Equivalent WinUI class: Microsoft.UI.Xaml.RectHelper.

ResourceDictionary

Defines a repository for XAML resources, such as styles, that your app uses. You define the resources in XAML and can then retrieve them in XAML using the {StaticResource} markup extension and {ThemeResource} markup extension s. You can also access resources with code, but that is less common.

Equivalent WinUI class: Microsoft.UI.Xaml.ResourceDictionary.

RoutedEvent

Represents a routed event to the Windows Runtime event system.

Equivalent WinUI class: Microsoft.UI.Xaml.RoutedEvent.

RoutedEventArgs

Contains state information and event data associated with a routed event.

Equivalent WinUI class: Microsoft.UI.Xaml.RoutedEventArgs.

ScalarTransition

Provides the animated transition behavior when an element's Opacity or Rotation properties change.

Equivalent WinUI class: Microsoft.UI.Xaml.ScalarTransition.

Setter

Applies a value to a property in a Style or a VisualState.

Equivalent WinUI class: Microsoft.UI.Xaml.Setter.

SetterBase

Represents the base class for value setters.

Equivalent WinUI class: Microsoft.UI.Xaml.SetterBase.

SetterBaseCollection

Represents a collection of objects that inherit from SetterBase.

Equivalent WinUI class: Microsoft.UI.Xaml.SetterBaseCollection.

SizeChangedEventArgs

Provides data related to the FrameworkElement.SizeChanged event.

Equivalent WinUI class: Microsoft.UI.Xaml.SizeChangedEventArgs.

SizeHelper

Provides helper methods to evaluate or set Size values. C# and Microsoft Visual Basic code should use members of Size instead.

Equivalent WinUI class: Microsoft.UI.Xaml.SizeHelper.

StateTrigger

Represents a trigger that applies visual states conditionally.

Equivalent WinUI class: Microsoft.UI.Xaml.StateTrigger.

StateTriggerBase

Represents the base class for state triggers.

Equivalent WinUI class: Microsoft.UI.Xaml.StateTriggerBase.

Style

Contains property setters that can be shared between instances of a type. A Style is usually declared in a resources collection so that it can be shared and used for applying control templates and other styles.

Equivalent WinUI class: Microsoft.UI.Xaml.Style.

StyleTypedPropertyAttribute

Represents an attribute that is applied to the class definition and determines the TargetTypes of the properties that are of type Style.

Equivalent WinUI class: Microsoft.UI.Xaml.StyleTypedPropertyAttribute.

TargetPropertyPath

Represents the path to a property on a target element.

Equivalent WinUI class: Microsoft.UI.Xaml.TargetPropertyPath.

TemplatePartAttribute

Represents an attribute that is applied to the class definition to identify the types of the named parts that are used for templating.

Equivalent WinUI class: Microsoft.UI.Xaml.TemplatePartAttribute.

TemplateVisualStateAttribute

Specifies that a control can be in a certain state and that a VisualState is expected in the control's ControlTemplate.

Equivalent WinUI class: Microsoft.UI.Xaml.TemplateVisualStateAttribute.

ThicknessHelper

Provides helper methods to evaluate or set Thickness values. C# and Microsoft Visual Basic code should use members of Thickness instead.

Equivalent WinUI class: Microsoft.UI.Xaml.ThicknessHelper.

TriggerAction

Serves as the base class for BeginStoryboard. Not commonly used. See Remarks.

Equivalent WinUI class: Microsoft.UI.Xaml.TriggerAction.

TriggerActionCollection

Represents a collection of BeginStoryboard objects.

Equivalent WinUI class: Microsoft.UI.Xaml.TriggerActionCollection.

TriggerBase

Serves as the base class for EventTrigger. Not commonly used. See Remarks.

Equivalent WinUI class: Microsoft.UI.Xaml.TriggerBase.

TriggerCollection

Represents a collection of EventTrigger objects.

Equivalent WinUI class: Microsoft.UI.Xaml.TriggerCollection.

UIElement

UIElement is a base class for most of the Windows Runtime UI objects that have visual appearance and can process basic input as part of your app's user interface.

Equivalent WinUI class: Microsoft.UI.Xaml.UIElement.

UIElementWeakCollection

Represents a collection of weak references to UIElement objects.

Equivalent WinUI class: Microsoft.UI.Xaml.UIElementWeakCollection.

UnhandledExceptionEventArgs

Provides data for the UnhandledException event.

Equivalent WinUI class: Microsoft.UI.Xaml.UnhandledExceptionEventArgs.

Vector3Transition

Provides the animated transition behavior when an element's Translation or Scale properties change.

Equivalent WinUI class: Microsoft.UI.Xaml.Vector3Transition.

VisualState

Represents the visual appearance of a UI element when it is in a specific state. Visual states use Setters or a Storyboard to set UI properties within pages or control templates where the VisualState is defined.

Equivalent WinUI class: Microsoft.UI.Xaml.VisualState.

VisualStateChangedEventArgs

Provides data for the CurrentStateChanging and CurrentStateChanged events.

Equivalent WinUI class: Microsoft.UI.Xaml.VisualStateChangedEventArgs.

VisualStateGroup

Contains mutually exclusive VisualState objects and VisualTransition objects that are used to go from one state to another.

Equivalent WinUI class: Microsoft.UI.Xaml.VisualStateGroup.

VisualStateManager

Manages visual states and the logic for transitions between visual states for controls. Also provides the attached property support for VisualStateManager.VisualStateGroups, which is how you define visual states in XAML for a control template.

Equivalent WinUI class: Microsoft.UI.Xaml.VisualStateManager.

VisualTransition

Represents the visual behavior that occurs when the control transitions from one visual state to another.

Equivalent WinUI class: Microsoft.UI.Xaml.VisualTransition.

Window

Represents an application window.

Equivalent WinUI class: Microsoft.UI.Xaml.Window.

WindowCreatedEventArgs

Provides data for the OnWindowCreated method.

Equivalent WinUI class: Microsoft.UI.Xaml.WindowCreatedEventArgs.

XamlRoot

Represents a tree of XAML content and information about the context in which it is hosted.

Equivalent WinUI class: Microsoft.UI.Xaml.XamlRoot.

XamlRootChangedEventArgs

Provides data for the XamlRoot.Changed event.

Equivalent WinUI class: Microsoft.UI.Xaml.XamlRootChangedEventArgs.

Structs

CornerRadius

Describes the characteristics of a rounded corner, such as can be applied to a Border.

Equivalent WinUI struct: CornerRadius.

Duration

Represents the duration of time that a Timeline is active, or more generally represents a duration of time that also supports two special values Automatic and Forever.

Equivalent WinUI struct: Duration.

GridLength

Represents a measurement for control logic that explicitly supports Star (*) sizing and Auto sizing.

Equivalent WinUI struct: GridLength.

Thickness

Describes the thickness of a frame around a rectangle. Four Double values describe the Left, Top, Right, and Bottom sides of the rectangle, respectively.

Equivalent WinUI struct: Thickness.

Interfaces

IDataTemplateExtension

Defines helper methods for phased rendering of a data template.

Equivalent WinUI interface: Microsoft.UI.Xaml.IDataTemplateExtension.

IElementFactory

Supports the creation and recycling of UIElement objects.

Equivalent WinUI interface: Microsoft.UI.Xaml.IElementFactory.

Enums

ApplicationHighContrastAdjustment

Defines constants that specify whether the framework automatically adjusts visual properties for the app when high contrast themes are enabled.

Equivalent WinUI enum: Microsoft.UI.Xaml.ApplicationHighContrastAdjustment.

ApplicationRequiresPointerMode

Specifies the interaction experiences for non-pointer devices such as an Xbox controller or remote control.

Equivalent WinUI enum: ApplicationRequiresPointerMode.

ApplicationTheme

Declares the theme preference for an app.

Equivalent WinUI enum: ApplicationTheme.

AutomationTextAttributesEnum

Defines constants that identify text attributes of a Microsoft UI Automation text range.

Equivalent WinUI enum: AutomationTextAttributesEnum.

DurationType

Declares whether a Duration has a special value of Automatic or Forever, or has valid information in its TimeSpan component.

Equivalent WinUI enum: DurationType.

ElementHighContrastAdjustment

Defines constants that specify whether the framework automatically adjusts visual properties for an element when high contrast themes are enabled.

Equivalent WinUI enum: Microsoft.UI.Xaml.ElementHighContrastAdjustment.

ElementSoundKind

Defines constants that specify the sound played by the ElementSoundPlayer.Play method.

Equivalent WinUI enum: ElementSoundKind.

ElementSoundMode

Defines constants that specify a control's preference for whether sounds are played.

Equivalent WinUI enum: ElementSoundMode.

ElementSoundPlayerState

Defines constants that specify whether XAML controls play sounds.

Equivalent WinUI enum: ElementSoundPlayerState.

ElementSpatialAudioMode

Defines constants that indicate whether spatial sound is on, off, or handled automatically.

Equivalent WinUI enum: Microsoft.UI.Xaml.ElementSpatialAudioMode.

ElementTheme

Specifies a UI theme that should be used for individual UIElement parts of an app UI.

Equivalent WinUI enum: ElementTheme.

FlowDirection

Defines constants that specify the content flow direction for text and UI elements.

Equivalent WinUI enum: FlowDirection.

FocusState

Describes how an element obtained focus.

Equivalent WinUI enum: FocusState.

FocusVisualKind

Specifies the visual feedback used to indicate the UI element with focus when navigating with a keyboard or gamepad.

Equivalent WinUI enum: FocusVisualKind.

FontCapitals

Describes the capital letter style value for the Typography.Capitals attached property.

Equivalent WinUI enum: FontCapitals.

FontEastAsianLanguage

Provides a mechanism for selecting font-specific versions of glyphs for a specified East Asian writing system or language.

Equivalent WinUI enum: FontEastAsianLanguage.

FontEastAsianWidths

Provides a mechanism for selecting glyphs of different width styles.

Equivalent WinUI enum: FontEastAsianWidths.

FontFraction

Describes a fraction style value for the Typography.Fraction attached property.

Equivalent WinUI enum: FontFraction.

FontNumeralAlignment

Describes the numeral alignment value for the Typography.NumeralAlignment attached property.

Equivalent WinUI enum: FontNumeralAlignment.

FontNumeralStyle

Describes a numeral style value for the Typography.NumeralStyle attached property.

Equivalent WinUI enum: FontNumeralStyle.

FontVariants

Describes a font variant value for the Typography.Variants attached property.

Equivalent WinUI enum: FontVariants.

GridUnitType

Describes the kind of value that a GridLength object is holding.

Equivalent WinUI enum: GridUnitType.

HorizontalAlignment

Indicates where an element should be displayed on the horizontal axis relative to the allocated layout slot of the parent element.

Equivalent WinUI enum: HorizontalAlignment.

LineStackingStrategy

Describes the mechanism by which a line box is determined for each line.

Equivalent WinUI enum: LineStackingStrategy.

OpticalMarginAlignment

Specifies how side bearing values in per-character typography are handled when aligning to a text container boundary.

Equivalent WinUI enum: OpticalMarginAlignment.

TextAlignment

Specifies whether text is centered, left-aligned, or right-aligned.

Equivalent WinUI enum: TextAlignment.

TextLineBounds

Influences how a line box height is calculated

Equivalent WinUI enum: TextLineBounds.

TextReadingOrder

Provides a value for TextReadingOrder properties.

Equivalent WinUI enum: TextReadingOrder.

TextTrimming

Describes how text is trimmed when it overflows the edge of its containing box.

Equivalent WinUI enum: TextTrimming.

TextWrapping

Specifies whether text wraps when it reaches the edge of its container.

Equivalent WinUI enum: TextWrapping.

Vector3TransitionComponents

Defines constants that specify which axes to animate during the Vector3Transition animation.

Equivalent WinUI enum: Microsoft.UI.Xaml.Vector3TransitionComponents.

VerticalAlignment

Describes how a child element is vertically positioned or stretched within a parent's layout slot.

Equivalent WinUI enum: VerticalAlignment.

Visibility

Specifies the display state of an element.

Equivalent WinUI enum: Visibility.

Delegates

ApplicationInitializationCallback

Represents the callback that should be invoked during the initialization sequence.

Equivalent WinUI delegate: Microsoft.UI.Xaml.ApplicationInitializationCallback.

BindingFailedEventHandler

Represents the method that will handle the DebugSettings.BindingFailed event.

Equivalent WinUI delegate: Microsoft.UI.Xaml.BindingFailedEventHandler.

CreateDefaultValueCallback

Represents the method that can be invoked as part of a PropertyMetadata constructor to defer definition of a dependency property default value.

Equivalent WinUI delegate: Microsoft.UI.Xaml.CreateDefaultValueCallback.

DependencyPropertyChangedCallback

Represents the callback that is invoked when a property value changes, for property change notifications that are registered with the RegisterPropertyChangedCallback technique.

Equivalent WinUI delegate: Microsoft.UI.Xaml.DependencyPropertyChangedCallback.

DependencyPropertyChangedEventHandler

Represents the method that will handle events that occur when a DependencyProperty is changed on a particular DependencyObject implementation.

Equivalent WinUI delegate: Microsoft.UI.Xaml.DependencyPropertyChangedEventHandler.

DragEventHandler

Represents the method that will handle the DragEnter, DragLeave, DragOver, and Drop events of a UIElement.

Equivalent WinUI delegate: Microsoft.UI.Xaml.DragEventHandler.

EnteredBackgroundEventHandler

Represents the method that will handle the Application.EnteredBackground event.

Equivalent WinUI delegate: Microsoft.UI.Xaml.EnteredBackgroundEventHandler.

ExceptionRoutedEventHandler

Represents the method that will handle certain events that report exceptions. These exceptions generally come from asynchronous operations.

Equivalent WinUI delegate: Microsoft.UI.Xaml.ExceptionRoutedEventHandler.

LeavingBackgroundEventHandler

Represents the method that will handle the Application.LeavingBackground event.

Equivalent WinUI delegate: Microsoft.UI.Xaml.LeavingBackgroundEventHandler.

PropertyChangedCallback

Represents the callback that is invoked when the effective property value of a dependency property changes.

Equivalent WinUI delegate: Microsoft.UI.Xaml.PropertyChangedCallback.

RoutedEventHandler

Represents the method that will handle routed events.

Equivalent WinUI delegate: Microsoft.UI.Xaml.RoutedEventHandler.

SizeChangedEventHandler

Represents the method that will handle the SizeChanged event.

Equivalent WinUI delegate: Microsoft.UI.Xaml.SizeChangedEventHandler.

SuspendingEventHandler

Represents the method that will handle the Suspending event.

Equivalent WinUI delegate: Microsoft.UI.Xaml.SuspendingEventHandler.

UnhandledExceptionEventHandler

Represents the method that will handle the UnhandledException event.

Equivalent WinUI delegate: Microsoft.UI.Xaml.UnhandledExceptionEventHandler.

VisualStateChangedEventHandler

Represents the method that will handle the CurrentStateChanging and CurrentStateChanged events.

Equivalent WinUI delegate: Microsoft.UI.Xaml.VisualStateChangedEventHandler.

WindowActivatedEventHandler

Represents the method that will handle the Activated event.

WindowClosedEventHandler

Represents the method that will handle the Closed event.

WindowSizeChangedEventHandler

Represents the method that will handle the Window.SizeChanged event.

WindowVisibilityChangedEventHandler

Represents the method that will handle the VisibilityChanged event.

See also