Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
5526 lines (4816 sloc) 409 KB
<Type Name="FrameworkElement" FullName="System.Windows.FrameworkElement">
<TypeSignature Language="C#" Value="public class FrameworkElement : System.Windows.UIElement, System.ComponentModel.ISupportInitialize, System.Windows.IFrameworkInputElement, System.Windows.Markup.IQueryAmbient" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi FrameworkElement extends System.Windows.UIElement implements class System.ComponentModel.ISupportInitialize, class System.Windows.IFrameworkInputElement, class System.Windows.IInputElement, class System.Windows.Markup.IQueryAmbient" />
<TypeSignature Language="DocId" Value="T:System.Windows.FrameworkElement" />
<TypeSignature Language="VB.NET" Value="Public Class FrameworkElement&#xA;Inherits UIElement&#xA;Implements IFrameworkInputElement, IQueryAmbient, ISupportInitialize" />
<TypeSignature Language="C++ CLI" Value="public ref class FrameworkElement : System::Windows::UIElement, System::ComponentModel::ISupportInitialize, System::Windows::IFrameworkInputElement, System::Windows::Markup::IQueryAmbient" />
<TypeSignature Language="F#" Value="type FrameworkElement = class&#xA; inherit UIElement&#xA; interface IFrameworkInputElement&#xA; interface IInputElement&#xA; interface ISupportInitialize&#xA; interface IQueryAmbient" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.UIElement</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitialize</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.IFrameworkInputElement</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.IInputElement</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Markup.IQueryAmbient</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Markup.RuntimeNameProperty("Name")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Markup.UsableDuringInitialization(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Markup.XmlLangProperty("Language")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=typeof(System.Windows.Controls.Control))</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides 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 that is built on the WPF core-level APIs that are defined by <see cref="T:System.Windows.UIElement" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.FrameworkElement> is the connecting point between WPF framework-level element classes and the WPF core-level set of <xref:System.Windows.UIElement> presentation services. For more information about these concepts, see [WPF Architecture](~/docs/framework/wpf/advanced/wpf-architecture.md).
<xref:System.Windows.FrameworkElement> extends <xref:System.Windows.UIElement> and adds the following capabilities:
- **Layout system definition**: <xref:System.Windows.FrameworkElement> provides specific WPF framework-level implementations for certain methods that were defined as virtual members in <xref:System.Windows.UIElement>. Most notably, <xref:System.Windows.FrameworkElement> seals certain WPF core-level layout overrides, and instead provides a WPF framework-level equivalent that derived classes should override instead. For example, <xref:System.Windows.FrameworkElement> seals <xref:System.Windows.UIElement.ArrangeCore%2A> but provides <xref:System.Windows.FrameworkElement.ArrangeOverride%2A>. These changes reflect the fact that at the WPF framework-level there is a full layout system in place that can render any <xref:System.Windows.FrameworkElement> derived class. At the WPF core level, certain members that will structure a general [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] based layout solution are in place, but the actual engine of the layout system is not defined. For more information, see [Layout](~/docs/framework/wpf/advanced/layout.md).
- **The logical tree:** The general [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] programming model is often expressed in terms of being a tree of elements. Support for expressing the tree of elements as a logical tree, and accompanying support for defining that tree in markup is implemented at the <xref:System.Windows.FrameworkElement> level. Note however that <xref:System.Windows.FrameworkElement> deliberately does not define a content model, and leaves that responsibility to derived classes. For more information, see [Trees in WPF](~/docs/framework/wpf/advanced/trees-in-wpf.md).
- **Object lifetime events:** It is often useful to know when an element is initialized (the constructor is called) or when the element is first loaded into a logical tree. <xref:System.Windows.FrameworkElement> defines several events related to object lifetime that provide useful hooks for code-behind operations that involve elements, such as adding more child elements. For more information, see [Object Lifetime Events](~/docs/framework/wpf/advanced/object-lifetime-events.md).
- **Support for data binding and dynamic resource references:** The property-level support for data binding and resources is implemented by the <xref:System.Windows.DependencyProperty> class and embodied in the property system, but the ability to resolve a member value that is stored as an <xref:System.Windows.Expression> (the programming construct that underlies both data binding and dynamic resources) is implemented by <xref:System.Windows.FrameworkElement>. For more information, see [Data Binding Overview](~/docs/framework/wpf/data/data-binding-overview.md) and [XAML Resources](~/docs/framework/wpf/advanced/xaml-resources.md).
- **Styles:** <xref:System.Windows.FrameworkElement> defines the <xref:System.Windows.FrameworkElement.Style%2A> property. However, <xref:System.Windows.FrameworkElement> does not yet define support for templates, or support decorators. These features are introduced by control classes such as <xref:System.Windows.Controls.Control> and <xref:System.Windows.Controls.ContentControl>.
- **More animation support:** Some animation support was already defined at the WPF core level, but <xref:System.Windows.FrameworkElement> extends this by implementing <xref:System.Windows.FrameworkElement.BeginStoryboard%2A> and related members.
As can be seen from the class hierarchy, many [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] classes derive from <xref:System.Windows.FrameworkElement>, either directly or through intermediate base classes such as <xref:System.Windows.Controls.Panel> or <xref:System.Windows.Controls.Control>.
If you intend to use <xref:System.Windows.FrameworkElement> as a base class, you might want to first examine the existing derived classes. <xref:System.Windows.FrameworkElement> provides support for a number of basic scenarios, but also lacks a number of features that are desirable for an "element" in the sense of a building block that you use to create [!INCLUDE[TLA#tla_ui](~/includes/tlasharptla-ui-md.md)] in [!INCLUDE[TLA#tla_xaml](~/includes/tlasharptla-xaml-md.md)]. For instance, a <xref:System.Windows.FrameworkElement> does not define any true content model; <xref:System.Windows.FrameworkElement> as a base class does not define a property that can create [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] child elements. In particular, you might want to look at <xref:System.Windows.Controls.Control> and <xref:System.Windows.Controls.ContentControl>.
]]></format>
</remarks>
<altmember cref="T:System.Windows.DependencyObject" />
<altmember cref="T:System.Windows.FrameworkContentElement" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public FrameworkElement ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; FrameworkElement();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.FrameworkElement" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ActualHeight">
<MemberSignature Language="C#" Value="public double ActualHeight { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 ActualHeight" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.ActualHeight" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ActualHeight As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property double ActualHeight { double get(); };" />
<MemberSignature Language="F#" Value="member this.ActualHeight : double" Usage="System.Windows.FrameworkElement.ActualHeight" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the rendered height of this element.</summary>
<value>The element's height, as a value in [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]. The default value is 0 (zero).</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is a calculated value based on other height inputs, and the layout system. The value is set by the layout system itself, based on an actual rendering pass, and may therefore lag slightly behind the set value of properties such as <xref:System.Windows.FrameworkElement.Height%2A> that are the basis of the input change.
Because <xref:System.Windows.FrameworkElement.ActualHeight%2A> is a calculated value, you should be aware that there could be multiple or incremental reported changes to it as a result of various operations by the layout system. The layout system may be calculating required measure space for child elements, constraints by the parent element, and so on.
Although you cannot set this property from [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)], you can base a <xref:System.Windows.Trigger> upon its value in a style.
<a name="dependencyPropertyInfo_ActualHeight"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.ActualHeightProperty>|
|Metadata properties set to `true`|None|
## Examples
The following example displays various height properties.
[!code-csharp[HeightMinHeightMaxHeight#3](~/samples/snippets/csharp/VS_Snippets_Wpf/HeightMinHeightMaxHeight/CSharp/Window1.xaml.cs#3)]
[!code-vb[HeightMinHeightMaxHeight#3](~/samples/snippets/visualbasic/VS_Snippets_Wpf/HeightMinHeightMaxHeight/VisualBasic/Window1.xaml.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ActualHeightProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty ActualHeightProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty ActualHeightProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.ActualHeightProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly ActualHeightProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ ActualHeightProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable ActualHeightProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.ActualHeightProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.ActualHeight" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ActualWidth">
<MemberSignature Language="C#" Value="public double ActualWidth { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 ActualWidth" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.ActualWidth" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ActualWidth As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property double ActualWidth { double get(); };" />
<MemberSignature Language="F#" Value="member this.ActualWidth : double" Usage="System.Windows.FrameworkElement.ActualWidth" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the rendered width of this element.</summary>
<value>The element's width, as a value in [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]. The default value is 0 (zero).</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is a calculated value based on other width inputs, and the layout system. The value is set by the layout system itself, based on an actual rendering pass, and may therefore lag slightly behind the set value of properties such as <xref:System.Windows.FrameworkElement.Width%2A> that are the basis of the input change.
Because <xref:System.Windows.FrameworkElement.ActualWidth%2A> is a calculated value, you should be aware that there could be multiple or incremental reported changes to it as a result of various operations by the layout system. The layout system may be calculating required measure space for child elements, constraints by the parent element, and so on.
Although you cannot set this property from [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)], you can base a <xref:System.Windows.Trigger> upon its value in a style.
<a name="dependencyPropertyInfo_ActualWidth"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.ActualWidthProperty>|
|Metadata properties set to `true`|None|
## Examples
The following example displays various width properties.
[!code-csharp[WidthMinWidthMaxWidth#3](~/samples/snippets/csharp/VS_Snippets_Wpf/WidthMinWidthMaxWidth/CSharp/Window1.xaml.cs#3)]
[!code-vb[WidthMinWidthMaxWidth#3](~/samples/snippets/visualbasic/VS_Snippets_Wpf/WidthMinWidthMaxWidth/VisualBasic/Window1.xaml.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ActualWidthProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty ActualWidthProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty ActualWidthProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.ActualWidthProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly ActualWidthProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ ActualWidthProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable ActualWidthProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.ActualWidthProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.ActualWidth" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddLogicalChild">
<MemberSignature Language="C#" Value="protected internal void AddLogicalChild (object child);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance void AddLogicalChild(object child) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.AddLogicalChild(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Sub AddLogicalChild (child As Object)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; void AddLogicalChild(System::Object ^ child);" />
<MemberSignature Language="F#" Value="member this.AddLogicalChild : obj -&gt; unit" Usage="frameworkElement.AddLogicalChild child" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="child" Type="System.Object" />
</Parameters>
<Docs>
<param name="child">Child element to be added.</param>
<summary>Adds the provided object to the logical tree of this element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method for the implementation of collections on objects that represent logical child elements of an element. Collection maintenance for child element collections might be done in property getters or setters, class handling of Changed events, constructors, or within the collection types themselves.
For control authors, manipulating the logical tree at this level is not the recommended practice, unless none of the content models for available base control classes are appropriate for your control scenario. Consider subclassing at the level of <xref:System.Windows.Controls.ContentControl>, <xref:System.Windows.Controls.ItemsControl>, and <xref:System.Windows.Controls.HeaderedItemsControl>. These classes provide a content model with particular enforcement of logical tree child elements through dedicated [!INCLUDE[TLA2#tla_api#plural](~/includes/tla2sharptla-apisharpplural-md.md)], as well as support for other features typically desirable in a [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] control such as styling through templates. For more information on how to use <xref:System.Windows.FrameworkElement.LogicalChildren%2A> and <xref:System.Windows.FrameworkElement.AddLogicalChild%2A>, see [Trees in WPF](~/docs/framework/wpf/advanced/trees-in-wpf.md).
<xref:System.Windows.FrameworkElement.AddLogicalChild%2A> may throw an exception if called at a time when the logical tree is being iterated by another process.
## Examples
The following example implements a `Child` property on a custom <xref:System.Windows.FrameworkElement> that does its own visual layer implementation. The property setter is designed so that if the value changes, the old value is removed from the logical tree, as well as a class-specific visual collection. The property value is cached, and then the new value is added to both the logical tree and the custom visual collection.
[!code-csharp[CompositionTargetRenderingAnimations#AddRemoveLogicalChild](~/samples/snippets/csharp/VS_Snippets_Wpf/CompositionTargetRenderingAnimations/CSharp/ParticleEffectExamples/OverlayRenderDecorator.cs#addremovelogicalchild)]
[!code-vb[CompositionTargetRenderingAnimations#AddRemoveLogicalChild](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CompositionTargetRenderingAnimations/visualbasic/particleeffectexamples/overlayrenderdecorator.vb#addremovelogicalchild)]
]]></format>
</remarks>
<altmember cref="M:System.Windows.FrameworkElement.RemoveLogicalChild(System.Object)" />
</Docs>
</Member>
<Member MemberName="ApplyTemplate">
<MemberSignature Language="C#" Value="public bool ApplyTemplate ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool ApplyTemplate() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.ApplyTemplate" />
<MemberSignature Language="VB.NET" Value="Public Function ApplyTemplate () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool ApplyTemplate();" />
<MemberSignature Language="F#" Value="member this.ApplyTemplate : unit -&gt; bool" Usage="frameworkElement.ApplyTemplate " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Builds the current template's visual tree if necessary, and returns a value that indicates whether the visual tree was rebuilt by this call.</summary>
<returns>
<see langword="true" /> if visuals were added to the tree; returns <see langword="false" /> otherwise.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applications can call this method to guarantee that the visual tree of an element is complete. This guarantee step might be necessary if code will be checking the child elements in the tree. For typical element logic within applications, calling <xref:System.Windows.FrameworkElement.ApplyTemplate%2A> is not necessary, because templates will be applied to elements at an appropriate point in their lifetimes automatically.
<xref:System.Windows.FrameworkElement.ApplyTemplate%2A> is called on every Measure pass by the WPF framework-level layout system.
<xref:System.Windows.FrameworkElement> derived classes can use the <xref:System.Windows.FrameworkElement.OnApplyTemplate%2A> class handler to be notified of cases where this method was called explicitly, or by the layout system. <xref:System.Windows.FrameworkElement.OnApplyTemplate%2A> is called after the template is completely generated and attached to the logical tree.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.ControlTemplate" />
</Docs>
</Member>
<Member MemberName="ArrangeCore">
<MemberSignature Language="C#" Value="protected override sealed void ArrangeCore (System.Windows.Rect finalRect);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void ArrangeCore(valuetype System.Windows.Rect finalRect) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides NotOverridable Sub ArrangeCore (finalRect As Rect)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void ArrangeCore(System::Windows::Rect finalRect);" />
<MemberSignature Language="F#" Value="override this.ArrangeCore : System.Windows.Rect -&gt; unit" Usage="frameworkElement.ArrangeCore finalRect" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="finalRect" Type="System.Windows.Rect" />
</Parameters>
<Docs>
<param name="finalRect">The final area within the parent that this element should use to arrange itself and its children.</param>
<summary>Implements <see cref="M:System.Windows.UIElement.ArrangeCore(System.Windows.Rect)" /> (defined as virtual in <see cref="T:System.Windows.UIElement" />) and seals the implementation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is sealed. In order to override the logic in your custom element specifically for the arrange pass of element layout, your <xref:System.Windows.FrameworkElement> derived class must override <xref:System.Windows.FrameworkElement.ArrangeOverride%2A>.
]]></format>
</remarks>
<altmember cref="M:System.Windows.UIElement.Arrange(System.Windows.Rect)" />
</Docs>
</Member>
<Member MemberName="ArrangeOverride">
<MemberSignature Language="C#" Value="protected virtual System.Windows.Size ArrangeOverride (System.Windows.Size finalSize);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance valuetype System.Windows.Size ArrangeOverride(valuetype System.Windows.Size finalSize) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.ArrangeOverride(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function ArrangeOverride (finalSize As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual System::Windows::Size ArrangeOverride(System::Windows::Size finalSize);" />
<MemberSignature Language="F#" Value="abstract member ArrangeOverride : System.Windows.Size -&gt; System.Windows.Size&#xA;override this.ArrangeOverride : System.Windows.Size -&gt; System.Windows.Size" Usage="frameworkElement.ArrangeOverride finalSize" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="finalSize" Type="System.Windows.Size" />
</Parameters>
<Docs>
<param name="finalSize">The final area within the parent that this element should use to arrange itself and its children.</param>
<summary>When overridden in a derived class, positions child elements and determines a size for a <see cref="T:System.Windows.FrameworkElement" /> derived class.</summary>
<returns>The actual size used.</returns>
<remarks>To be added.</remarks>
<block subset="none" type="overrides">
<para>Control authors who want to customize the arrange pass of layout processing should override this method. The implementation pattern should call <see cref="M:System.Windows.UIElement.Arrange(System.Windows.Rect)" /> on each visible child element, and pass the final desired size for each child element as the <paramref name="finalRect" /> parameter. Parent elements should call <see cref="M:System.Windows.UIElement.Arrange(System.Windows.Rect)" /> on each child, otherwise the child elements will not be rendered.
Many derived classes offer implementations of this method. Prominent ones include: <see cref="M:System.Windows.Window.ArrangeOverride(System.Windows.Size)" />, <see cref="M:System.Windows.Controls.Page.ArrangeOverride(System.Windows.Size)" /> and <see cref="M:System.Windows.Controls.Control.ArrangeOverride(System.Windows.Size)" />.</para>
</block>
<altmember cref="M:System.Windows.UIElement.Arrange(System.Windows.Rect)" />
</Docs>
</Member>
<Member MemberName="BeginInit">
<MemberSignature Language="C#" Value="public virtual void BeginInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void BeginInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.BeginInit" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub BeginInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void BeginInit();" />
<MemberSignature Language="F#" Value="abstract member BeginInit : unit -&gt; unit&#xA;override this.BeginInit : unit -&gt; unit" Usage="frameworkElement.BeginInit " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.BeginInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Starts the initialization process for this element.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can call this method on individual elements if you are adjusting them in ways that do not yet expose or connect the element to any element tree. For instance, you might have created a new <xref:System.Windows.FrameworkElement>, but have not yet attached it to any logical tree. Or, the logical tree where your element is a child element within it might not be connected to a window or page of the application.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>Implement this method to provide special handling that should happen before your element is initialized during the element loading process.
Your implementation should call the base implementation, because the base (default) implementation sets some internal flags to keep track of initialization. One possible implementation is to use this method as a hook into your own private class initialization routines that are not already enabled by constructors.
The base implementation will throw an exception if <see cref="M:System.Windows.FrameworkElement.BeginInit" /> is called more than one time on the same element prior to <see cref="M:System.Windows.FrameworkElement.EndInit" /> being called.</para>
</block>
<altmember cref="M:System.Windows.FrameworkElement.EndInit" />
</Docs>
</Member>
<MemberGroup MemberName="BeginStoryboard">
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Begins the sequence of actions contained in the provided storyboard.</summary>
</Docs>
</MemberGroup>
<Member MemberName="BeginStoryboard">
<MemberSignature Language="C#" Value="public void BeginStoryboard (System.Windows.Media.Animation.Storyboard storyboard);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void BeginStoryboard(class System.Windows.Media.Animation.Storyboard storyboard) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.BeginStoryboard(System.Windows.Media.Animation.Storyboard)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void BeginStoryboard(System::Windows::Media::Animation::Storyboard ^ storyboard);" />
<MemberSignature Language="F#" Value="member this.BeginStoryboard : System.Windows.Media.Animation.Storyboard -&gt; unit" Usage="frameworkElement.BeginStoryboard storyboard" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="storyboard" Type="System.Windows.Media.Animation.Storyboard" />
</Parameters>
<Docs>
<param name="storyboard">The storyboard to begin.</param>
<summary>Begins the sequence of actions that are contained in the provided storyboard.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Most typical animation scenarios do not use this method. Typically, you create the <xref:System.Windows.Media.Animation.Storyboard> or <xref:System.Windows.Media.Animation.BeginStoryboard> element in markup, and then you place these as the <xref:System.Windows.EventTrigger> content on an element. When triggered by the event, the animation then runs. Most of the control aspects of a <xref:System.Windows.Media.Animation.Storyboard> can be addressed by properties that are exposed in markup.
For the signatures that do not use the `isControllable`, parameter, or when that parameter is specified `false`, the timeline clocks that are associated with the animation are removed as soon as the animation reaches the "Fill" period. Therefore the animation cannot be restarted after running once. Controlling an animation also requires that the storyboard have an [x:Name Directive](~/docs/framework/xaml-services/x-name-directive.md) or be accessible by reference in code.
## Examples
The following example retrieves a <xref:System.Windows.Media.Animation.Storyboard> from resources, and then runs that <xref:System.Windows.Media.Animation.Storyboard> when an internal event is class handled.
[!code-csharp[CubeAnimation#FEBeginStoryboard](~/samples/snippets/csharp/VS_Snippets_Wpf/CubeAnimation/CSharp/Page1.xaml.cs#febeginstoryboard)]
[!code-vb[CubeAnimation#FEBeginStoryboard](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CubeAnimation/visualbasic/page1.xaml.vb#febeginstoryboard)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BeginStoryboard">
<MemberSignature Language="C#" Value="public void BeginStoryboard (System.Windows.Media.Animation.Storyboard storyboard, System.Windows.Media.Animation.HandoffBehavior handoffBehavior);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void BeginStoryboard(class System.Windows.Media.Animation.Storyboard storyboard, valuetype System.Windows.Media.Animation.HandoffBehavior handoffBehavior) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.BeginStoryboard(System.Windows.Media.Animation.Storyboard,System.Windows.Media.Animation.HandoffBehavior)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void BeginStoryboard(System::Windows::Media::Animation::Storyboard ^ storyboard, System::Windows::Media::Animation::HandoffBehavior handoffBehavior);" />
<MemberSignature Language="F#" Value="member this.BeginStoryboard : System.Windows.Media.Animation.Storyboard * System.Windows.Media.Animation.HandoffBehavior -&gt; unit" Usage="frameworkElement.BeginStoryboard (storyboard, handoffBehavior)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="storyboard" Type="System.Windows.Media.Animation.Storyboard" />
<Parameter Name="handoffBehavior" Type="System.Windows.Media.Animation.HandoffBehavior" />
</Parameters>
<Docs>
<param name="storyboard">The storyboard to begin.</param>
<param name="handoffBehavior">A value of the enumeration that describes behavior to use if a property described in the storyboard is already animated.</param>
<summary>Begins the sequence of actions contained in the provided storyboard, with options specified for what should happen if the property is already animated.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Most typical animation scenarios do not use this method. Typically, you create the <xref:System.Windows.Media.Animation.Storyboard> or <xref:System.Windows.Media.Animation.BeginStoryboard> element in markup, and then you place these as the <xref:System.Windows.EventTrigger> content on an element. When triggered by the event, the animation then runs. Most of the control aspects of a <xref:System.Windows.Media.Animation.Storyboard> can be addressed by properties that are exposed in markup.
For the signatures that do not use the `isControllable`, parameter, or when that parameter is specified `false`, the timeline clocks that are associated with the animation are removed as soon as the animation reaches the "Fill" period. Therefore the animation cannot be restarted after running once. Controlling an animation also requires that the storyboard have an [x:Name Directive](~/docs/framework/xaml-services/x-name-directive.md) or be accessible by reference in code.
Handoff behavior can be specified as an attribute of <xref:System.Windows.Media.Animation.BeginStoryboard>.
## Using the Compose HandoffBehavior
When you apply a <xref:System.Windows.Media.Animation.Storyboard>, <xref:System.Windows.Media.Animation.AnimationTimeline>, or <xref:System.Windows.Media.Animation.AnimationClock> to a property by using the <xref:System.Windows.Media.Animation.HandoffBehavior.Compose> <xref:System.Windows.Media.Animation.HandoffBehavior>, any <xref:System.Windows.Media.Animation.Clock> objects previously associated with that property continue to consume system resources; the timing system does not remove the clocks automatically.
To avoid performance issues when you apply a large number of clocks by using <xref:System.Windows.Media.Animation.HandoffBehavior.Compose>, you should remove composing clocks from the animated property after they complete. There are several ways to remove a clock:
- To remove all clocks from a property, use the <xref:System.Windows.Media.Animation.Animatable.ApplyAnimationClock%28System.Windows.DependencyProperty%2CSystem.Windows.Media.Animation.AnimationClock%29> or <xref:System.Windows.Media.Animation.Animatable.BeginAnimation%28System.Windows.DependencyProperty%2CSystem.Windows.Media.Animation.AnimationTimeline%29> method of the animated object. Specify the property being animated as the first parameter, and `null` as the second. This removes all animation clocks from the property.
- To remove a specific <xref:System.Windows.Media.Animation.AnimationClock> from a list of clocks, use the <xref:System.Windows.Media.Animation.Clock.Controller%2A> property of the <xref:System.Windows.Media.Animation.AnimationClock> to retrieve a <xref:System.Windows.Media.Animation.ClockController>, then call the <xref:System.Windows.Media.Animation.ClockController.Remove%2A> method of the <xref:System.Windows.Media.Animation.ClockController>. This is typically done in the <xref:System.Windows.Media.Animation.Clock.Completed> event handler for a clock. Note that only root clocks can be controlled by a <xref:System.Windows.Media.Animation.ClockController>; the <xref:System.Windows.Media.Animation.Clock.Controller%2A> property of a child clock returns `null`. Note also that the <xref:System.Windows.Media.Animation.Clock.Completed> event is not raised if the effective duration of the clock is forever. In that case, the user must determine when to call <xref:System.Windows.Media.Animation.ClockController.Remove%2A>.
This is primarily an issue for animations on objects that have a long lifetime. When an object is garbage collected, its clocks are also disconnected and garbage collected.
For more information about clock objects, see [Animation and Timing System Overview](~/docs/framework/wpf/graphics-multimedia/animation-and-timing-system-overview.md).
## Examples
The following example retrieves a <xref:System.Windows.Media.Animation.Storyboard> from resources, and then runs that <xref:System.Windows.Media.Animation.Storyboard> when an internal event is class handled.
[!code-csharp[CubeAnimation#FEBeginStoryboard](~/samples/snippets/csharp/VS_Snippets_Wpf/CubeAnimation/CSharp/Page1.xaml.cs#febeginstoryboard)]
[!code-vb[CubeAnimation#FEBeginStoryboard](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CubeAnimation/visualbasic/page1.xaml.vb#febeginstoryboard)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BeginStoryboard">
<MemberSignature Language="C#" Value="public void BeginStoryboard (System.Windows.Media.Animation.Storyboard storyboard, System.Windows.Media.Animation.HandoffBehavior handoffBehavior, bool isControllable);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void BeginStoryboard(class System.Windows.Media.Animation.Storyboard storyboard, valuetype System.Windows.Media.Animation.HandoffBehavior handoffBehavior, bool isControllable) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.BeginStoryboard(System.Windows.Media.Animation.Storyboard,System.Windows.Media.Animation.HandoffBehavior,System.Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void BeginStoryboard(System::Windows::Media::Animation::Storyboard ^ storyboard, System::Windows::Media::Animation::HandoffBehavior handoffBehavior, bool isControllable);" />
<MemberSignature Language="F#" Value="member this.BeginStoryboard : System.Windows.Media.Animation.Storyboard * System.Windows.Media.Animation.HandoffBehavior * bool -&gt; unit" Usage="frameworkElement.BeginStoryboard (storyboard, handoffBehavior, isControllable)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="storyboard" Type="System.Windows.Media.Animation.Storyboard" />
<Parameter Name="handoffBehavior" Type="System.Windows.Media.Animation.HandoffBehavior" />
<Parameter Name="isControllable" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="storyboard">The storyboard to begin.</param>
<param name="handoffBehavior">A value of the enumeration that describes behavior to use if a property described in the storyboard is already animated.</param>
<param name="isControllable">Declares whether the animation is controllable (can be paused) after it is started.</param>
<summary>Begins the sequence of actions contained in the provided storyboard, with specified state for control of the animation after it is started.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Most typical animation scenarios do not use this method. Typically, you create the <xref:System.Windows.Media.Animation.Storyboard> or <xref:System.Windows.Media.Animation.BeginStoryboard> element in markup, and then you place these as the <xref:System.Windows.EventTrigger> content on an element. When triggered by the event, the animation then runs. Most of the control aspects of a <xref:System.Windows.Media.Animation.Storyboard> can be addressed by properties that are exposed in markup.
For the signatures that do not use the `isControllable`, parameter, or when that parameter is specified `false`, the timeline clocks that are associated with the animation are removed as soon as the animation reaches the "Fill" period. Therefore the animation cannot be restarted after running once. Controlling an animation also requires that the storyboard have an [x:Name Directive](~/docs/framework/xaml-services/x-name-directive.md) or be accessible by reference in code.
Handoff behavior can be specified as an attribute of <xref:System.Windows.Media.Animation.BeginStoryboard>.
## Using the Compose HandoffBehavior
When you apply a <xref:System.Windows.Media.Animation.Storyboard>, <xref:System.Windows.Media.Animation.AnimationTimeline>, or <xref:System.Windows.Media.Animation.AnimationClock> to a property by using the <xref:System.Windows.Media.Animation.HandoffBehavior.Compose> <xref:System.Windows.Media.Animation.HandoffBehavior>, any <xref:System.Windows.Media.Animation.Clock> objects previously associated with that property continue to consume system resources; the timing system does not remove the clocks automatically.
To avoid performance issues when you apply a large number of clocks by using <xref:System.Windows.Media.Animation.HandoffBehavior.Compose>, you should remove composing clocks from the animated property after they complete. There are several ways to remove a clock:
- To remove all clocks from a property, use the <xref:System.Windows.Media.Animation.Animatable.ApplyAnimationClock%28System.Windows.DependencyProperty%2CSystem.Windows.Media.Animation.AnimationClock%29> or <xref:System.Windows.Media.Animation.Animatable.BeginAnimation%28System.Windows.DependencyProperty%2CSystem.Windows.Media.Animation.AnimationTimeline%29> method of the animated object. Specify the property being animated as the first parameter, and `null` as the second. This removes all animation clocks from the property.
- To remove a specific <xref:System.Windows.Media.Animation.AnimationClock> from a list of clocks, use the <xref:System.Windows.Media.Animation.Clock.Controller%2A> property of the <xref:System.Windows.Media.Animation.AnimationClock> to retrieve a <xref:System.Windows.Media.Animation.ClockController>, then call the <xref:System.Windows.Media.Animation.ClockController.Remove%2A> method of the <xref:System.Windows.Media.Animation.ClockController>. This is typically done in the <xref:System.Windows.Media.Animation.Clock.Completed> event handler for a clock. Note that only root clocks can be controlled by a <xref:System.Windows.Media.Animation.ClockController>; the <xref:System.Windows.Media.Animation.Clock.Controller%2A> property of a child clock returns `null`. Note also that the <xref:System.Windows.Media.Animation.Clock.Completed> event is not raised if the effective duration of the clock is forever. In that case, the user must determine when to call <xref:System.Windows.Media.Animation.ClockController.Remove%2A>.
This is primarily an issue for animations on objects that have a long lifetime. When an object is garbage collected, its clocks are also disconnected and garbage collected.
For more information about clock objects, see [Animation and Timing System Overview](~/docs/framework/wpf/graphics-multimedia/animation-and-timing-system-overview.md).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BindingGroup">
<MemberSignature Language="C#" Value="public System.Windows.Data.BindingGroup BindingGroup { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Data.BindingGroup BindingGroup" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.BindingGroup" />
<MemberSignature Language="VB.NET" Value="Public Property BindingGroup As BindingGroup" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Data::BindingGroup ^ BindingGroup { System::Windows::Data::BindingGroup ^ get(); void set(System::Windows::Data::BindingGroup ^ value); };" />
<MemberSignature Language="F#" Value="member this.BindingGroup : System.Windows.Data.BindingGroup with get, set" Usage="System.Windows.FrameworkElement.BindingGroup" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Data.BindingGroup</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="T:System.Windows.Data.BindingGroup" /> that is used for the element.</summary>
<value>The <see cref="T:System.Windows.Data.BindingGroup" /> that is used for the element.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.Windows.Data.BindingGroup> can be used to validate the values of multiple properties of an object. For example, suppose that an application prompts the user to enter an address and then populates an object of type `Address`, which has the properties `Street`, `City`, `ZipCode`, and `Country`, with the values that the user provided. The application has a panel that contains four <xref:System.Windows.Controls.TextBox> controls, each of which is bound to one of the object's properties. You can use a <xref:System.Windows.Controls.ValidationRule> in a <xref:System.Windows.Data.BindingGroup> to validate the `Address` object. For example, the <xref:System.Windows.Controls.ValidationRule> can ensure that the zip code is valid for the country of the address.
Child elements inherit the <xref:System.Windows.Data.BindingGroup> from their parent elements, just as with any other inheritable property.
<a name="dependencyPropertyInfo_BindingGroup"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.BindingGroupProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.Inherits%2A>|
## Examples
The following examples are part of an application that checks whether the user has set the properties of two objects to equal values. The first example creates two <xref:System.Windows.Controls.TextBox> controls, each of which is bound to a different data source. The <xref:System.Windows.Controls.StackPanel> has a <xref:System.Windows.Data.BindingGroup> that contains a <xref:System.Windows.Controls.ValidationRule> that checks that the two strings are equal.
[!code-xaml[BindingGroupSnippets#BindingGroupComplete](~/samples/snippets/csharp/VS_Snippets_Wpf/BindingGroupSnippets/CSharp/Window3.xaml#bindinggroupcomplete)]
The following example shows the <xref:System.Windows.Controls.ValidationRule> that the previous example uses. In the <xref:System.Windows.Controls.ValidationRule.Validate%2A> method override, the example gets each source object from the <xref:System.Windows.Data.BindingGroup> and checks whether the properties of the objects are equal.
[!code-csharp[BindingGroupSnippets#BindingGroupNameValidationRule](~/samples/snippets/csharp/VS_Snippets_Wpf/BindingGroupSnippets/CSharp/Window3.xaml.cs#bindinggroupnamevalidationrule)]
[!code-vb[BindingGroupSnippets#BindingGroupNameValidationRule](~/samples/snippets/visualbasic/VS_Snippets_Wpf/BindingGroupSnippets/visualbasic/window3.xaml.vb#bindinggroupnamevalidationrule)]
To invoke the <xref:System.Windows.Controls.ValidationRule>, call the <xref:System.Windows.Data.BindingGroup.UpdateSources%2A> method. The following example calls <xref:System.Windows.Data.BindingGroup.UpdateSources%2A> when the click event of the button occurs.
[!code-csharp[BindingGroupSnippets#UpdateSourcesClick](~/samples/snippets/csharp/VS_Snippets_Wpf/BindingGroupSnippets/CSharp/Window3.xaml.cs#updatesourcesclick)]
[!code-vb[BindingGroupSnippets#UpdateSourcesClick](~/samples/snippets/visualbasic/VS_Snippets_Wpf/BindingGroupSnippets/visualbasic/window3.xaml.vb#updatesourcesclick)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BindingGroupProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty BindingGroupProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty BindingGroupProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.BindingGroupProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly BindingGroupProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ BindingGroupProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable BindingGroupProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.BindingGroupProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.BindingGroup" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="BringIntoView">
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Attempts to bring this element into view, within any scrollable regions it is contained within.</summary>
</Docs>
</MemberGroup>
<Member MemberName="BringIntoView">
<MemberSignature Language="C#" Value="public void BringIntoView ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void BringIntoView() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.BringIntoView" />
<MemberSignature Language="VB.NET" Value="Public Sub BringIntoView ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void BringIntoView();" />
<MemberSignature Language="F#" Value="member this.BringIntoView : unit -&gt; unit" Usage="frameworkElement.BringIntoView " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Attempts to bring this element into view, within any scrollable regions it is contained within.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By calling this method, you raise a <xref:System.Windows.FrameworkElement.RequestBringIntoView> event that originates from the current element. This event is raised so that it can be handled by a <xref:System.Windows.Controls.ScrollViewer>, or a derived or similar class. The expected behavior is that the event is handled by the parent element, marked handled in the event data, and the source of the event is brought into view through the logic embedded in the <xref:System.Windows.Controls.ScrollViewer> control. Neither the <xref:System.Windows.FrameworkElement.RequestBringIntoView> event nor the <xref:System.Windows.FrameworkElement.BringIntoView%2A> method transmit any information about success or failure, other than that the event is typically marked handled on success. Reasons for failure can include the element settings, such as <xref:System.Windows.UIElement.Visibility%2A> being some value other than <xref:System.Windows.Visibility.Visible>.
If you use the signature that does not specify a `targetRectangle`, then the entire element size (its <xref:System.Windows.UIElement.RenderSize%2A>) will be made visible.
By calling this method, you potentially will call <xref:System.Windows.Controls.ScrollContentPresenter.MakeVisible%2A> on any parent scrollable area that contains the element. If this element is not contained in a scrollable area, the <xref:System.Windows.FrameworkElement.RequestBringIntoView> event is still raised, but there will be no effect because there are no event listeners.
## Examples
The following example implements a handler for an application navigation event that responds whenever the [!INCLUDE[TLA#tla_uri](~/includes/tlasharptla-uri-md.md)] being navigated to includes a fragment. The fragment is named in the [!INCLUDE[TLA2#tla_uri](~/includes/tla2sharptla-uri-md.md)] following the hash sign (#), and the implemented behavior causes the element to scroll into view within the frame. <xref:System.Windows.FrameworkElement.BringIntoView%2A> and <xref:System.Windows.FrameworkElement.RequestBringIntoView> request that scrolling behavior in the example.
[!code-csharp[FragmentNavigationSample#FEBringIntoView](~/samples/snippets/csharp/VS_Snippets_Wpf/FragmentNavigationSample/CSharp/MainWindow.xaml.cs#febringintoview)]
[!code-vb[FragmentNavigationSample#FEBringIntoView](~/samples/snippets/visualbasic/VS_Snippets_Wpf/FragmentNavigationSample/VisualBasic/MainWindow.xaml.vb#febringintoview)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.ScrollViewer" />
</Docs>
</Member>
<Member MemberName="BringIntoView">
<MemberSignature Language="C#" Value="public void BringIntoView (System.Windows.Rect targetRectangle);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void BringIntoView(valuetype System.Windows.Rect targetRectangle) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.BringIntoView(System.Windows.Rect)" />
<MemberSignature Language="VB.NET" Value="Public Sub BringIntoView (targetRectangle As Rect)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void BringIntoView(System::Windows::Rect targetRectangle);" />
<MemberSignature Language="F#" Value="member this.BringIntoView : System.Windows.Rect -&gt; unit" Usage="frameworkElement.BringIntoView targetRectangle" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="targetRectangle" Type="System.Windows.Rect" />
</Parameters>
<Docs>
<param name="targetRectangle">Specified size of the element that should also be brought into view.</param>
<summary>Attempts to bring the provided region size of this element into view, within any scrollable regions it is contained within.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By calling this method, you raise a <xref:System.Windows.FrameworkElement.RequestBringIntoView> event that originates from the current element. This event is raised so that it can be handled by a <xref:System.Windows.Controls.ScrollViewer>, or a derived or similar class. The expected behavior is that the event is handled by the parent element, marked handled in the event data, and the source of the event is brought into view through the logic embedded in the <xref:System.Windows.Controls.ScrollViewer> control. Neither the <xref:System.Windows.FrameworkElement.RequestBringIntoView> event nor the <xref:System.Windows.FrameworkElement.BringIntoView%2A> method transmit any information about success or failure, other than that the event is typically marked handled on success. Reasons for failure can include the element settings, such as <xref:System.Windows.UIElement.Visibility%2A> being some value other than <xref:System.Windows.Visibility.Visible>.
If you use the signature that does not specify a `targetRectangle`, then the entire element size (its <xref:System.Windows.UIElement.RenderSize%2A>) will be made visible.
By calling this method, you potentially will call <xref:System.Windows.Controls.ScrollContentPresenter.MakeVisible%2A> on any parent scrollable area that contains the element. If this element is not contained in a scrollable area, the <xref:System.Windows.FrameworkElement.RequestBringIntoView> event is still raised, but there will be no effect because there are no event listeners.
## Examples
The following example has a large graphic in a constrained scrolling region. A button on the page has a handler that scrolls the view to a particular region of the large graphic.
[!code-xaml[BaseElementsSmorgasbord#BringIntoViewRectMarkup](~/samples/snippets/csharp/VS_Snippets_Wpf/BaseElementsSmorgasbord/CSharp/Page1.xaml#bringintoviewrectmarkup)]
[!code-csharp[BaseElementsSmorgasbord#BringIntoViewRectCode](~/samples/snippets/csharp/VS_Snippets_Wpf/BaseElementsSmorgasbord/CSharp/Page1.xaml.cs#bringintoviewrectcode)]
[!code-vb[BaseElementsSmorgasbord#BringIntoViewRectCode](~/samples/snippets/visualbasic/VS_Snippets_Wpf/BaseElementsSmorgasbord/visualbasic/page1.xaml.vb#bringintoviewrectcode)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.FlowDocumentScrollViewer" />
</Docs>
</Member>
<Member MemberName="ContextMenu">
<MemberSignature Language="C#" Value="public System.Windows.Controls.ContextMenu ContextMenu { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Controls.ContextMenu ContextMenu" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.ContextMenu" />
<MemberSignature Language="VB.NET" Value="Public Property ContextMenu As ContextMenu" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Controls::ContextMenu ^ ContextMenu { System::Windows::Controls::ContextMenu ^ get(); void set(System::Windows::Controls::ContextMenu ^ value); };" />
<MemberSignature Language="F#" Value="member this.ContextMenu : System.Windows.Controls.ContextMenu with get, set" Usage="System.Windows.FrameworkElement.ContextMenu" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Controls.ContextMenu</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the context menu element that should appear whenever the context menu is requested through [!INCLUDE[TLA#tla_ui](~/includes/tlasharptla-ui-md.md)] from within this element.</summary>
<value>The context menu assigned to this element.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Controls.ContextMenu> itself is a <xref:System.Windows.FrameworkElement> derived class, and it is technically possible for <xref:System.Windows.Controls.ContextMenu> itself to have a <xref:System.Windows.FrameworkElement.ContextMenu%2A> property. However, this creates a confusing context menu experience for the user and this practice is not recommended.
<a name="dependencyPropertyInfo_ContextMenu"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.ContextMenuProperty>|
|Metadata properties set to `true`|None|
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.ContextMenu" />
</Docs>
</Member>
<Member MemberName="ContextMenuClosing">
<MemberSignature Language="C#" Value="public event System.Windows.Controls.ContextMenuEventHandler ContextMenuClosing;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Controls.ContextMenuEventHandler ContextMenuClosing" />
<MemberSignature Language="DocId" Value="E:System.Windows.FrameworkElement.ContextMenuClosing" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ContextMenuClosing As ContextMenuEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Controls::ContextMenuEventHandler ^ ContextMenuClosing;" />
<MemberSignature Language="F#" Value="member this.ContextMenuClosing : System.Windows.Controls.ContextMenuEventHandler " Usage="member this.ContextMenuClosing : System.Windows.Controls.ContextMenuEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Controls.ContextMenuEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs just before any context menu on the element is closed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To suppress closing context menus, handlers of the event should mark it as handled.
To use this event as an <xref:System.Windows.EventTrigger> in a style, you must reference the underlying service's definition of the event:
[!code-xaml[CorePseudocode#FEContextMenuClosing](~/samples/snippets/csharp/VS_Snippets_Wpf/CorePseudocode/CSharp/pseudocode.xaml#fecontextmenuclosing)]
(This usage is required because the event implementation on <xref:System.Windows.FrameworkElement> that exposes the underlying service event does not map the <xref:System.Windows.FrameworkElement.ContextMenuClosing> identifier such that you can use it as a trigger).
<xref:System.Windows.Controls.ContextMenu> itself is a <xref:System.Windows.FrameworkElement> derived class, but the <xref:System.Windows.FrameworkElement.ContextMenuClosing> event will not be raised by a context menu directly. Instead, the event is raised from the element that "owns" the context menu as a property and is only raised when a user attempts to close a context menu in the UI. However it is possible for <xref:System.Windows.Controls.ContextMenu> itself to have a <xref:System.Windows.FrameworkElement.ContextMenu%2A> property (a nested context menu). In this case the <xref:System.Windows.Controls.ContextMenu> really does own the nested <xref:System.Windows.Controls.ContextMenu> and might raise the event, with the source of the event being the nested context menu.
The <xref:System.Windows.Controls.ContextMenu> class itself also has a similar event (<xref:System.Windows.Controls.ContextMenu.Closed>) but the <xref:System.Windows.Controls.ContextMenu.Closed> event does not provide you the opportunity to cancel the user action.
<a name="routedEventInfo_ContextMenuClosing"></a>
## Routed Event Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.ContextMenuClosingEvent>|
|Routing strategy|Bubbling|
|Delegate|<xref:System.Windows.Controls.ContextMenuEventHandler>|
- Override <xref:System.Windows.FrameworkElement.OnContextMenuClosing%2A> to implement class handling for this event in derived classes.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.ContextMenu" />
</Docs>
</Member>
<Member MemberName="ContextMenuClosingEvent">
<MemberSignature Language="C#" Value="public static readonly System.Windows.RoutedEvent ContextMenuClosingEvent;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.RoutedEvent ContextMenuClosingEvent" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.ContextMenuClosingEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly ContextMenuClosingEvent As RoutedEvent " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ ContextMenuClosingEvent;" />
<MemberSignature Language="F#" Value=" staticval mutable ContextMenuClosingEvent : System.Windows.RoutedEvent" Usage="System.Windows.FrameworkElement.ContextMenuClosingEvent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEvent</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="E:System.Windows.FrameworkElement.ContextMenuClosing" /> routed event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Routed event identifiers are created when routed events are registered. These identifiers contain an identifying name, owner type, handler type, routing strategy, and utility method for adding owners for the event. You can use these identifiers to add class handlers.
For more information about registering routed events, see <xref:System.Windows.EventManager.RegisterRoutedEvent%2A>. For more information about using routed event identifiers to add class handlers, see <xref:System.Windows.EventManager.RegisterClassHandler%2A>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ContextMenuOpening">
<MemberSignature Language="C#" Value="public event System.Windows.Controls.ContextMenuEventHandler ContextMenuOpening;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Controls.ContextMenuEventHandler ContextMenuOpening" />
<MemberSignature Language="DocId" Value="E:System.Windows.FrameworkElement.ContextMenuOpening" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ContextMenuOpening As ContextMenuEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Controls::ContextMenuEventHandler ^ ContextMenuOpening;" />
<MemberSignature Language="F#" Value="member this.ContextMenuOpening : System.Windows.Controls.ContextMenuEventHandler " Usage="member this.ContextMenuOpening : System.Windows.Controls.ContextMenuEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Controls.ContextMenuEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when any context menu on the element is opened.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To manually open context menus, handlers of the events should mark the relevant event as handled. Otherwise, the existing value of the <xref:System.Windows.FrameworkElement.ContextMenu%2A> property will be used to automatically open a context menu. Marking the event handled will effectively cancel the default action, and could be an opportunity to reset the value of the <xref:System.Windows.FrameworkElement.ContextMenu%2A> property and then open the new <xref:System.Windows.Controls.ContextMenu>. However, there is a timing issue you should be aware of. In order to completely replace the context menu through a <xref:System.Windows.FrameworkElement.ContextMenuOpening> handler, the initial context menu must not be null / empty. Alternatively, you might need to handle the event and then manually open a new context menu. For details, see [How to: Handle the ContextMenuOpening Event](~/docs/framework/wpf/advanced/how-to-handle-the-contextmenuopening-event.md).
To use this event as an <xref:System.Windows.EventTrigger> in a style, you must reference the underlying attached event:
[!code-xaml[CorePseudocode#FEContextMenuOpening](~/samples/snippets/csharp/VS_Snippets_Wpf/CorePseudocode/CSharp/pseudocode.xaml#fecontextmenuopening)]
(This usage is required because the event implementation on <xref:System.Windows.FrameworkElement> that exposes the underlying service event does not map the <xref:System.Windows.FrameworkElement.ContextMenuOpening> identifier such that you can use it in triggers).
<xref:System.Windows.Controls.ContextMenu> itself is a <xref:System.Windows.FrameworkElement> derived class, but this event will not be raised from the context menu being opened as a source. The event is raised from the element that "owns" the context menu as a property and is only raised when a user attempts to open a context menu in the UI. It is possible for <xref:System.Windows.Controls.ContextMenu> itself to have a <xref:System.Windows.FrameworkElement.ContextMenu%2A> property, but you should avoid this scenario (for details, see <xref:System.Windows.FrameworkElement.ContextMenu%2A?displayProperty=nameWithType>).
The <xref:System.Windows.Controls.ContextMenu> class itself also has a similar event (<xref:System.Windows.Controls.ContextMenu.Opened>) but <xref:System.Windows.Controls.ContextMenu.Opened> does not provide you the opportunity to cancel the user action.
<a name="routedEventInfo_ContextMenuOpening"></a>
## Routed Event Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.ContextMenuOpeningEvent>|
|Routing strategy|Bubbling|
|Delegate|<xref:System.Windows.Controls.ContextMenuEventHandler>|
- Override <xref:System.Windows.FrameworkElement.OnContextMenuOpening%2A> to implement class handling for this event in derived classes.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.ContextMenu" />
</Docs>
</Member>
<Member MemberName="ContextMenuOpeningEvent">
<MemberSignature Language="C#" Value="public static readonly System.Windows.RoutedEvent ContextMenuOpeningEvent;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.RoutedEvent ContextMenuOpeningEvent" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.ContextMenuOpeningEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly ContextMenuOpeningEvent As RoutedEvent " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ ContextMenuOpeningEvent;" />
<MemberSignature Language="F#" Value=" staticval mutable ContextMenuOpeningEvent : System.Windows.RoutedEvent" Usage="System.Windows.FrameworkElement.ContextMenuOpeningEvent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEvent</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="E:System.Windows.FrameworkElement.ContextMenuOpening" /> routed event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Routed event identifiers are created when routed events are registered. These identifiers contain an identifying name, owner type, handler type, routing strategy, and utility method for adding owners for the event. You can use these identifiers to add class handlers.
For more information about registering routed events, see <xref:System.Windows.EventManager.RegisterRoutedEvent%2A>. For more information about using routed event identifiers to add class handlers, see <xref:System.Windows.EventManager.RegisterClassHandler%2A>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ContextMenuProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty ContextMenuProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty ContextMenuProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.ContextMenuProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly ContextMenuProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ ContextMenuProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable ContextMenuProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.ContextMenuProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.ContextMenu" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Cursor">
<MemberSignature Language="C#" Value="public System.Windows.Input.Cursor Cursor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Input.Cursor Cursor" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.Cursor" />
<MemberSignature Language="VB.NET" Value="Public Property Cursor As Cursor" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Input::Cursor ^ Cursor { System::Windows::Input::Cursor ^ get(); void set(System::Windows::Input::Cursor ^ value); };" />
<MemberSignature Language="F#" Value="member this.Cursor : System.Windows.Input.Cursor with get, set" Usage="System.Windows.FrameworkElement.Cursor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Input.Cursor</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the cursor that displays when the mouse pointer is over this element.</summary>
<value>The cursor to display. The default value is defined as <see langword="null" /> per this dependency property. However, the practical default at run time will come from a variety of factors.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you set this property in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)], the [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] processor relies on type conversion for the <xref:System.Windows.Input.Cursor> class to evaluate the string. The provided string should evaluate to a <xref:System.Windows.Input.CursorType> value. See <xref:System.Windows.Input.Cursor> for details.
Whether the cursor as established by this property will or will not display when the mouse pointer is over this element is also dependent on the value of the <xref:System.Windows.FrameworkElement.ForceCursor%2A> property. Also, event-related considerations such as an active drag, mouse capture, text editing modes within controls, and so on, will also affect the cursor with higher priority than the value you specify in this property.
To revert the behavior of setting this property to the eventual default, set it to `null` again.
The `null` default really means that determination of the practical cursor value is deferred here and should be obtained from elsewhere. If presented without programmatic values from any source, the default cursor that is visually over a [!INCLUDE[TLA#tla_winclient](~/includes/tlasharptla-winclient-md.md)] application will be an arrow. However, the transient cursor changes are not set to the <xref:System.Windows.FrameworkElement.Cursor%2A> values of the elements when they are passed over. The <xref:System.Windows.FrameworkElement.Cursor%2A> property will only report non null values in cases where it was actually set, for instance through code or a style. Each movement of the mouse over a [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] application raises a <xref:System.Windows.UIElement.QueryCursor> event. The event bubbles, and any element along the route has the opportunity to handle the event and to set the value of the cursor through the arguments of this event. This is the mechanism that produces the visually apparent cursor in most cases. If a <xref:System.Windows.UIElement.QueryCursor> handler returns a cursor result, then the fact that the event is handled and has a changed value in the arguments takes precedence over the value of the <xref:System.Windows.FrameworkElement.Cursor%2A> property at any level, unless <xref:System.Windows.FrameworkElement.ForceCursor%2A> is set.
If not are not creating a custom cursor, you typically set this property to a static property value of the <xref:System.Windows.Input.Cursors> class. Setting <xref:System.Windows.FrameworkElement.Cursor%2A> in code requires one of the following:
- Call the <xref:System.Windows.Input.Cursor> constructor to get a <xref:System.Windows.Input.Cursor> instance. Both signatures of the <xref:System.Windows.Input.Cursor> constructor use streams or files, in anticipation that you are creating the <xref:System.Windows.Input.Cursor> object for a custom cursor.
- Use the <xref:System.Windows.Input.CursorConverter> class and its <xref:System.Windows.Input.CursorConverter.ConvertFrom%2A> method to specify a cursor by <xref:System.Windows.Input.CursorType>, or a string that can evaluate to a <xref:System.Windows.Input.CursorType>, and cast the return to <xref:System.Windows.Input.Cursor>.
Setting the <xref:System.Windows.Input.Cursor> to a custom value is not enabled in partial trust. For more information on custom cursors, see [Input Overview](~/docs/framework/wpf/advanced/input-overview.md).
<a name="dependencyPropertyInfo_Cursor"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.CursorProperty>|
|Metadata properties set to `true`|None|
## Examples
The following example shows how to deliberately set the cursor graphic.
[!code-csharp[cursors#ChangeCursorsSample](~/samples/snippets/csharp/VS_Snippets_Wpf/cursors/CSharp/Window1.xaml.cs#changecursorssample)]
[!code-vb[cursors#ChangeCursorsSample](~/samples/snippets/visualbasic/VS_Snippets_Wpf/cursors/VisualBasic/Window1.xaml.vb#changecursorssample)]
]]></format>
</remarks>
<altmember cref="E:System.Windows.UIElement.QueryCursor" />
<altmember cref="P:System.Windows.FrameworkElement.ForceCursor" />
<altmember cref="P:System.Windows.Input.Mouse.OverrideCursor" />
</Docs>
</Member>
<Member MemberName="CursorProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty CursorProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty CursorProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.CursorProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly CursorProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ CursorProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable CursorProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.CursorProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.Cursor" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DataContext">
<MemberSignature Language="C#" Value="public object DataContext { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object DataContext" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.DataContext" />
<MemberSignature Language="VB.NET" Value="Public Property DataContext As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ DataContext { System::Object ^ get(); void set(System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.DataContext : obj with get, set" Usage="System.Windows.FrameworkElement.DataContext" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the data context for an element when it participates in data binding.</summary>
<value>The object to use as data context.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
*Data context* is a concept that allows elements to inherit information from their parent elements about the data source that is used for binding, as well as other characteristics of the binding, such as the path.
Data context can be set directly to a .NET object, with the bindings evaluating to properties of that object. Alternatively, you can set the data context to a <xref:System.Windows.Data.DataSourceProvider> object.
This dependency property inherits property values. If there are child elements without other values for <xref:System.Windows.FrameworkElement.DataContext%2A> established through local values or styles, then the property system will set the value to be the <xref:System.Windows.FrameworkElement.DataContext%2A> value of the nearest parent element with this value assigned.
Alternatively, you can use one of the following properties of the <xref:System.Windows.Data.Binding> class to specify the binding source explicitly:
- <xref:System.Windows.Data.Binding.ElementName%2A>.
- <xref:System.Windows.Data.Binding.Source%2A>.
- <xref:System.Windows.Data.Binding.RelativeSource%2A>.
For more information, see [How to: Specify the Binding Source](~/docs/framework/wpf/data/how-to-specify-the-binding-source.md).
In XAML, <xref:System.Windows.FrameworkElement.DataContext%2A> is most typically set as a <xref:System.Windows.Data.Binding> declaration. You can use either property element syntax or attribute syntax. Attribute syntax is shown in the example on this page. You can also use code to set <xref:System.Windows.FrameworkElement.DataContext%2A>.
<xref:System.Windows.FrameworkElement.DataContext%2A> is a bindable property to facilitate scenarios where one context might be bound to another. However, if you bind to <xref:System.Windows.FrameworkElement.DataContext%2A>, be careful to not create circular binding references (do not bind a <xref:System.Windows.FrameworkElement.DataContext%2A> to itself, which it is possible to do because of the property value inheritance nature of the <xref:System.Windows.FrameworkElement.DataContext%2A> property).
<a name="xamlPropertyElementUsage_DataContext"></a>
## XAML Property Element Usage
```
<object>
<object.DataContext>
<dataContextObject />
</object.DataContext>
</object>
```
<a name="xamlAttributeUsage_DataContext"></a>
## XAML Attribute Usage
```
<object DataContext="bindingUsage"/>
- or -
<object DataContext="{resourceExtension contextResourceKey}"/>
```
<a name="xamlValues_DataContext"></a>
## XAML Values
*dataContextObject*
A directly embedded object that serves as data context for any bindings within the parent element. Typically, this object is a <xref:System.Windows.Data.Binding> or another <xref:System.Windows.Data.BindingBase> derived class. Alternatively, raw data of any object type intended for binding may be placed here, with the actual bindings defined later.
*bindingUsage*
A binding usage that evaluates to an appropriate data context. For details, see [Binding Markup Extension](~/docs/framework/wpf/advanced/binding-markup-extension.md).
*resourceExtension*
One of the following: [`StaticResource`](~/docs/framework/wpf/advanced/staticresource-markup-extension.md) or [`DynamicResource`](~/docs/framework/wpf/advanced/dynamicresource-markup-extension.md). This usage is used when referring to raw data defined as an object in resources. See [XAML Resources](~/docs/framework/wpf/advanced/xaml-resources.md).
*contextResourceKey*
The key identifier for the object being requested from within a <xref:System.Windows.ResourceDictionary>.
<a name="dependencyPropertyInfo_DataContext"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.DataContextProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.Inherits%2A>|
## Examples
The following example illustrates how a data context acts on a binding and provides the information that defines the specific values of bound properties.
[!code-xaml[MasterDetail#DataContextProperty](~/samples/snippets/csharp/VS_Snippets_Wpf/MasterDetail/CSharp/Page1.xaml#datacontextproperty)]
[!code-xaml[MasterDetail#DataContextProperty2](~/samples/snippets/csharp/VS_Snippets_Wpf/MasterDetail/CSharp/Page1.xaml#datacontextproperty2)]
[!code-xaml[MasterDetail#DataContextProperty3](~/samples/snippets/csharp/VS_Snippets_Wpf/MasterDetail/CSharp/Page1.xaml#datacontextproperty3)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DataContextChanged">
<MemberSignature Language="C#" Value="public event System.Windows.DependencyPropertyChangedEventHandler DataContextChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.DependencyPropertyChangedEventHandler DataContextChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.FrameworkElement.DataContextChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DataContextChanged As DependencyPropertyChangedEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::DependencyPropertyChangedEventHandler ^ DataContextChanged;" />
<MemberSignature Language="F#" Value="member this.DataContextChanged : System.Windows.DependencyPropertyChangedEventHandler " Usage="member this.DataContextChanged : System.Windows.DependencyPropertyChangedEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyPropertyChangedEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the data context for this element changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For an explanation of data contexts and data binding, see [Data Binding Overview](~/docs/framework/wpf/data/data-binding-overview.md).
> [!IMPORTANT]
> When the <xref:System.Windows.FrameworkElement.DataContext%2A> for an element changes, all data-bound properties on this element are potentially affected. This applies to any elements that are child elements of the current element in the logical tree, which inherit the data context, and also the current element itself. All such existing bindings must re-interpret the new <xref:System.Windows.FrameworkElement.DataContext%2A> and will reevaluate the binding results. The data binding engine is not deterministic about the order of these reevaluations, relative to the raising of the <xref:System.Windows.FrameworkElement.DataContextChanged> event. The reevaluations can occur before the event, after the event, or in any mixture.
]]></format>
</remarks>
<altmember cref="P:System.Windows.FrameworkElement.DataContext" />
</Docs>
</Member>
<Member MemberName="DataContextProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty DataContextProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty DataContextProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.DataContextProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly DataContextProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ DataContextProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable DataContextProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.DataContextProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.DataContext" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultStyleKey">
<MemberSignature Language="C#" Value="protected internal object DefaultStyleKey { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object DefaultStyleKey" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.DefaultStyleKey" />
<MemberSignature Language="VB.NET" Value="Protected Friend Property DefaultStyleKey As Object" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; property System::Object ^ DefaultStyleKey { System::Object ^ get(); void set(System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.DefaultStyleKey : obj with get, set" Usage="System.Windows.FrameworkElement.DefaultStyleKey" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the key to use to reference the style for this control, when theme styles are used or defined.</summary>
<value>The style key. To work correctly as part of theme style lookup, this value is expected to be the <see cref="T:System.Type" /> of the control being styled.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is typically not set through any of its direct property accessors. Instead, you override the type-specific metadata of this dependency property every time you create a new <xref:System.Windows.FrameworkElement> derived class. When you derive a control, call the <xref:System.Windows.DependencyProperty.OverrideMetadata%2A> method against the <xref:System.Windows.FrameworkElement.DefaultStyleKeyProperty> identifier, within the static constructor of the control derived class (or equivalent class initialization).
A control typically overrides the default value of this property to be its own type, but in some cases could also use a base type for which a style in the theme dictionaries exists. This is only practical if the control templates of the base control entirely define the visual representation of that derived control, and if whatever additional members the derived types expose do not require additional elements as part of the control template.
If you want your element or control to deliberately not use theme styles, set the <xref:System.Windows.FrameworkElement.OverridesDefaultStyle%2A> property to `true`.
<a name="dependencyPropertyInfo_DefaultStyleKey"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.DefaultStyleKeyProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
## Examples
The following example illustrates the dependency property metadata override usage discussed in Remarks. This code defines a custom control class `NumericUpDown` intended to be used from a dedicated control library assembly. The illustrated static constructor references some private initialization function, registers a class handler (another common control subclassing scenario; see [Marking Routed Events as Handled, and Class Handling](~/docs/framework/wpf/advanced/marking-routed-events-as-handled-and-class-handling.md)) and finally overrides the <xref:System.Windows.FrameworkElement.DefaultStyleKey%2A> dependency property metadata on the `NumericUpDown` class. <xref:System.Windows.FrameworkElement.DefaultStyleKey%2A> always returns its own type as the intended key, which is the convention that the theme style system uses to look up the style for some arbitrary otherwise non-styled control. The complete sample also defines the actual control's theme style that is referenced by that key; see [NumericUpDown Custom Control with Theme and UI Automation Support Sample](https://go.microsoft.com/fwlink/?LinkID=160025).
[!code-csharp[CustomControlNumericUpDown#StaticCtorOfCustomClassCommonTasks](~/samples/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp/CustomControlLibrary/NumericUpDown2.cs)]
[!code-vb[CustomControlNumericUpDown#StaticCtorOfCustomClassCommonTasks](~/samples/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic/customcontrollibrary/numericupdown2.vb)]
The complete source code for this example is available on GitHub for both [C#](https://github.com/dotnet/samples/tree/master/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp/CustomControlLibrary) and [Visual Basic](https://github.com/dotnet/samples/tree/master/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic/customcontrollibrary).
]]></format>
</remarks>
<altmember cref="P:System.Windows.FrameworkElement.OverridesDefaultStyle" />
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=160025">NumericUpDown Custom Control with Theme and UI Automation Support Sample</related>
</Docs>
</Member>
<Member MemberName="DefaultStyleKeyProperty">
<MemberSignature Language="C#" Value="protected internal static readonly System.Windows.DependencyProperty DefaultStyleKeyProperty;" />
<MemberSignature Language="ILAsm" Value=".field familyorassembly static initonly class System.Windows.DependencyProperty DefaultStyleKeyProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.DefaultStyleKeyProperty" />
<MemberSignature Language="VB.NET" Value="Protected Friend Shared ReadOnly DefaultStyleKeyProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="protected public: static initonly System::Windows::DependencyProperty ^ DefaultStyleKeyProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable DefaultStyleKeyProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.DefaultStyleKeyProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.DefaultStyleKey" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="EndInit">
<MemberSignature Language="C#" Value="public virtual void EndInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EndInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.EndInit" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub EndInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void EndInit();" />
<MemberSignature Language="F#" Value="abstract member EndInit : unit -&gt; unit&#xA;override this.EndInit : unit -&gt; unit" Usage="frameworkElement.EndInit " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.EndInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Indicates that the initialization process for the element is complete.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If <xref:System.Windows.FrameworkElement.BeginInit%2A> was previously called, the base implementation will raise the <xref:System.Windows.FrameworkElement.Initialized> event. Otherwise, if <xref:System.Windows.FrameworkElement.BeginInit%2A> was not called or it could not be determined whether <xref:System.Windows.FrameworkElement.BeginInit%2A> was called, <xref:System.Windows.FrameworkElement.Initialized> is not raised and an exception is thrown instead.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<see cref="M:System.Windows.FrameworkElement.EndInit" /> was called without <see cref="M:System.Windows.FrameworkElement.BeginInit" /> having previously been called on the element.</exception>
<block subset="none" type="overrides">
<para>Implement this method to provide special handling that should happen when your element is initialized during the element loading process.
Your implementation should call the base implementation, because the base (default) implementation sets some internal flags to keep track of initialization.</para>
</block>
</Docs>
</Member>
<Member MemberName="FindName">
<MemberSignature Language="C#" Value="public object FindName (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance object FindName(string name) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.FindName(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function FindName (name As String) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Object ^ FindName(System::String ^ name);" />
<MemberSignature Language="F#" Value="member this.FindName : string -&gt; obj" Usage="frameworkElement.FindName name" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="name">The name of the requested element.</param>
<summary>Finds an element that has the provided identifier name.</summary>
<returns>The requested element. This can be <see langword="null" /> if no matching element was found.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the element has child elements, these child elements are all searched recursively for the requested named element.
<xref:System.Windows.FrameworkElement.FindName%2A> operates within the current element's namescope. For details, see [WPF XAML Namescopes](~/docs/framework/wpf/advanced/wpf-xaml-namescopes.md).
]]></format>
</remarks>
<altmember cref="M:System.Windows.FrameworkElement.FindResource(System.Object)" />
<altmember cref="P:System.Windows.FrameworkElement.Name" />
<related type="Article" href="https://msdn.microsoft.com/library/b7e61222-e8cf-48d2-acd0-6df3b7685d48">x:Name Attribute</related>
</Docs>
</Member>
<Member MemberName="FindResource">
<MemberSignature Language="C#" Value="public object FindResource (object resourceKey);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance object FindResource(object resourceKey) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.FindResource(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function FindResource (resourceKey As Object) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Object ^ FindResource(System::Object ^ resourceKey);" />
<MemberSignature Language="F#" Value="member this.FindResource : obj -&gt; obj" Usage="frameworkElement.FindResource resourceKey" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="resourceKey" Type="System.Object" />
</Parameters>
<Docs>
<param name="resourceKey">The key identifier for the requested resource.</param>
<summary>Searches for a resource with the specified key, and throws an exception if the requested resource is not found.</summary>
<returns>The requested resource. If no resource with the provided key was found, an exception is thrown. An <see cref="F:System.Windows.DependencyProperty.UnsetValue" /> value might also be returned in the exception case.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> If you call this method for a key that cannot be found, an exception is thrown. If you do not want to handle exceptions that result from calling <xref:System.Windows.FrameworkElement.FindResource%2A>, call <xref:System.Windows.FrameworkElement.TryFindResource%2A> instead. <xref:System.Windows.FrameworkElement.TryFindResource%2A> returns `null` when a requested resource cannot be found, and does not throw an exception.
If the resource is not found on the calling element, the parent element in the logical tree is searched next, then the application, then themes, and finally system resources. This lookup methodology is identical to how the tree is searched if a resource were requested by a dynamic resource reference in markup. For more information about resource lookup, see [XAML Resources](~/docs/framework/wpf/advanced/xaml-resources.md).
Typically, you immediately cast a <xref:System.Windows.FrameworkElement.FindResource%2A> return value to the type of the property that you setting with the returned resource value.
Resource keys are not necessarily strings. For instance, styles for controls at the theme level are deliberately keyed to the <xref:System.Type> of the control, and application or page styles for controls typically use this same key convention. For details, see [Styling and Templating](~/docs/framework/wpf/controls/styling-and-templating.md) or [XAML Resources](~/docs/framework/wpf/advanced/xaml-resources.md).
## Examples
The following example obtains a named resource and casts it to an appropriate type to fill a property.
[!code-csharp[PropertiesOvwSupport#ResourceProceduralGet](~/samples/snippets/csharp/VS_Snippets_Wpf/PropertiesOvwSupport/CSharp/page3.xaml.cs#resourceproceduralget)]
[!code-vb[PropertiesOvwSupport#ResourceProceduralGet](~/samples/snippets/visualbasic/VS_Snippets_Wpf/PropertiesOvwSupport/visualbasic/page3.xaml.vb#resourceproceduralget)]
]]></format>
</remarks>
<exception cref="T:System.Windows.ResourceReferenceKeyNotFoundException">
<paramref name="resourceKey" /> was not found and an event handler does not exist for the <see cref="E:System.Windows.Threading.Dispatcher.UnhandledException" /> event.
-or-
<paramref name="resourceKey" /> was not found and the <see cref="P:System.Windows.Threading.DispatcherUnhandledExceptionEventArgs.Handled" /> property is <see langword="false" /> in the <see cref="E:System.Windows.Threading.Dispatcher.UnhandledException" /> event.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="resourceKey" /> is <see langword="null" />.</exception>
<altmember cref="M:System.Windows.FrameworkElement.TryFindResource(System.Object)" />
</Docs>
</Member>
<Member MemberName="FlowDirection">
<MemberSignature Language="C#" Value="public System.Windows.FlowDirection FlowDirection { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.FlowDirection FlowDirection" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.FlowDirection" />
<MemberSignature Language="VB.NET" Value="Public Property FlowDirection As FlowDirection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::FlowDirection FlowDirection { System::Windows::FlowDirection get(); void set(System::Windows::FlowDirection value); };" />
<MemberSignature Language="F#" Value="member this.FlowDirection : System.Windows.FlowDirection with get, set" Usage="System.Windows.FrameworkElement.FlowDirection" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.None)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.FlowDirection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the direction that text and other [!INCLUDE[TLA#tla_ui](~/includes/tlasharptla-ui-md.md)] elements flow within any parent element that controls their layout.</summary>
<value>The direction that text and other [!INCLUDE[TLA2#tla_ui](~/includes/tla2sharptla-ui-md.md)] elements flow within their parent element, as a value of the enumeration. The default value is <see cref="F:System.Windows.FlowDirection.LeftToRight" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The dependency property usage sets the <xref:System.Windows.FrameworkElement.FlowDirection%2A> on this element. Because of property value inheritance, setting <xref:System.Windows.FrameworkElement.FlowDirection%2A> on an element can potentially set <xref:System.Windows.FrameworkElement.FlowDirection%2A> on all child elements that did not set <xref:System.Windows.FrameworkElement.FlowDirection%2A> locally or though other means such as styles.
This property is not automatically set as part of any application culture information, because an element might contain content that is not necessarily intended to obey the general flow direction implied by the culture information. For more information on globalization considerations, see [Globalization for WPF](~/docs/framework/wpf/advanced/globalization-for-wpf.md).
This property has a defined [!INCLUDE[TLA#tla_clr](~/includes/tlasharptla-clr-md.md)] property accessor, so it functions as a dependency property. However, it is also registered as attached, so it can also function as an attached property. The attached registration is mainly so that property value inheritance is supported, but the property can also be used as a true attached property. The attached property usage is only relevant if the object you intend to set the flow direction on has a <xref:System.Windows.FrameworkElement> parent element that performs layout upon it, is itself not a <xref:System.Windows.FrameworkElement>, and does not already have a more directly defined `FlowDirection` property. (Some of the flow document classes such as <xref:System.Windows.Documents.Block> and <xref:System.Windows.Documents.Inline> define their own `FlowDirection`, and this property can also set the flow direction. The property value is then read by the eventual content host without requiring attached property usage.)
<a name="xamlAttributeUsage_FlowDirection"></a>
## XAML Attribute Usage
\<*object* **FlowDirection**="<xref:System.Windows.FlowDirection>"/>
<a name="xamlTextUsage_FlowDirection"></a>
## XAML Text Usage
This property can also be set on classes that are not <xref:System.Windows.FrameworkElement> derived classes, by the following [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] attached property usage:
`<` *object* `FrameworkElement.`**FlowDirection**="<xref:System.Windows.FlowDirection>`"/>`
<a name="dependencyPropertyInfo_FlowDirection"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.FlowDirectionProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>, <xref:System.Windows.FrameworkPropertyMetadata.AffectsParentArrange%2A>, <xref:System.Windows.FrameworkPropertyMetadata.Inherits%2A>|
This property is both a dependency property and an attached property; see Remarks.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="FlowDirectionProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty FlowDirectionProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty FlowDirectionProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.FlowDirectionProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly FlowDirectionProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ FlowDirectionProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable FlowDirectionProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.FlowDirectionProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.FlowDirection" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FocusVisualStyle">
<MemberSignature Language="C#" Value="public System.Windows.Style FocusVisualStyle { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Style FocusVisualStyle" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.FocusVisualStyle" />
<MemberSignature Language="VB.NET" Value="Public Property FocusVisualStyle As Style" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Style ^ FocusVisualStyle { System::Windows::Style ^ get(); void set(System::Windows::Style ^ value); };" />
<MemberSignature Language="F#" Value="member this.FocusVisualStyle : System.Windows.Style with get, set" Usage="System.Windows.FrameworkElement.FocusVisualStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Style</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a property that enables customization of appearance, effects, or other style characteristics that will apply to this element when it captures keyboard focus.</summary>
<value>The desired style to apply on focus. The default value as declared in the dependency property is an empty static <see cref="T:System.Windows.Style" />. However, the effective value at run time is often (but not always) a style as supplied by theme support for controls.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property affects visual appearance but does not report <xref:System.Windows.FrameworkPropertyMetadata.AffectsRender%2A> in metadata. This is because the visual appearance change is event-driven and may not apply at all times, and therefore should not generally report any visual or layout information in metadata.
Conceptually, the visual behavior of focus applied to a control should be coherent from control to control. The most sensible way to enforce coherence is to only change the focus visual style if you are composing an entire theme. Setting this property on individual control styles and not as part of a theme is not the intended usage of this property, because it may lead to a confusing user experience regarding keyboard focus. If you are intending control-specific behavior that is deliberately not coherent across a theme, a much better approach is to use triggers in styles for individual input state properties, such as <xref:System.Windows.UIElement.IsFocused%2A> or <xref:System.Windows.UIElement.IsKeyboardFocusWithin%2A>, and to do so in a way that does not visually interfere with any existing focus visual style. For more information on the design intention of <xref:System.Windows.FrameworkElement.FocusVisualStyle%2A> and alternative focus properties, see [Styling for Focus in Controls, and FocusVisualStyle](~/docs/framework/wpf/advanced/styling-for-focus-in-controls-and-focusvisualstyle.md).
<a name="xamlAttributeUsage_FocusVisualStyle"></a>
## XAML Attribute Usage
```
<object FocusVisualStyle="{resourceExtension styleResourceKey}"/>
```
<a name="xamlPropertyElementUsage_FocusVisualStyle"></a>
## XAML Property Element Usage
<a name="xamlValues_FocusVisualStyle"></a>
## XAML Values
*resourceExtension*
One of the following: , or . See [XAML Resources](~/docs/framework/wpf/advanced/xaml-resources.md).
*styleResourceKey*
The key that identifies the style being requested. The key refers to an existing resource in a <xref:System.Windows.ResourceDictionary>.
> [!NOTE]
> Property element syntax is technically possible, but not recommended. See [Inline Styles and Templates](~/docs/framework/wpf/advanced/inline-styles-and-templates.md). A binding reference using or <xref:System.Windows.Data.Binding> is also possible, but uncommon.
<a name="dependencyPropertyInfo_FocusVisualStyle"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.FocusVisualStyleProperty>|
|Metadata properties set to `true`|None|
]]></format>
</remarks>
<altmember cref="M:System.Windows.FrameworkElement.MoveFocus(System.Windows.Input.TraversalRequest)" />
</Docs>
</Member>
<Member MemberName="FocusVisualStyleProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty FocusVisualStyleProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty FocusVisualStyleProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.FocusVisualStyleProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly FocusVisualStyleProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ FocusVisualStyleProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable FocusVisualStyleProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.FocusVisualStyleProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.FocusVisualStyle" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ForceCursor">
<MemberSignature Language="C#" Value="public bool ForceCursor { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ForceCursor" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.ForceCursor" />
<MemberSignature Language="VB.NET" Value="Public Property ForceCursor As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool ForceCursor { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.ForceCursor : bool with get, set" Usage="System.Windows.FrameworkElement.ForceCursor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether this <see cref="T:System.Windows.FrameworkElement" /> should force the [!INCLUDE[TLA#tla_ui](~/includes/tlasharptla-ui-md.md)] to render the cursor as declared by the <see cref="P:System.Windows.FrameworkElement.Cursor" /> property.</summary>
<value>
<see langword="true" /> if cursor presentation while over this element is forced to use current <see cref="P:System.Windows.FrameworkElement.Cursor" /> settings for the cursor (including on all child elements); otherwise <see langword="false" />. The default value is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you set this property to `true` you will override the cursor preferences established by child elements. Doing so in general application [!INCLUDE[TLA2#tla_ui](~/includes/tla2sharptla-ui-md.md)] might be confusing for the user, particularly if child elements are attempting to specify cursors. Setting <xref:System.Windows.FrameworkElement.ForceCursor%2A> is more appropriate in control subclassing or compositing scenarios.
<a name="dependencyPropertyInfo_ForceCursor"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.ForceCursorProperty>|
|Metadata properties set to `true`|None|
## Examples
The following example forces the cursor value.
[!code-xaml[ForceCursor#ForceCursor](~/samples/snippets/csharp/VS_Snippets_Wpf/ForceCursor/CS/default.xaml#forcecursor)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Input.Cursor" />
</Docs>
</Member>
<Member MemberName="ForceCursorProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty ForceCursorProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty ForceCursorProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.ForceCursorProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly ForceCursorProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ ForceCursorProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable ForceCursorProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.ForceCursorProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.ForceCursor" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetBindingExpression">
<MemberSignature Language="C#" Value="public System.Windows.Data.BindingExpression GetBindingExpression (System.Windows.DependencyProperty dp);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Windows.Data.BindingExpression GetBindingExpression(class System.Windows.DependencyProperty dp) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.GetBindingExpression(System.Windows.DependencyProperty)" />
<MemberSignature Language="VB.NET" Value="Public Function GetBindingExpression (dp As DependencyProperty) As BindingExpression" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Data::BindingExpression ^ GetBindingExpression(System::Windows::DependencyProperty ^ dp);" />
<MemberSignature Language="F#" Value="member this.GetBindingExpression : System.Windows.DependencyProperty -&gt; System.Windows.Data.BindingExpression" Usage="frameworkElement.GetBindingExpression dp" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Data.BindingExpression</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dp" Type="System.Windows.DependencyProperty" />
</Parameters>
<Docs>
<param name="dp">The target <see cref="T:System.Windows.DependencyProperty" /> to get the binding from.</param>
<summary>Returns the <see cref="T:System.Windows.Data.BindingExpression" /> that represents the binding on the specified property.</summary>
<returns>A <see cref="T:System.Windows.Data.BindingExpression" /> if the target property has an active binding; otherwise, returns <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Checking the return value for `null` is a technique you can use to determine whether a property has an active binding.
This method is really just a convenience wrapper around the <xref:System.Windows.Data.BindingOperations.GetBindingExpression%2A?displayProperty=nameWithType> method. <xref:System.Windows.FrameworkElement.GetBindingExpression%2A> passes the current instance and the `dp` parameter to <xref:System.Windows.Data.BindingOperations.GetBindingExpression%2A?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Data.BindingOperations" />
</Docs>
</Member>
<Member MemberName="GetFlowDirection">
<MemberSignature Language="C#" Value="public static System.Windows.FlowDirection GetFlowDirection (System.Windows.DependencyObject element);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Windows.FlowDirection GetFlowDirection(class System.Windows.DependencyObject element) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.GetFlowDirection(System.Windows.DependencyObject)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetFlowDirection (element As DependencyObject) As FlowDirection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Windows::FlowDirection GetFlowDirection(System::Windows::DependencyObject ^ element);" />
<MemberSignature Language="F#" Value="static member GetFlowDirection : System.Windows.DependencyObject -&gt; System.Windows.FlowDirection" Usage="System.Windows.FrameworkElement.GetFlowDirection element" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.FlowDirection</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="element" Type="System.Windows.DependencyObject" />
</Parameters>
<Docs>
<param name="element">The element to return a <see cref="P:System.Windows.FrameworkElement.FlowDirection" /> for.</param>
<summary>Gets the value of the <see cref="P:System.Windows.FrameworkElement.FlowDirection" /> attached property for the specified <see cref="T:System.Windows.DependencyObject" />.</summary>
<returns>The requested flow direction, as a value of the enumeration.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The main purpose of this method is to support attached property syntax for the <xref:System.Windows.FrameworkElement.FlowDirection%2A> property, therefore allowing child elements of a provided <xref:System.Windows.FrameworkElement> to specify flow direction for the arrangement within their parent element. To get the value on the current <xref:System.Windows.FrameworkElement>, use the direct [!INCLUDE[TLA#tla_clr](~/includes/tlasharptla-clr-md.md)] accessor <xref:System.Windows.FrameworkElement.FlowDirection%2A>.
]]></format>
</remarks>
<altmember cref="P:System.Windows.FrameworkElement.FlowDirection" />
</Docs>
</Member>
<Member MemberName="GetLayoutClip">
<MemberSignature Language="C#" Value="protected override System.Windows.Media.Geometry GetLayoutClip (System.Windows.Size layoutSlotSize);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Media.Geometry GetLayoutClip(valuetype System.Windows.Size layoutSlotSize) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.GetLayoutClip(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetLayoutClip (layoutSlotSize As Size) As Geometry" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Media::Geometry ^ GetLayoutClip(System::Windows::Size layoutSlotSize);" />
<MemberSignature Language="F#" Value="override this.GetLayoutClip : System.Windows.Size -&gt; System.Windows.Media.Geometry" Usage="frameworkElement.GetLayoutClip layoutSlotSize" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.Geometry</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="layoutSlotSize" Type="System.Windows.Size" />
</Parameters>
<Docs>
<param name="layoutSlotSize">The size of the part of the element that does visual presentation.</param>
<summary>Returns a geometry for a clipping mask. The mask applies if the layout system attempts to arrange an element that is larger than the available display space.</summary>
<returns>The clipping geometry.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Margins will be subtracted from the `layoutSlotSize` as part of layout system behavior.
A returned null reference indicates that no clipping will occur. The default implementation always returns `null` when <xref:System.Windows.UIElement.ClipToBounds%2A> is `false`. This method overrides <xref:System.Windows.UIElement.GetLayoutClip%2A?displayProperty=nameWithType>. The <xref:System.Windows.FrameworkElement> implementation uses <xref:System.Windows.FrameworkElement.MaxHeight%2A> and <xref:System.Windows.FrameworkElement.MaxWidth%2A> in its calculations. Several subclasses of <xref:System.Windows.FrameworkElement> override this method again. <xref:System.Windows.Documents.Adorner.GetLayoutClip%2A?displayProperty=nameWithType>, overrides to always return `null` because adorners are often deliberately outside the ordinary bounds. <xref:System.Windows.Controls.Canvas.GetLayoutClip%2A?displayProperty=nameWithType> and <xref:System.Windows.Controls.InkPresenter.GetLayoutClip%2A?displayProperty=nameWithType> return `null` if <xref:System.Windows.UIElement.ClipToBounds%2A> is `false`.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The default implementation always returns <see langword="null" /> when <see cref="P:System.Windows.UIElement.ClipToBounds" /> is <see langword="false" />. Overrides are generally expected to preserve this behavior, although there are exceptions, depending on the relationship and purpose of the derived class and its layout logic as opposed to the base class.</para>
</block>
<altmember cref="P:System.Windows.UIElement.Clip" />
<altmember cref="P:System.Windows.UIElement.ClipToBounds" />
</Docs>
</Member>
<Member MemberName="GetTemplateChild">
<MemberSignature Language="C#" Value="protected internal System.Windows.DependencyObject GetTemplateChild (string childName);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance class System.Windows.DependencyObject GetTemplateChild(string childName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.GetTemplateChild(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function GetTemplateChild (childName As String) As DependencyObject" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::Windows::DependencyObject ^ GetTemplateChild(System::String ^ childName);" />
<MemberSignature Language="F#" Value="member this.GetTemplateChild : string -&gt; System.Windows.DependencyObject" Usage="frameworkElement.GetTemplateChild childName" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyObject</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="childName" Type="System.String" />
</Parameters>
<Docs>
<param name="childName">Name of the child to find.</param>
<summary>Returns the named element in the visual tree of an instantiated <see cref="T:System.Windows.Controls.ControlTemplate" />.</summary>
<returns>The requested element. May be <see langword="null" /> if no element of the requested name exists.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Templates in [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] have a self-contained namescope. This is because templates are re-used, and any name defined in a template cannot remain unique when multiple instances of a control each instantiate its template. Call the <xref:System.Windows.FrameworkElement.GetTemplateChild%2A> method to return references to objects that come from the template after it is instantiated. You cannot use the <xref:System.Windows.FrameworkElement.FindName%2A?displayProperty=nameWithType> method to find items from templates because <xref:System.Windows.FrameworkElement.FindName%2A?displayProperty=nameWithType> acts in a more general scope, and there is no connection between the <xref:System.Windows.Controls.ControlTemplate> class itself and the instantiated template once it is applied.
<xref:System.Windows.FrameworkTemplate.FindName%2A?displayProperty=nameWithType> supplies the same function as this method. <xref:System.Windows.FrameworkTemplate.FindName%2A?displayProperty=nameWithType> is public instead of protected, and it uses correct name-scoping considerations that allow it to access the template within an element and find named items within it. Use <xref:System.Windows.FrameworkTemplate.FindName%2A?displayProperty=nameWithType> when you need to get an element outside of its parent control.
]]></format>
</remarks>
<altmember cref="M:System.Windows.FrameworkTemplate.FindName(System.String,System.Windows.FrameworkElement)" />
</Docs>
</Member>
<Member MemberName="GetUIParentCore">
<MemberSignature Language="C#" Value="protected internal override System.Windows.DependencyObject GetUIParentCore ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance class System.Windows.DependencyObject GetUIParentCore() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.GetUIParentCore" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Function GetUIParentCore () As DependencyObject" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override System::Windows::DependencyObject ^ GetUIParentCore();" />
<MemberSignature Language="F#" Value="override this.GetUIParentCore : unit -&gt; System.Windows.DependencyObject" Usage="frameworkElement.GetUIParentCore " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyObject</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns an alternative logical parent for this element if there is no visual parent.</summary>
<returns>Returns something other than <see langword="null" /> whenever a WPF framework-level implementation of this method has a non-visual parent connection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overrides <xref:System.Windows.UIElement.GetUIParentCore%2A?displayProperty=nameWithType>. The default <xref:System.Windows.FrameworkElement> implementation returns the expected single visual parent, which is the same result as getting the <xref:System.Windows.FrameworkElement.Parent%2A> value. Derived class implementations might return alternate parent relationships.
]]></format>
</remarks>
<altmember cref="P:System.Windows.FrameworkElement.Parent" />
</Docs>
</Member>
<Member MemberName="GetVisualChild">
<MemberSignature Language="C#" Value="protected override System.Windows.Media.Visual GetVisualChild (int index);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Media.Visual GetVisualChild(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.GetVisualChild(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetVisualChild (index As Integer) As Visual" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Media::Visual ^ GetVisualChild(int index);" />
<MemberSignature Language="F#" Value="override this.GetVisualChild : int -&gt; System.Windows.Media.Visual" Usage="frameworkElement.GetVisualChild index" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.Visual</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The zero-based index of the requested child element in the collection.</param>
<summary>Overrides <see cref="M:System.Windows.Media.Visual.GetVisualChild(System.Int32)" />, and returns a child at the specified index from a collection of child elements.</summary>
<returns>The requested child element. This should not return <see langword="null" />; if the provided index is out of range, an exception is thrown.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In the <xref:System.Windows.FrameworkElement> implementation, the only valid index is zero. The content model for <xref:System.Windows.FrameworkElement.GetVisualChild%2A> supports either zero or one child elements, not a collection.
## Examples
The following example shows how a custom adorner uses the values declared by a <xref:System.Windows.Media.VisualCollection> that it maintains for its multiple visual children. These values are reported through overrides of <xref:System.Windows.FrameworkElement.VisualChildrenCount%2A> and <xref:System.Windows.FrameworkElement.GetVisualChild%2A>.
[!code-csharp[Adorners_ResizingAdorner#FEVisualOverridesPre](~/samples/snippets/csharp/VS_Snippets_Wpf/Adorners_ResizingAdorner/CSharp/ResizingAdorner.cs#fevisualoverridespre)]
[!code-vb[Adorners_ResizingAdorner#FEVisualOverridesPre](~/samples/snippets/visualbasic/VS_Snippets_Wpf/Adorners_ResizingAdorner/visualbasic/resizingadorner.vb#fevisualoverridespre)]
[!code-csharp[Adorners_ResizingAdorner#FEVisualOverrides](~/samples/snippets/csharp/VS_Snippets_Wpf/Adorners_ResizingAdorner/CSharp/ResizingAdorner.cs#fevisualoverrides)]
[!code-vb[Adorners_ResizingAdorner#FEVisualOverrides](~/samples/snippets/visualbasic/VS_Snippets_Wpf/Adorners_ResizingAdorner/visualbasic/resizingadorner.vb#fevisualoverrides)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>This implementation is only valid for elements that do not maintain any more descriptive collection of visual child elements. Any element that does have such a collection must override this method and map the index to an equivalent index in the child element collection that is supported by that element. An index in the range from zero to <see cref="P:System.Windows.FrameworkElement.VisualChildrenCount" /> (minus one) should return a valid element; any other index should throw an out-of-range exception. An example of an element type that does support a child collection and overrides <see cref="M:System.Windows.FrameworkElement.GetVisualChild(System.Int32)" /> to return more than one possible child is <see cref="T:System.Windows.Controls.Panel" />.
The default implementation in <see cref="T:System.Windows.FrameworkElement" /> presumes only one visual child. Any value passed for <paramref name="index" /> other than zero causes an exception to be thrown. Several common elements, such as decorators, adorners, or elements with specialized rendering, override the <see cref="T:System.Windows.FrameworkElement" /> implementation (of the implementation from intermediate base classes). Some implementations still enforce one visual child whereas others allow a collection.</para>
</block>
</Docs>
</Member>
<Member MemberName="Height">
<MemberSignature Language="C#" Value="public double Height { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 Height" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.Height" />
<MemberSignature Language="VB.NET" Value="Public Property Height As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property double Height { double get(); void set(double value); };" />
<MemberSignature Language="F#" Value="member this.Height : double with get, set" Usage="System.Windows.FrameworkElement.Height" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the suggested height of the element.</summary>
<value>The height of the element, in [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]. The default value is <see cref="F:System.Double.NaN" />. This value must be equal to or greater than 0.0.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.FrameworkElement.Height%2A> is one of three writable properties on <xref:System.Windows.FrameworkElement> that specify height information. The other two are <xref:System.Windows.FrameworkElement.MinHeight%2A> and <xref:System.Windows.FrameworkElement.MaxHeight%2A>. If there is a conflict between these values, the order of application for actual height determination is that first <xref:System.Windows.FrameworkElement.MinHeight%2A> must be honored, then <xref:System.Windows.FrameworkElement.MaxHeight%2A>, and finally, if it is within bounds, <xref:System.Windows.FrameworkElement.Height%2A>.
If this element is a child element within some other element, then setting this property to a value is really only a suggested value. The layout system as well as the particular layout logic of the parent element will use the value as a nonbinding input during the layout process. In practical terms, a <xref:System.Windows.FrameworkElement> is almost always the child element of something else; even when you set the <xref:System.Windows.FrameworkElement.Height%2A> on <xref:System.Windows.Window>. (For <xref:System.Windows.Window>, that value is used when the underlying application model establishes the basic rendering assumptions that create the Hwnd that hosts the application.)
In addition to acceptable <xref:System.Double> values, this property can also be <xref:System.Double.NaN?displayProperty=nameWithType>. This is how you specify auto sizing behavior in code. In [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] you set the value to the string "Auto" (case insensitive) to enable the auto sizing behavior. Auto sizing behavior implies that the element will fill the height available to it. Note however that specific controls frequently supply default values through their default theme styles that will disable the auto sizing behavior unless it is specifically re-enabled.
The return value of this property is always the same as any value that was set to it. In contrast, the value of the <xref:System.Windows.FrameworkElement.ActualHeight%2A> may vary. This can happen either statically because the layout rejected the suggested size for some reason, or momentarily. The layout system itself works asynchronously relative to the property system's set of <xref:System.Windows.FrameworkElement.Height%2A> and may not have processed that particular sizing property change yet.
The value restrictions on the <xref:System.Double> value are enforced by a <xref:System.Windows.ValidateValueCallback> mechanism. If you attempt to set an invalid value, a run-time exception is thrown.
In addition to the validation check, there is a nondeterministic upper value bound for <xref:System.Windows.FrameworkElement.Height%2A> that is enforced by the layout system (this is a very large number, larger than <xref:System.Single.MaxValue?displayProperty=nameWithType> but smaller than <xref:System.Double.MaxValue?displayProperty=nameWithType>). If you exceed this bound, the element will not render, and no exception is thrown. Do not set <xref:System.Windows.FrameworkElement.Height%2A> to a value that is significantly larger than the maximum size of any possible visual display, or you may exceed this nondeterministic upper bound.
<a name="xamlAttributeUsage_Height"></a>
## XAML Attribute Usage
```
<object Height="double"/>
- or -
<object Height="qualifiedDouble"/>
- or -
<object Height="Auto"/>
```
<a name="xamlValues_Height"></a>
## XAML Values
*double*
<xref:System.Double>
String representation of a <xref:System.Double> value equal to or greater than 0.0. See Remarks for upper bound information. This value is interpreted as a [!INCLUDE[TLA#tla_dipixel](~/includes/tlasharptla-dipixel-md.md)] measurement. Strings need not explicitly include decimal points. For instance a value of `1` is acceptable.
*qualifiedDouble*
A *double* value as described above, followed by one of the following unit declaration strings: `px`, `in`, `cm`, `pt`.
`px` (default) is [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]
`in` is inches; 1in==96px
`cm` is centimeters; 1cm==(96/2.54) px
`pt` is points; 1pt==(96/72) px
**Auto**
Enables autosizing behavior. See Remarks.
<a name="dependencyPropertyInfo_Height"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.HeightProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
]]></format>
</remarks>
<altmember cref="P:System.Windows.FrameworkElement.ActualHeight" />
</Docs>
</Member>
<Member MemberName="HeightProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty HeightProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty HeightProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.HeightProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly HeightProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ HeightProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable HeightProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.HeightProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.Height" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HorizontalAlignment">
<MemberSignature Language="C#" Value="public System.Windows.HorizontalAlignment HorizontalAlignment { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.HorizontalAlignment HorizontalAlignment" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.HorizontalAlignment" />
<MemberSignature Language="VB.NET" Value="Public Property HorizontalAlignment As HorizontalAlignment" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::HorizontalAlignment HorizontalAlignment { System::Windows::HorizontalAlignment get(); void set(System::Windows::HorizontalAlignment value); };" />
<MemberSignature Language="F#" Value="member this.HorizontalAlignment : System.Windows.HorizontalAlignment with get, set" Usage="System.Windows.FrameworkElement.HorizontalAlignment" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.HorizontalAlignment</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the horizontal alignment characteristics applied to this element when it is composed within a parent element, such as a panel or items control.</summary>
<value>A horizontal alignment setting, as a value of the enumeration. The default is <see cref="F:System.Windows.HorizontalAlignment.Stretch" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When <xref:System.Windows.FrameworkElement.Height%2A> and <xref:System.Windows.FrameworkElement.Width%2A> properties are explicitly set on an element, these measurements take higher precedent during layout and will cancel the typical effects of setting <xref:System.Windows.FrameworkElement.HorizontalAlignment%2A> to <xref:System.Windows.HorizontalAlignment.Stretch>.
<xref:System.Windows.FrameworkElement.HorizontalAlignment%2A> is the [!INCLUDE[TLA#tla_net](~/includes/tlasharptla-net-md.md)] property accessor for what is in reality a dependency property. This particular dependency property quite frequently has its apparent "default" value set differently in subclassed elements, particularly controls. This generally occurs in one of two ways: the dependency property is re-registered to a particular subclass, but with different metadata for setting its defaults; or there is a default style being applied that sets that dependency property value differently. For example, the apparent "default" of <xref:System.Windows.FrameworkElement.HorizontalAlignment%2A> for a <xref:System.Windows.Controls.Label> control will be <xref:System.Windows.HorizontalAlignment.Left>, even though <xref:System.Windows.Controls.Label> inherits <xref:System.Windows.FrameworkElement.HorizontalAlignment%2A> direct from <xref:System.Windows.FrameworkElement>. This is because that value was reset within the default style of <xref:System.Windows.Controls.Label>, within the style's control template.
<xref:System.Windows.Controls.Canvas> does not use <xref:System.Windows.FrameworkElement.HorizontalAlignment%2A> when composing layout, because <xref:System.Windows.Controls.Canvas> is based on absolute positioning.
When inherited by <xref:System.Windows.Controls.Label> or derived classes, <xref:System.Windows.Controls.Label> redefines the default value of this dependency property to be <xref:System.Windows.HorizontalAlignment.Left>.
<a name="dependencyPropertyInfo_HorizontalAlignment"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.HorizontalAlignmentProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsArrange%2A>|
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HorizontalAlignmentProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty HorizontalAlignmentProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty HorizontalAlignmentProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.HorizontalAlignmentProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly HorizontalAlignmentProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ HorizontalAlignmentProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable HorizontalAlignmentProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.HorizontalAlignmentProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.HorizontalAlignment" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="InheritanceBehavior">
<MemberSignature Language="C#" Value="protected internal System.Windows.InheritanceBehavior InheritanceBehavior { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.InheritanceBehavior InheritanceBehavior" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.InheritanceBehavior" />
<MemberSignature Language="VB.NET" Value="Protected Friend Property InheritanceBehavior As InheritanceBehavior" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; property System::Windows::InheritanceBehavior InheritanceBehavior { System::Windows::InheritanceBehavior get(); void set(System::Windows::InheritanceBehavior value); };" />
<MemberSignature Language="F#" Value="member this.InheritanceBehavior : System.Windows.InheritanceBehavior with get, set" Usage="System.Windows.FrameworkElement.InheritanceBehavior" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.InheritanceBehavior</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the scope limits for property value inheritance, resource key lookup, and RelativeSource FindAncestor lookup.</summary>
<value>A value of the enumeration. The default is <see cref="F:System.Windows.InheritanceBehavior.Default" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Certain boundaries in the element tree set <xref:System.Windows.FrameworkElement.InheritanceBehavior%2A> to deliberately limit the scope of inheritance behavior, to a force resource lookup to check the application resources, or to prevent a RelativeSource FindAncestor lookup from querying the current element or any further. RelativeSource FindAncestor lookup occurs when a binding uses a <xref:System.Windows.Data.RelativeSource> that has its <xref:System.Windows.Data.RelativeSource.Mode%2A> property set to the <xref:System.Windows.Data.RelativeSourceMode.FindAncestor?displayProperty=nameWithType> value.
If you want your derived class to set this property, you should do so within the static constructor or in other initialization routines.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.Frame" />
</Docs>
</Member>
<Member MemberName="Initialized">
<MemberSignature Language="C#" Value="public event EventHandler Initialized;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Initialized" />
<MemberSignature Language="DocId" Value="E:System.Windows.FrameworkElement.Initialized" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Initialized As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ Initialized;" />
<MemberSignature Language="F#" Value="member this.Initialized : EventHandler " Usage="member this.Initialized : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when this <see cref="T:System.Windows.FrameworkElement" /> is initialized. This event coincides with cases where the value of the <see cref="P:System.Windows.FrameworkElement.IsInitialized" /> property changes from <see langword="false" /> (or undefined) to <see langword="true" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event will be raised whenever the <xref:System.Windows.FrameworkElement.EndInit%2A> or <xref:System.Windows.FrameworkElement.OnVisualParentChanged%2A> methods are called. Calls to either method could have come from application code, or through the [!INCLUDE[TLA#tla_xaml](~/includes/tlasharptla-xaml-md.md)] processor behavior when a [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] page is processed.
Whether you choose to handle <xref:System.Windows.FrameworkElement.Loaded> or <xref:System.Windows.FrameworkElement.Initialized> depends on your requirements. If you do not need to read element properties, intend to reset properties, and do not need any layout information, <xref:System.Windows.FrameworkElement.Initialized> might be the better event to act upon. If you need all properties of the element to be available, and you will be setting properties that are likely to reset the layout, <xref:System.Windows.FrameworkElement.Loaded> might be the better event to act upon. Be careful of reentrancy if your handler resets any properties that are interpreted by the layout system to mean that a new layout pass is required. (You might need to check the <xref:System.Windows.FrameworkPropertyMetadata> values on the property if you are unsure of which properties can require a new layout pass if they are changed.)
For more information about the sequence of object events for a <xref:System.Windows.FrameworkElement>, and also for several related application and element classes, see [Object Lifetime Events](~/docs/framework/wpf/advanced/object-lifetime-events.md).
]]></format>
</remarks>
<altmember cref="M:System.Windows.FrameworkElement.OnInitialized(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="InputScope">
<MemberSignature Language="C#" Value="public System.Windows.Input.InputScope InputScope { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Input.InputScope InputScope" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.InputScope" />
<MemberSignature Language="VB.NET" Value="Public Property InputScope As InputScope" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Input::InputScope ^ InputScope { System::Windows::Input::InputScope ^ get(); void set(System::Windows::Input::InputScope ^ value); };" />
<MemberSignature Language="F#" Value="member this.InputScope : System.Windows.Input.InputScope with get, set" Usage="System.Windows.FrameworkElement.InputScope" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Input.InputScope</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the context for input used by this <see cref="T:System.Windows.FrameworkElement" />.</summary>
<value>The input scope, which modifies how input from alternative input methods is interpreted. The default value is <see langword="null" /> (which results in a default handling of commands).</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This dependency property inherits property values. If there are child elements without other values for <xref:System.Windows.FrameworkElement.InputScope%2A> established through local values or styles, then the property system will set the value to be the <xref:System.Windows.FrameworkElement.InputScope%2A> value of the nearest ancestor element with this value assigned.
Although a [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] syntax usage is listed and is syntactically allowed, setting this property in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] is not common.
<a name="dependencyPropertyInfo_InputScope"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.InputScopeProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.Inherits%2A>|
]]></format>
</remarks>
<altmember cref="T:System.Windows.Input.InputScope" />
<altmember cref="T:System.Windows.IInputElement" />
</Docs>
</Member>
<Member MemberName="InputScopeProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty InputScopeProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty InputScopeProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.InputScopeProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly InputScopeProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ InputScopeProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable InputScopeProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.InputScopeProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.InputScope" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsInitialized">
<MemberSignature Language="C#" Value="public bool IsInitialized { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsInitialized" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.IsInitialized" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsInitialized As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsInitialized { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsInitialized : bool" Usage="System.Windows.FrameworkElement.IsInitialized" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether this element has been initialized, either during processing by a [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] processor, or by explicitly having its <see cref="M:System.Windows.FrameworkElement.EndInit" /> method called.</summary>
<value>
<see langword="true" /> if the element is initialized per the aforementioned [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] processing or method calls; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property may also be `true` if this element has been moved within the logical tree such that it has a new parent element, and therefore becomes reloaded again.
This property is useful if you also are using <xref:System.Windows.FrameworkElement.BeginInit%2A> and <xref:System.Windows.FrameworkElement.EndInit%2A>. Elements in the logical tree that is loaded by a [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] processor are assured to be initialized. Elements not in the logical tree are initialized when <xref:System.Windows.FrameworkElement.EndInit%2A> is called. In absence of any specific handling of <xref:System.Windows.FrameworkElement.BeginInit%2A> and <xref:System.Windows.FrameworkElement.EndInit%2A>, this will happen as soon as the constructor returns the initialized result.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsLoaded">
<MemberSignature Language="C#" Value="public bool IsLoaded { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsLoaded" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.IsLoaded" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsLoaded As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsLoaded { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsLoaded : bool" Usage="System.Windows.FrameworkElement.IsLoaded" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether this element has been loaded for presentation.</summary>
<value>
<see langword="true" /> if the current element is attached to an element tree; <see langword="false" /> if the element has never been attached to a loaded element tree.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
From a newly constructed <xref:System.Windows.FrameworkElement>, this property starts off `false`, and remains `true` after it is set to `true`, even if the element is subsequently removed from a connected logical tree by code. `true` state is set by the general presentation logic when elements are loaded into the presentation engine.
Typically, loaded elements are rendered, but not all <xref:System.Windows.FrameworkElement> derived classes have a presentation, and other properties such as <xref:System.Windows.UIElement.Visibility%2A> can influence presentation.
## Examples
The following example implements two handlers: one is handling the <xref:System.Windows.FrameworkElement.Loaded> event of the root element, so it is certain that the page root element is loaded because that is the significance of the event. The other handler is hooked to a user control, and calls <xref:System.Windows.FrameworkElement.IsLoaded%2A> to assure that the root element is loaded completely. Both handlers call the same function (not shown) that will populate child elements with fresh data.
[!code-csharp[GroupBoxExample#FEIsLoaded](~/samples/snippets/csharp/VS_Snippets_Wpf/GroupBoxExample/CSharp/Page1.xaml.cs#feisloaded)]
]]></format>
</remarks>
<altmember cref="E:System.Windows.FrameworkElement.Loaded" />
</Docs>
</Member>
<Member MemberName="Language">
<MemberSignature Language="C#" Value="public System.Windows.Markup.XmlLanguage Language { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Markup.XmlLanguage Language" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.Language" />
<MemberSignature Language="VB.NET" Value="Public Property Language As XmlLanguage" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Markup::XmlLanguage ^ Language { System::Windows::Markup::XmlLanguage ^ get(); void set(System::Windows::Markup::XmlLanguage ^ value); };" />
<MemberSignature Language="F#" Value="member this.Language : System.Windows.Markup.XmlLanguage with get, set" Usage="System.Windows.FrameworkElement.Language" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Markup.XmlLanguage</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets localization/globalization language information that applies to an element.</summary>
<value>The language information for this element. The default value is an <see cref="T:System.Windows.Markup.XmlLanguage" /> with its <see cref="P:System.Windows.Markup.XmlLanguage.IetfLanguageTag" /> value set to the string "en-US".</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The string formats follow the RFC 3066 standard. For example, U.S. English is "en-US". For more information on the values and format, see <xref:System.Windows.Markup.XmlLanguage>.
This dependency property inherits property values. If there are child elements without other values for <xref:System.Windows.FrameworkElement.Language%2A> established through local values or styles, the property system will set the value to be the <xref:System.Windows.FrameworkElement.Language%2A> value of the nearest ancestor element with this value assigned.
[!INCLUDE[TLA2#tla_xml](~/includes/tla2sharptla-xml-md.md)] defines the general meaning of the `xml:lang` attribute. <xref:System.Windows.FrameworkElement.Language%2A> essentially exposes the meaning of this attribute as a dependency property. <xref:System.Windows.FrameworkElement.Language%2A> can be adjusted programmatically, and can participate in property system value inheritance in a way that parallels how the `xml:lang` attribute can inherit to child element scope in [!INCLUDE[TLA2#tla_xml](~/includes/tla2sharptla-xml-md.md)]. If you set <xref:System.Windows.FrameworkElement.Language%2A>, that value becomes the `xml:lang` and overwrites any previous value. For more information, see [xml:lang Handling in XAML](~/docs/framework/xaml-services/xml-lang-handling-in-xaml.md).
<a name="dependencyPropertyInfo_CultureInfo"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.LanguageProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.Inherits%2A>|
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="LanguageProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty LanguageProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty LanguageProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.LanguageProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly LanguageProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ LanguageProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable LanguageProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.LanguageProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.Language" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="LayoutTransform">
<MemberSignature Language="C#" Value="public System.Windows.Media.Transform LayoutTransform { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Media.Transform LayoutTransform" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.LayoutTransform" />
<MemberSignature Language="VB.NET" Value="Public Property LayoutTransform As Transform" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Media::Transform ^ LayoutTransform { System::Windows::Media::Transform ^ get(); void set(System::Windows::Media::Transform ^ value); };" />
<MemberSignature Language="F#" Value="member this.LayoutTransform : System.Windows.Media.Transform with get, set" Usage="System.Windows.FrameworkElement.LayoutTransform" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.Transform</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a graphics transformation that should apply to this element when layout is performed.</summary>
<value>The transform this element should use. The default is <see cref="P:System.Windows.Media.Transform.Identity" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In contrast to <xref:System.Windows.UIElement.RenderTransform%2A>, <xref:System.Windows.FrameworkElement.LayoutTransform%2A> will affect results of layout.
Setting a transform provides powerful capabilities of scaling and rotating. However, <xref:System.Windows.FrameworkElement.LayoutTransform%2A> ignores <xref:System.Windows.Media.TranslateTransform> operations. This is because the layout system behavior for child elements of a <xref:System.Windows.FrameworkElement> auto-corrects any offsets to the position of a scaled or rotated element into the layout and coordinate system of the parent element.
<xref:System.Windows.FrameworkElement.LayoutTransform%2A> can lead to poor application performance if you invoke it in a scenario that does not require a full pass by the layout system. When you apply a <xref:System.Windows.FrameworkElement.LayoutTransform%2A> to the <xref:System.Windows.Controls.Panel.Children%2A> collection of the <xref:System.Windows.Controls.Panel>, it triggers a new pass by the layout system and forces all on-screen objects to be remeasured and rearranged. If you are updating the complete application [!INCLUDE[TLA#tla_ui](~/includes/tlasharptla-ui-md.md)], this functionality might be exactly what you need. However, if you do not need a full layout pass, use the <xref:System.Windows.UIElement.RenderTransform%2A> property, which does not invoke the layout system, and therefore, is typically a better choice for this scenario.
Example scenarios where <xref:System.Windows.FrameworkElement.LayoutTransform%2A> would be useful include: rotating elements such as menu components from horizontal to vertical or vice versa, scaling elements (zooming in) on focus, providing editing behavior, etc.
<a name="dependencyPropertyInfo_LayoutTransform"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.LayoutTransformProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
## Examples
The following example shows how to apply a <xref:System.Windows.FrameworkElement.LayoutTransform%2A> to an element. The example creates an instance of <xref:System.Windows.Controls.Button> and hosts it within a parent <xref:System.Windows.Controls.Grid>. It also uses the <xref:System.Windows.FrameworkElement.LayoutTransform%2A> property to apply a <xref:System.Windows.Media.RotateTransform> to the <xref:System.Windows.Controls.Button>.
[!code-cpp[LayoutTransform#1](~/samples/snippets/cpp/VS_Snippets_Wpf/LayoutTransform/CPP/LayoutTransform.cpp#1)]
[!code-csharp[LayoutTransform#1](~/samples/snippets/csharp/VS_Snippets_Wpf/LayoutTransform/CSharp/LayoutTransform.cs#1)]
[!code-vb[LayoutTransform#1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/LayoutTransform/VisualBasic/LayoutTransform.vb#1)]
[!code-xaml[LayoutTransform#1](~/samples/snippets/xaml/VS_Snippets_Wpf/LayoutTransform/XAML/default.xaml#1)]
]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=158252">2-D Transforms Sample</related>
</Docs>
</Member>
<Member MemberName="LayoutTransformProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty LayoutTransformProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty LayoutTransformProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.LayoutTransformProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly LayoutTransformProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ LayoutTransformProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable LayoutTransformProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.LayoutTransformProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.LayoutTransform" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Loaded">
<MemberSignature Language="C#" Value="public event System.Windows.RoutedEventHandler Loaded;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.RoutedEventHandler Loaded" />
<MemberSignature Language="DocId" Value="E:System.Windows.FrameworkElement.Loaded" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Loaded As RoutedEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::RoutedEventHandler ^ Loaded;" />
<MemberSignature Language="F#" Value="member this.Loaded : System.Windows.RoutedEventHandler " Usage="member this.Loaded : System.Windows.RoutedEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the element is laid out, rendered, and ready for interaction.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.FrameworkElement.Loaded> is usually the last event raised in an element initialization sequence. It will always be raised after <xref:System.Windows.FrameworkElement.Initialized>. Whether you choose to handle <xref:System.Windows.FrameworkElement.Loaded> or <xref:System.Windows.FrameworkElement.Initialized> depends on your requirements. If you do not need to read element properties, intend to reset properties, and do not need any layout information, <xref:System.Windows.FrameworkElement.Initialized> might be the better event to act upon. If you need all properties of the element to be available, and you will be setting properties that are likely to reset the layout, <xref:System.Windows.FrameworkElement.Loaded> might be the better event to act upon. Be careful of reentrancy if your handler resets any properties that are interpreted by the layout system to mean that a new layout pass is required. (You might need to check the <xref:System.Windows.FrameworkPropertyMetadata> values on the property if you are unsure of which properties can require a new layout pass if they are changed.)
For more information about the sequence of object events for a <xref:System.Windows.FrameworkElement>, and also for several related application and element classes, see [Object Lifetime Events](~/docs/framework/wpf/advanced/object-lifetime-events.md).
Direct routed events do not follow a route, they are only handled within the same element on which they are raised. Direct routed events do support other routed event behavior: they support an accessible handlers collection, and can be used as an <xref:System.Windows.EventTrigger> in a style.
<xref:System.Windows.FrameworkElement.Loaded> and <xref:System.Windows.FrameworkElement.Unloaded> might both be raised on controls as a result of user-initiated system theme changes. A theme change causes an invalidation of the control template and the contained visual tree, which in turn causes the entire control to unload and reload. Therefore <xref:System.Windows.FrameworkElement.Loaded> cannot be assumed to occur only when a page is first loaded through navigation to the page.
<a name="routedEventInfo_Loaded"></a>
## Routed Event Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.LoadedEvent>|
|Routing strategy|Direct|
|Delegate|<xref:System.Windows.RoutedEventHandler>|
]]></format>
</remarks>
<altmember cref="M:System.Windows.UIElement.OnRender(System.Windows.Media.DrawingContext)" />
</Docs>
</Member>
<Member MemberName="LoadedEvent">
<MemberSignature Language="C#" Value="public static readonly System.Windows.RoutedEvent LoadedEvent;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.RoutedEvent LoadedEvent" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.LoadedEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly LoadedEvent As RoutedEvent " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::RoutedEvent ^ LoadedEvent;" />
<MemberSignature Language="F#" Value=" staticval mutable LoadedEvent : System.Windows.RoutedEvent" Usage="System.Windows.FrameworkElement.LoadedEvent" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.RoutedEvent</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="E:System.Windows.FrameworkElement.Loaded" /> routed event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Routed event identifiers are created when routed events are registered. These identifiers contain an identifying name, owner type, handler type, routing strategy, and utility method for adding owners for the event. You can use these identifiers to add class handlers.
For more information about registering routed events, see <xref:System.Windows.EventManager.RegisterRoutedEvent%2A>. For more information about using routed event identifiers to add class handlers, see <xref:System.Windows.EventManager.RegisterClassHandler%2A>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="LogicalChildren">
<MemberSignature Language="C#" Value="protected internal virtual System.Collections.IEnumerator LogicalChildren { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IEnumerator LogicalChildren" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.LogicalChildren" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable ReadOnly Property LogicalChildren As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Collections::IEnumerator ^ LogicalChildren { System::Collections::IEnumerator ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LogicalChildren : System.Collections.IEnumerator" Usage="System.Windows.FrameworkElement.LogicalChildren" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an enumerator for logical child elements of this element.</summary>
<value>An enumerator for logical child elements of this element.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.FrameworkElement.LogicalChildren%2A> allows you to iterate over child elements. This is useful for elements that may not have a defined, dedicated collection but still contain more than one child element, particularly <xref:System.Windows.FrameworkContentElement> child elements.
For more information on how to use <xref:System.Windows.FrameworkElement.LogicalChildren%2A> and <xref:System.Windows.FrameworkElement.AddLogicalChild%2A>, see [Trees in WPF](~/docs/framework/wpf/advanced/trees-in-wpf.md).
]]></format>
</remarks>
<related type="Article" href="https://msdn.microsoft.com/library/c5358e14-d24c-44c7-b5eb-6062a4fd981c">x:Array Markup Extension</related>
</Docs>
</Member>
<Member MemberName="Margin">
<MemberSignature Language="C#" Value="public System.Windows.Thickness Margin { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Thickness Margin" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.Margin" />
<MemberSignature Language="VB.NET" Value="Public Property Margin As Thickness" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Thickness Margin { System::Windows::Thickness get(); void set(System::Windows::Thickness value); };" />
<MemberSignature Language="F#" Value="member this.Margin : System.Windows.Thickness with get, set" Usage="System.Windows.FrameworkElement.Margin" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Thickness</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the outer margin of an element.</summary>
<value>Provides margin values for the element. The default value is a <see cref="T:System.Windows.Thickness" /> with all properties equal to 0 (zero).</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The margin is the space between this element and other elements that will be adjacent when layout creates the [!INCLUDE[TLA#tla_ui](~/includes/tlasharptla-ui-md.md)]. Shared elements might be peer elements (such as other elements in the collection of a common parent control), or might also be this element's parent.
<xref:System.Windows.FrameworkElement.Margin%2A> is set as a <xref:System.Windows.Thickness> structure rather than as a number so that the margin can be set asymmetrically. The <xref:System.Windows.Thickness> structure itself supports string type conversion so that you can specify an asymmetric <xref:System.Windows.FrameworkElement.Margin%2A> in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] attribute syntax also.
A non-zero margin applies space outside the element layout's <xref:System.Windows.FrameworkElement.ActualWidth%2A> and <xref:System.Windows.FrameworkElement.ActualHeight%2A>.
Margins are additive for sibling elements in a layout; for example, two adjacent elements both with a margin of 30 set on the adjoining edge would have 60 units of space between them.
Elements that have margins set will not typically constrain the size of the specified <xref:System.Windows.FrameworkElement.Margin%2A> if the allotted rectangle space is not large enough for the margin plus the element content area. The element content area will be constrained instead when layout is calculated. The only case where margins would be constrained also is if the content is already constrained all the way to zero.
<a name="xamlAttributeUsage_Margin"></a>
## XAML Attribute Usage
```
<object Margin="left,top,right,bottom"/>
- or -
<object Margin="left,top"/>
- or -
<object Margin="thicknessReference"/>
```
<a name="xamlPropertyElementUsage_Margin"></a>
## XAML Property Element Usage
```
<object>
<object.Margin>
<Thickness Left="left" Top="top" Right="right" Bottom="bottom"/>
</object.Margin>
</object>
```
<a name="xamlValues_Margin"></a>
## XAML Values
*left, top, right, bottom*
Number values between 0 and <xref:System.Double.PositiveInfinity> that specify the four possible dimension properties of a <xref:System.Windows.Thickness> structure.
The attribute usage will also accept abbreviated values that apply in the order provided, symmetrically and logically. For instance, `Margin="20"` will be interpreted to mean a <xref:System.Windows.Thickness> with all properties set to 20. `Margin="20,50"` will be interpreted to mean a <xref:System.Windows.Thickness> with <xref:System.Windows.Thickness.Left%2A> and <xref:System.Windows.Thickness.Right%2A> set to 20, and <xref:System.Windows.Thickness.Top%2A> and <xref:System.Windows.Thickness.Bottom%2A> set to 50.
The default unit for a <xref:System.Windows.Thickness> measure is [!INCLUDE[TLA#tla_dipixel](~/includes/tlasharptla-dipixel-md.md)]. You can also specify other units by appending the unit type strings `cm`, `in`, or `pt` to any measure.
Number values provided as [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] attributes need not specify decimal points (0 is acceptable, does not have to be provided as 0.0). For more information on [!INCLUDE[TLA#tla_xaml](~/includes/tlasharptla-xaml-md.md)] usage, see <xref:System.Windows.Thickness>.
*thicknessReference*
An object reference to an existing <xref:System.Windows.Thickness>. This might be a `}`, a , or `}` reference. For more information on [!INCLUDE[TLA#tla_xaml](~/includes/tlasharptla-xaml-md.md)] usage, see <xref:System.Windows.Thickness>.
<a name="dependencyPropertyInfo_Margin"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.MarginProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
]]></format>
</remarks>
<altmember cref="T:System.Windows.Thickness" />
</Docs>
</Member>
<Member MemberName="MarginProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty MarginProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty MarginProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.MarginProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MarginProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ MarginProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable MarginProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.MarginProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.Margin" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MaxHeight">
<MemberSignature Language="C#" Value="public double MaxHeight { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 MaxHeight" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.MaxHeight" />
<MemberSignature Language="VB.NET" Value="Public Property MaxHeight As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property double MaxHeight { double get(); void set(double value); };" />
<MemberSignature Language="F#" Value="member this.MaxHeight : double with get, set" Usage="System.Windows.FrameworkElement.MaxHeight" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the maximum height constraint of the element.</summary>
<value>The maximum height of the element, in [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]. The default value is <see cref="F:System.Double.PositiveInfinity" />. This value can be any value equal to or greater than 0.0. <see cref="F:System.Double.PositiveInfinity" /> is also valid.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is one of three properties on <xref:System.Windows.FrameworkElement> that specify height information. The other two are <xref:System.Windows.FrameworkElement.MinHeight%2A> and <xref:System.Windows.FrameworkElement.Height%2A>. If there is a conflict between these values, the order of application for actual height determination is first <xref:System.Windows.FrameworkElement.MinHeight%2A> must be honored, then <xref:System.Windows.FrameworkElement.MaxHeight%2A>, and finally if each of these are within bounds, <xref:System.Windows.FrameworkElement.Height%2A>.
The value restrictions on the <xref:System.Double> value are enforced by a <xref:System.Windows.ValidateValueCallback> mechanism. If you attempt to set an invalid value a run-time exception is thrown.
<a name="xamlAttributeUsage_MaxHeight"></a>
## XAML Attribute Usage
```
<object MaxHeight="double"/>
- or -
<object MaxHeight ="qualifiedDouble"/>
```
<a name="xamlValues_MaxHeight"></a>
## XAML Values
*double*
<xref:System.Double>
String representation of a <xref:System.Double> value equal to or greater than 0.0. This is interpreted as a [!INCLUDE[TLA#tla_dipixel](~/includes/tlasharptla-dipixel-md.md)] measurement. Strings need not explicitly include decimal points. For instance a value of `1` is acceptable.
The same <xref:System.Double> range restrictions as mentioned in the Property Value section apply, except that you must use [x:Static Markup Extension](~/docs/framework/xaml-services/x-static-markup-extension.md) if you need to explicitly set the value to be <xref:System.Double.PositiveInfinity>.
*qualifiedDouble*
A *double* value as described above, followed by one of the following unit declaration strings: `px`, `in`, `cm`, `pt`.
`px` (default) is [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]
`in` is inches; 1in==96px
`cm` is centimeters; 1cm==(96/2.54) px
`pt` is points; 1pt==(96/72) px
<a name="dependencyPropertyInfo_MaxHeight"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.MaxHeightProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MaxHeightProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty MaxHeightProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty MaxHeightProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.MaxHeightProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MaxHeightProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ MaxHeightProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable MaxHeightProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.MaxHeightProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.MaxHeight" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MaxWidth">
<MemberSignature Language="C#" Value="public double MaxWidth { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 MaxWidth" />
<MemberSignature Language="DocId" Value="P:System.Windows.FrameworkElement.MaxWidth" />
<MemberSignature Language="VB.NET" Value="Public Property MaxWidth As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property double MaxWidth { double get(); void set(double value); };" />
<MemberSignature Language="F#" Value="member this.MaxWidth : double with get, set" Usage="System.Windows.FrameworkElement.MaxWidth" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the maximum width constraint of the element.</summary>
<value>The maximum width of the element, in [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]. The default value is <see cref="F:System.Double.PositiveInfinity" />. This value can be any value equal to or greater than 0.0. <see cref="F:System.Double.PositiveInfinity" /> is also valid.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is one of three properties on <xref:System.Windows.FrameworkElement> that specify width information. The other two are <xref:System.Windows.FrameworkElement.MinWidth%2A> and <xref:System.Windows.FrameworkElement.Width%2A>. If there is a conflict between these values, the order of application for actual width determination is first <xref:System.Windows.FrameworkElement.MinWidth%2A> must be honored, then <xref:System.Windows.FrameworkElement.MaxWidth%2A>, and finally if each of these are within bounds, <xref:System.Windows.FrameworkElement.Width%2A>.
The value restrictions on the <xref:System.Double> value are enforced by a <xref:System.Windows.ValidateValueCallback> mechanism. If you attempt to set an invalid value, a run-time exception is thrown.
<a name="xamlAttributeUsage_MaxWidth"></a>
## XAML Attribute Usage
```
<object MaxWidth="double"/>
- or -
<object MaxWidth="qualifiedDouble"/>
```
<a name="xamlValues_MaxWidth"></a>
## XAML Values
*double*
<xref:System.Double>
String representation of a <xref:System.Double> value equal to or greater than 0.0. This is interpreted as a [!INCLUDE[TLA#tla_dipixel](~/includes/tlasharptla-dipixel-md.md)] measurement. Strings need not explicitly include decimal points. For instance a value of `1` is acceptable.
The same <xref:System.Double> range restrictions as mentioned in the Property Value section apply, except that you must use [x:Static Markup Extension](~/docs/framework/xaml-services/x-static-markup-extension.md) to set the value to be <xref:System.Double.PositiveInfinity>.
*qualifiedDouble*
A *double* value as described above, followed by one of the following unit declaration strings: `px`, `in`, `cm`, `pt`.
`px` (default) is [!INCLUDE[TLA#tla_dipixel#plural](~/includes/tlasharptla-dipixelsharpplural-md.md)]
`in` is inches; 1in==96px
`cm` is centimeters; 1cm==(96/2.54) px
`pt` is points; 1pt==(96/72) px
<a name="dependencyPropertyInfo_MaxWidth"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.FrameworkElement.MaxWidthProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MaxWidthProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty MaxWidthProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty MaxWidthProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.FrameworkElement.MaxWidthProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MaxWidthProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ MaxWidthProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable MaxWidthProperty : System.Windows.DependencyProperty" Usage="System.Windows.FrameworkElement.MaxWidthProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.FrameworkElement.MaxWidth" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MeasureCore">
<MemberSignature Language="C#" Value="protected override sealed System.Windows.Size MeasureCore (System.Windows.Size availableSize);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Windows.Size MeasureCore(valuetype System.Windows.Size availableSize) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides NotOverridable Function MeasureCore (availableSize As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Size MeasureCore(System::Windows::Size availableSize);" />
<MemberSignature Language="F#" Value="override this.MeasureCore : System.Windows.Size -&gt; System.Windows.Size"