Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

System.Windows Namespace

Provides several important Windows Presentation Foundation (WPF) base element classes, various classes that support the WPF property system and event logic, and other types that are more broadly consumed by WPF core and framework.

Public classApplicationEncapsulates a Windows Presentation Foundation (WPF) application.
Public classAttachedPropertyBrowsableAttributeProvides a base class for .NET Framework attributes that report the use scope of attached properties.
Public classAttachedPropertyBrowsableForChildrenAttributeSpecifies that an attached property has a browsable scope that extends to child elements in the logical tree.
Public classAttachedPropertyBrowsableForTypeAttributeSpecifies that an attached property is browsable only for elements that derive from a specified type.
Public classAttachedPropertyBrowsableWhenAttributePresentAttributeSpecifies that an attached property is only browsable on an element that also has another specific  .NET Framework attribute applied to its class definition.
Public classAutoResizedEventArgsProvides data for the AutoResized event raised by an HwndSource.
Public classClipboardProvides static methods that facilitate transferring data to and from the system Clipboard.
Public classColorConvertedBitmapExtensionImplements a markup extension that enables ColorConvertedBitmap creation. A ColorConvertedBitmap does not have a embedded profile, the profile instead being based on source and destination values.
Public classComponentResourceKeyDefines or references resource keys based on class names in external assemblies, as well as an additional identifier.
Public classConditionRepresents a condition for the MultiTrigger and the MultiDataTrigger, which apply changes to property values based on a set of conditions. This class cannot be inherited.
Public classConditionCollectionRepresents a collection of Condition objects.
Public classContentElementProvides a WPF core-level base class for content elements. Content elements are designed for flow-style presentation, using an intuitive markup-oriented layout model and a deliberately simple object model.
Public classContentOperationsProvides static utility methods for getting or setting the position of a ContentElement in an element tree.
Public classCornerRadiusConverterConverts instances of other types to and from a CornerRadius.
Public classCultureInfoIetfLanguageTagConverterConverts instances of CultureInfo to and from other data types.
Public classDataFormatRepresents a data format as a format name and a numeric ID pair.
Public classDataFormatsProvides a set of predefined data format names that can be used to identify data formats available in the clipboard or drag-and-drop operations.
Public classDataObjectProvides a basic implementation of the IDataObject interface, which defines a format-independent mechanism for transferring data.
Public classDataObjectCopyingEventArgsArguments for the DataObject.Copying event.
Public classDataObjectEventArgsProvides an abstract base class for events associated with the DataObject class.
Public classDataObjectPastingEventArgsContains arguments for the DataObject.Pasting event.
Public classDataObjectSettingDataEventArgsContains arguments for the DataObject.SettingData event.
Public classDataTemplateDescribes the visual structure of a data object.
Public classDataTemplateKeyRepresents the resource key for the DataTemplate class.
Public classDataTriggerRepresents a trigger that applies property values or performs actions when the bound data meets a specified condition.
Public classDependencyObjectRepresents an object that participates in the dependency property system.
Public classDependencyObjectTypeImplements an underlying type cache for all DependencyObject derived types.
Public classDependencyPropertyRepresents a dependency property that is registered with the Windows Presentation Foundation (WPF) property system. Dependency properties provide support for value expressions, property invalidation and dependent-value coercion, default values, inheritance, data binding, animation, property change notification, and styling.
Public classDependencyPropertyHelperProvides a single helper method (GetValueSource) that reports the property system source for the effective value of a dependency property.
Public classDependencyPropertyKeyProvides a dependency property identifier for limited write access to a read-only dependency property.
Public classDialogResultConverterConverts the DialogResult property, which is a Nullable value of type Boolean, to and from other types.
Public classDragDropProvides helper methods and fields for initiating drag-and-drop operations, including a method to begin a drag-and-drop operation, and facilities for adding and removing drag-and-drop related event handlers.
Public classDragEventArgsContains arguments relevant to all drag-and-drop events (DragEnter, DragLeave, DragOver, and Drop).
Public classDurationConverterConverts instances of Duration to and from other type representations.
Public classDynamicResourceExtensionImplements a markup extension that supports dynamic resource references made from XAML.
Public classDynamicResourceExtensionConverterConverts from parsed XAML to DynamicResourceExtension and supports dynamic resource references made from XAML.
Public classEventManagerProvides event-related utility methods that register routed events for class owners and add class handlers.
Public classEventPrivateKeyProvides unique identification for events whose handlers are stored into an internal hashtable.
Public classEventRoute Represents the container for the route to be followed by a routed event.
Public classEventSetterRepresents an event setter in a style. Event setters invoke the specified event handlers in response to events.
Public classEventTriggerRepresents a trigger that applies a set of actions in response to an event.
Public classExceptionRoutedEventArgsProvides data for the Image and MediaElement failed events. This class cannot be inherited.
Public classExitEventArgsEvent arguments for the Exit event.
Public classExpressionThis type supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.
Public classExpressionConverterThis type supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.
Public classFigureLengthConverterConverts instances of other types to and from a FigureLength.
Public classFontSizeConverterConverts font size values to and from other type representations.
Public classFontStretchConverterConverts instances of FontStretch to and from other type representations.
Public classFontStretchesProvides a set of static predefined FontStretch values.
Public classFontStyleConverterConverts instances of FontStyle to and from other data types.
Public classFontStylesProvides a set of static predefined FontStyle values.
Public classFontWeightConverterConverts instances of FontWeight to and from other data types.
Public classFontWeightsProvides a set of static predefined FontWeight values.
Public classFrameworkContentElementFrameworkContentElement is the WPF framework-level implementation of the ContentElement base class. FrameworkContentElement adds support for additional input APIs (including tooltips and context menus), storyboards, data context for databinding, styles support, and logical tree helper APIs.
Public classFrameworkElementProvides a WPF framework-level set of properties, events, and methods for Windows Presentation Foundation (WPF) elements. This class represents the provided WPF framework-level implementation built on the WPF core-level APIs defined by UIElement.
Public classFrameworkElementFactorySupports the creation of templates.
Public classFrameworkPropertyMetadataReports or applies metadata for a dependency property, specifically adding framework-specific property system characteristics.
Public classFrameworkTemplateEnables the instantiation of a tree of FrameworkElement and/or FrameworkContentElement objects. This class is abstract.
Public classFreezableDefines an object that has a modifiable and a read-only (frozen) state. Classes that derive from Freezable provide detailed change notification, can be made immutable, and can clone themselves.
Public classFreezableCollectionRepresents a collection of DependencyObject, Freezable, or Animatable objects. FreezableCollection is itself an Animatable type.
Public classGiveFeedbackEventArgsContains arguments for the GiveFeedback event.
Public classGridLengthConverterConverts instances of other types to and from GridLength instances.
Public classHierarchicalDataTemplateRepresents a DataTemplate that supports HeaderedItemsControl, such as TreeViewItem or MenuItem.
Public classInt32RectConverterConverts instances of other types to and from an Int32Rect.
Public classKeySplineConverterConverts instances of other types to and from a KeySpline.
Public classKeyTimeConverterConverts instances of KeyTime to and from other types.
Public classLengthConverterConverts instances of other types to and from instances of a Double that represent an object's length.
Public classLocalizabilityAttributeSpecifies the localization attributes for a binary XAML (BAML) class or class member.
Public classLocalizationThe Localization class defines attached properties for localization attributes and comments.
Public classLogicalTreeHelperProvides static helper methods for logical tree element queries.
Public classLostFocusEventManagerProvides a WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the UIElement.LostFocus or ContentElement.LostFocus events.
Public classMediaScriptCommandRoutedEventArgsProvides data for the MediaElement.ScriptCommand and MediaPlayer.ScriptCommand events.
Public classMessageBoxDisplays a message box. This class cannot be inherited.
Public classMultiDataTriggerRepresents a trigger that applies property values or performs actions when the bound data meet a set of conditions.
Public classMultiTriggerRepresents a trigger that applies property values or performs actions when a set of conditions are satisfied.
Public classNameScopeImplements base support for the INameScope methods that store or retrieve name-object mappings into a particular namescope, and adds attached property support to make it simpler to get or set identifier namescope information dynamically at the element level..
Public classNullableBoolConverterConverts to and from the Nullable type (using the Boolean type constraint on the generic).
Public classPointConverterConverts instances of other types to and from a Point.
Public classPresentationSourceProvides an abstract base for classes that present content from another technology as part of an interoperation scenario. In addition, this class provides static methods for working with these sources, as well as the basic visual-layer presentation architecture.
Public classPropertyMetadataDefines certain behavior aspects of a dependency property as it is applied to a specific type, including conditions it was registered with.
Public classPropertyPathImplements 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, and in storyboards and timelines for animations.
Public classPropertyPathConverterProvides a type converter for PropertyPath objects.
Public classQueryContinueDragEventArgsContains arguments for the QueryContinueDrag event.
Public classRectConverterConverts instances of other types to and from instances of Rect.
Public classRequestBringIntoViewEventArgsProvides data for the FrameworkElement.RequestBringIntoView routed event.
Public classResourceDictionaryProvides a hashtable / dictionary implementation that contains WPF resources used by components and other elements of a WPF application.
Public classResourceKeyProvides an abstract base class for various resource keys.
Public classResourceReferenceKeyNotFoundExceptionAn exception that may be raised during parsing or serialization of markup extension resources.
Public classRoutedEventRepresents and identifies a routed event and declares its characteristics.
Public classRoutedEventArgsContains state information and event data associated with a routed event.
Public classRoutedPropertyChangedEventArgsProvides data about a change in value to a dependency property as reported by particular routed events, including the previous and current value of the property that changed.
Public classSessionEndingCancelEventArgsContains the event arguments for the SessionEnding event.
Public classSetterRepresents a setter that applies a property value.
Public classSetterBaseRepresents the base class for value setters. This class is abstract.
Public classSetterBaseCollectionRepresents a collection of SetterBase objects.
Public classSizeChangedEventArgsProvides data related to the SizeChanged event.
Public classSizeChangedInfoReport the specifics of a value change involving a Size. This is used as a parameter in OnRenderSizeChanged overrides.
Public classSizeConverterConverts instances of other types to and from instances of the Size class. This class cannot be inherited.
Public classSourceChangedEventArgsProvides data for the SourceChanged event, used for interoperation. This class cannot be inherited.
Public classStartupEventArgsContains the arguments for the StartupUri event.
Public classStaticResourceExtensionImplements a markup extension that supports static (load time) resource references made from XAML.
Public classStrokeCollectionConverterConverts a StrokeCollection to a string.
Public classStyleEnables the sharing of properties, resources, and event handlers between instances of a type.
Public classStyleTypedPropertyAttributeRepresents an attribute that is applied to the class definition and determines the TargetTypes of the properties that are of type Style. This class cannot be inherited.
Public classSystemColorsContains system colors, system brushes, and system resource keys that correspond to system display elements.
Public classSystemFontsContains properties that expose the system resources that concern fonts.
Public classSystemParametersContains properties that you can use to query system settings.
Public classTemplateBindingExpressionDescribes a run-time instance of a TemplateBindingExtension.
Public classTemplateBindingExpressionConverterA type converter that is used to construct a markup extension from a TemplateBindingExpression instance during serialization.
Public classTemplateBindingExtensionImplements a markup extension that supports the binding between the value of a property in a template and the value of some other exposed property on the templated control.
Public classTemplateBindingExtensionConverterA type converter that is used to construct a TemplateBindingExtension from an instance during serialization.
Public classTemplateKeyWhen used as a resource key for a data template, allows the data template to participate in the lookup process.
Public classTemplatePartAttributeRepresents an attribute that is applied to the class definition to identify the types of the named parts that are used for templating. This class cannot be inherited.
Public classTextDecorationA TextDecoration object is a visual ornamentation you can add to text. This class cannot be inherited.
Public classTextDecorationCollectionRepresents a collection of TextDecoration instances.
Public classTextDecorationCollectionConverterConverts instances of TextDecorationCollection from other data types.
Public classTextDecorationsProvides a set of static predefined text decorations.
Public classThemeDictionaryExtensionImplements a markup extension that enables application authors to customize control styles based on the current system theme.
Public classThemeInfoAttributeSpecifies the location in which theme dictionaries are stored for types in an assembly. This class cannot be inherited.
Public classThicknessConverterConverts instances of other types to and from instances of Thickness.
Public classTriggerRepresents a trigger that applies property values or performs actions conditionally.
Public classTriggerActionDescribes an action to perform for a trigger.
Public classTriggerActionCollectionRepresents a collection of TriggerAction objects. This class cannot be inherited.
Public classTriggerBaseRepresents the base class for specifying a conditional value within a Style object.
Public classTriggerCollectionRepresents a collection of TriggerBase objects.
Public classUIElementUIElement is a base class for WPF core level implementations building on Windows Presentation Foundation (WPF) elements and basic presentation characteristics.
Public classUIPropertyMetadata Provides property metadata for non-framework properties that do have rendering/user interface impact at the core level.
Public classVectorConverter Converts instances of other types to and from a Vector.
Public classWeakEventManagerProvides a base class for the event manager that is used in the WeakEvent pattern. The manager adds and removes listeners for events (or callbacks) that also use the pattern.
Public classWeakEventManager.ListenerListProvides a built-in collection list for storing listeners for a WeakEventManager.
Public classWindowProvides the ability to create, configure, show, and manage the lifetime of windows and dialog boxes.
Public classWindowCollectionRepresents a collection of Window objects. This class cannot be inherited.

Public interfaceIContentHostThis interface is implemented by layouts which host ContentElement.
Public interfaceIDataObjectProvides a format-independent mechanism for transferring data.
Public interfaceIFrameworkInputElementDeclares a namescope contract for framework elements.
Public interfaceIInputElementEstablishes the common events and also the event-related properties and methods for basic input processing by Windows Presentation Foundation (WPF) elements.
Public interfaceIWeakEventListenerProvides event listening support for classes that expect to receive events through the WeakEvent pattern and a WeakEventManager.

Public structureCornerRadius Represents the radii of a rectangle's corners.
Public structureDependencyPropertyChangedEventArgsProvides data for various property changed events. Typically these events report effective value changes in the value of a read-only dependency property. Another usage is as part of a PropertyChangedCallback implementation.
Public structureDurationRepresents the duration of time that a Timeline is active.
Public structureFigureLengthDescribes the height or width of a Figure.
Public structureFontStretchDescribes the degree to which a font has been stretched compared to a font's normal aspect ratio.
Public structureFontStyleDefines a structure that represents the style of a font face as normal, italic, or oblique.
Public structureFontWeightRefers to the density of a typeface, in terms of the lightness or heaviness of the strokes.
Public structureFreezableCollection.EnumeratorEnumerates the members of a FreezableCollection.
Public structureGridLengthRepresents the length of elements that explicitly support Star unit types.
Public structureInt32RectDescribes the width, height, and location of an integer rectangle.
Public structureLocalValueEntryRepresents a property identifier and the property value for a locally set dependency property.
Public structureLocalValueEnumeratorProvides enumeration support for the local values of any dependency properties that exist on a DependencyObject.
Public structurePointRepresents an x- and y-coordinate pair in two-dimensional space.
Public structureRectDescribes the width, height, and location of a rectangle.
Public structureRoutedEventHandlerInfoThis type supports the WPF infrastructure and is not intended to be used by your code.
Public structureSizeImplements a structure that is used to describe the Size of an object.
Public structureTextDecorationCollection.EnumeratorEnumerates TextDecoration items in a TextDecoration.
Public structureThicknessDescribes the thickness of a frame around a rectangle. Four Double values describe the Left, Top, Right, and Bottom sides of the rectangle, respectively.
Public structureValueSourceReports the information returned from DependencyPropertyHelper.GetValueSource.
Public structureVectorRepresents a displacement in 2-D space.

Public delegateAutoResizedEventHandlerRepresents the method that will handle the AutoResized event as raised by HwndSource.
Public delegateCoerceValueCallbackProvides a template for a method that is called whenever a dependency property value is being re-evaluated, or coercion is specifically requested.
Public delegateDataObjectCopyingEventHandlerRepresents a method that handles DataObject.Copying events.
Public delegateDataObjectPastingEventHandlerRepresents a method that handles DataObject.Pasting events.
Public delegateDataObjectSettingDataEventHandlerRepresents a method that handles DataObject.SettingData events.
Public delegateDependencyPropertyChangedEventHandler Represents the method that will handle the event raised when a DependencyProperty is changed on a DependencyObject.
Public delegateDragEventHandlerRepresents a method that handles drag-and-drop events (DragEnter, DragLeave, DragOver, and Drop).
Public delegateExitEventHandlerRepresents the method that handles the Exit event.
Public delegateGiveFeedbackEventHandlerRepresents a method that handles GiveFeedback events.
Public delegatePropertyChangedCallbackRepresents the callback that is invoked when the effective property value of a dependency property changes.
Public delegateQueryContinueDragEventHandlerRepresents a method that handles QueryContinueDrag events.
Public delegateRequestBringIntoViewEventHandlerRepresents the method that handles the FrameworkElement.RequestBringIntoView event.
Public delegateRoutedEventHandlerRepresents the delegate for handlers that receive routed events.
Public delegateRoutedPropertyChangedEventHandlerRepresents methods that handle various routed events that track property value changes.
Public delegateSessionEndingCancelEventHandlerRepresents the method that handles the SessionEnding event.
Public delegateSizeChangedEventHandlerRepresents the method that handles the SizeChanged event.
Public delegateSourceChangedEventHandlerRepresents the method that handles the SourceChanged event on specific listener elements.
Public delegateStartupEventHandlerRepresents the method that handles the Startup event.
Public delegateValidateValueCallbackRepresents a method used as a callback that validates the effective value of a dependency property.

Public enumerationBaselineAlignmentDescribes how the baseline for a text-based element is positioned on the vertical axis.
Public enumerationBaseValueSourceIdentifies the property system source of a particular dependency property value.
Public enumerationColumnSpaceDistributionDescribes how to distribute space in columnated flow content.
Public enumerationDragActionSpecifies how and if a drag-and-drop operation should continue.
Public enumerationDragDropEffectsSpecifies the effects of a drag-and-drop operation.
Public enumerationDragDropKeyStatesSpecifies the current state of the modifier keys (SHIFT, CTRL, and ALT), as well as the state of the mouse buttons.
Public enumerationFigureHorizontalAnchorDescribes a position reference for a figure in a horizontal direction.
Public enumerationFigureUnitTypeDescribes the unit type associated with the width or height of a FigureLength.
Public enumerationFigureVerticalAnchor Describes the point of reference of a figure in the vertical direction.
Public enumerationFlowDirectionDefines constants that specify the content flow direction for text and user interface (UI) elements.
Public enumerationFontCapitalsDescribes the capital letter style for a Typography object.
Public enumerationFontEastAsianLanguageProvides a mechanism for the user to select font-specific versions of glyphs for a specified East Asian writing system or language.
Public enumerationFontEastAsianWidthsProvides a mechanism for the user to select glyphs of different width styles.
Public enumerationFontFractionDescribes the fraction style for a Typography object.
Public enumerationFontNumeralAlignmentDescribes the numeral alignment for a Typography object.
Public enumerationFontNumeralStyleDescribes the numeral style for a Typography object.
Public enumerationFontVariantsRenders variant typographic glyph forms.
Public enumerationFrameworkPropertyMetadataOptionsSpecifies the types of framework-level property behavior that pertain to a particular dependency property in the Windows Presentation Foundation (WPF) property system.
Public enumerationGridUnitTypeDescribes the kind of value that a GridLength object is holding.
Public enumerationHorizontalAlignmentIndicates where an element should be displayed on the horizontal axis relative to the allocated layout slot of the parent element.
Public enumerationInheritanceBehaviorIndicates the current mode of lookup for both property value inheritance and resource lookup.
Public enumerationLineBreakConditionDescribes the breaking condition around an inline object.
Public enumerationLineStackingStrategy Describes a mechanism by which a line box is determined for each line.
Public enumerationLocalizationCategorySpecifies the category value of a LocalizabilityAttribute for a binary XAML (BAML) class or class member.
Public enumerationMessageBoxButtonSpecifies the buttons that are displayed on a message box. Used as an argument of the Show method.
Public enumerationMessageBoxImageSpecifies the icon that is displayed by a message box.
Public enumerationMessageBoxOptionsSpecifies special display options for a message box.
Public enumerationMessageBoxResultSpecifies which message box button that a user clicks. MessageBoxResult is returned by the Show method.
Public enumerationModifiabilitySpecifies the modifiability value of a LocalizabilityAttribute for a binary XAML (BAML) class or class member.
Public enumerationPowerLineStatusIndicates whether the system power is online, or that the system power status is unknown.
Public enumerationReadabilitySpecifies the readability value of a LocalizabilityAttribute for a binary XAML (BAML) class or class member.
Public enumerationReasonSessionEndingSpecifies the reason for which the user's session is ending. Used by the ReasonSessionEnding property.
Public enumerationResizeModeSpecifies whether a window can be resized and, if so, how it can be resized. Used by the ResizeMode property.
Public enumerationResourceDictionaryLocationSpecifies the locations where theme resource dictionaries are located.
Public enumerationRoutingStrategyIndicates the routing strategy of a routed event.
Public enumerationShutdownModeSpecifies how an application will shutdown. Used by the ShutdownMode property.
Public enumerationSizeToContentSpecifies how a window will automatically size itself to fit the size of its content. Used by the SizeToContent property.
Public enumerationTemplateKey.TemplateTypeDescribes the different types of templates that use TemplateKey.
Public enumerationTextAlignmentSpecifies whether the text in the object is left-aligned, right-aligned, centered, or justified.
Public enumerationTextDataFormatSpecifies the data format of the text data.
Public enumerationTextDecorationLocationSpecifies the vertical position of a TextDecoration object.
Public enumerationTextDecorationUnitSpecifies the unit type of a TextDecoration pen offset or pen thickness value.
Public enumerationTextMarkerStyleDescribes the appearance of a list item's bullet style.
Public enumerationTextTrimmingDescribes how text is trimmed when it overflows the edge of its containing box.
Public enumerationTextWrapping Specifies whether text wraps when it reaches the edge of the containing box
Public enumerationVerticalAlignmentDescribes how a child element is vertically positioned or stretched within a parent's layout slot.
Public enumerationVisibilitySpecifies the display state of an element.
Public enumerationWindowStartupLocationSpecifies the position that a window will be shown in when it is first opened. Used by the WindowStartupLocation property.
Public enumerationWindowStateSpecifies whether a window is minimized, maximized, or restored. Used by the WindowState property.
Public enumerationWindowStyleSpecifies the type of border that a Window has. Used by the WindowStyle property.
Public enumerationWrapDirectionSpecifies the allowable directions that content can wrap around an object.
© 2018 Microsoft