diff --git a/xml/System.Windows.Annotations.Storage/AnnotationStore.xml b/xml/System.Windows.Annotations.Storage/AnnotationStore.xml index 9eed393feb6..9555dcef939 100644 --- a/xml/System.Windows.Annotations.Storage/AnnotationStore.xml +++ b/xml/System.Windows.Annotations.Storage/AnnotationStore.xml @@ -79,11 +79,11 @@ The annotation to add to the store. Adds a new to the store. - is added to the store its globally unique identifier (GUID) property is set to a new value. When is called, its property is checked to see if the already has been added to the store. If the already has been added and exists in the store (as determined by its property) an error is thrown. - + is added to the store its globally unique identifier (GUID) property is set to a new value. When is called, its property is checked to see if the already has been added to the store. If the already has been added and exists in the store (as determined by its property) an error is thrown. + ]]> @@ -119,11 +119,11 @@ Occurs when an anchor on any in the store changes. - event can be used to monitor changes to the annotation contained in the store without the need to register on each individually. - + event can be used to monitor changes to the annotation contained in the store without the need to register on each individually. + ]]> @@ -160,11 +160,11 @@ Occurs when an author on any in the store changes. - event can be used to monitor changes to the annotation contained in the store without the need to register on each individually. - + event can be used to monitor changes to the annotation contained in the store without the need to register on each individually. + ]]> @@ -202,13 +202,13 @@ if data in annotation buffers is to be written immediately to the physical data store for each operation; otherwise, if data in the annotation buffers is to be written when the application explicitly calls . - to `false` and call directly when appropriate. - - Applications that use an implicit-save model can set to `true` to cause to be called automatically after every store operation (add, delete, or modify). - + to `false` and call directly when appropriate. + + Applications that use an implicit-save model can set to `true` to cause to be called automatically after every store operation (add, delete, or modify). + ]]> @@ -239,11 +239,11 @@ Occurs when a cargo on any in the store changes. - event can be used to monitor changes to the annotation contained in the store without the need to register on each individually. - + event can be used to monitor changes to the annotation contained in the store without the need to register on each individually. + ]]> @@ -284,13 +284,13 @@ Deletes the annotation with the specified from the store. The annotation that was deleted; otherwise, if an annotation with the specified was not found in the store. - and methods. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserdelete"::: - + and methods. + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserdelete"::: + ]]> @@ -338,16 +338,16 @@ Releases all managed and unmanaged resources used by the store. - when finished with the . After calling the application can release all references to the to allow the garbage collector to reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - The public method calls the protected `(Boolean)` method with the `disposing` parameter of `true` to release all managed and unmanaged resources. - + when finished with the . After calling the application can release all references to the to allow the garbage collector to reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + + The public method calls the protected `(Boolean)` method with the `disposing` parameter of `true` to release all managed and unmanaged resources. + > [!NOTE] -> Call before the last reference to the is released. If is not called, resources will not be freed until the garbage collector calls the store's method. - +> Call before the last reference to the is released. If is not called, resources will not be freed until the garbage collector calls the store's method. + ]]> @@ -382,20 +382,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the store and optionally releases the managed resources. - method is called by the public and methods. The public invokes the protected `(Boolean)` method with the `disposing` parameter set to `true`. invokes with `disposing` set to `false`. - - When the `disposing` parameter is `true`, releases all resources held by any managed objects that the references. also invokes the `Dispose()` method of each referenced object. - + method is called by the public and methods. The public invokes the protected `(Boolean)` method with the `disposing` parameter set to `true`. invokes with `disposing` set to `false`. + + When the `disposing` parameter is `true`, releases all resources held by any managed objects that the references. also invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -424,13 +424,13 @@ Guarantees that will eventually be called for this store. - method. The application program should not call directly. is automatically invoked during garbage collection unless disabled by a call to the method. - - For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). - + method. The application program should not call directly. is automatically invoked during garbage collection unless disabled by a call to the method. + + For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + ]]> @@ -460,25 +460,25 @@ Forces any annotation data retained in internal buffers to be written to the underlying storage device. - to `false` and call directly when appropriate. - - Applications that use an implicit-save model can set the to `true` to cause to be called automatically after every store operation (add, delete, or modify). - - - -## Examples - The following example shows how to use the method when the application closes the . - + to `false` and call directly when appropriate. + + Applications that use an implicit-save model can set the to `true` to cause to be called automatically after every store operation (add, delete, or modify). + + + +## Examples + The following example shows how to use the method when the application closes the . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations/AnnotationDocumentPaginator/Overview/AnnotationsHelperXps.cs" id="Snippetstopannotations"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DocViewerAnnotationsXps/visualbasic/annotationshelperxps.vb" id="Snippetstopannotations"::: - - The following example shows use of the and methods. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserdelete"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DocViewerAnnotationsXps/visualbasic/annotationshelperxps.vb" id="Snippetstopannotations"::: + + The following example shows use of the and methods. + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserdelete"::: + ]]> @@ -529,13 +529,13 @@ Returns a list of annotations contained in the store. - method to determine if there are any annotations contained in the store. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserclosefile"::: - + method to determine if there are any annotations contained in the store. + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserclosefile"::: + ]]> @@ -567,13 +567,13 @@ Returns a list of all the annotations in the store. The list of all annotations currently contained in the store. - method to determine if there are any annotations contained in the store. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserclosefile"::: - + method to determine if there are any annotations contained in the store. + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserclosefile"::: + ]]> @@ -611,11 +611,11 @@ Returns a list of annotations that have with locators that begin with a matching sequence. The list of annotations that have with locators that start and match the given ; otherwise, if no matching annotations were found. - method internally uses the method of the class to search and match for the annotations to return. - + method internally uses the method of the class to search and match for the annotations to return. + ]]> @@ -829,17 +829,17 @@ Occurs when an is added to or deleted from the store. - event. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserenableann"::: - - The following example shows operation of the event delegate. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocsercontentchanged"::: - + event. + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserenableann"::: + + The following example shows operation of the event delegate. + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocsercontentchanged"::: + ]]> diff --git a/xml/System.Windows.Controls.Primitives/MenuBase.xml b/xml/System.Windows.Controls.Primitives/MenuBase.xml index cde4503831f..883a8641046 100644 --- a/xml/System.Windows.Controls.Primitives/MenuBase.xml +++ b/xml/System.Windows.Controls.Primitives/MenuBase.xml @@ -33,13 +33,13 @@ Represents a control that defines choices for users to select. - is the base class for controls that define choices for users to select. The and inherit from and allow the user to select an item to invoke some action. - - is an , which means it can contain a collection of objects of any type (such as string, image, or panel). For more information, see the class. - + is the base class for controls that define choices for users to select. The and inherit from and allow the user to select an item to invoke some action. + + is an , which means it can contain a collection of objects of any type (such as string, image, or panel). For more information, see the class. + ]]> @@ -181,19 +181,19 @@ Gets or sets the custom logic for choosing a template used to display each item. A custom object that provides logic and returns an item container. - to choose different item containers if the items in your collection are the same type and you need to provide custom logic to choose the item container. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + to choose different item containers if the items in your collection are the same type and you need to provide custom logic to choose the item container. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -281,11 +281,11 @@ The event data for the event. Provides class handling for the routed event that occurs when the user presses a key. - event as handled by setting the property of the event data to `true`. - + event as handled by setting the property of the event data to `true`. + ]]> @@ -321,11 +321,11 @@ The event data for the event. Provides class handling for the routed event that occurs when the mouse leaves the control. - property) of the event data. - + property) of the event data. + ]]> @@ -356,23 +356,23 @@ Gets or sets a value that indicates whether the menu selects different item containers, depending on the type of the item in the underlying collection or some other heuristic. - the menu selects different item containers; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + the menu selects different item containers; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - objects and objects, set the property to true and create an for each type of object in your collection. Each must contain either a or a . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + objects and objects, set the property to true and create an for each type of object in your collection. Each must contain either a or a . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Primitives/Popup.xml b/xml/System.Windows.Controls.Primitives/Popup.xml index 7d0fd362f8e..31dcbe8779d 100644 --- a/xml/System.Windows.Controls.Primitives/Popup.xml +++ b/xml/System.Windows.Controls.Primitives/Popup.xml @@ -45,37 +45,37 @@ Represents a pop-up window that has content. - has one content property: . A can have a maximum of one child, which can be any . - - The following illustration shows a control that has a as its parent. - - ![Popup illustration](~/add/media/popuppicture.JPG "Popup illustration") - - You can position a popup by setting the , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). When is displayed on the screen, it does not reposition itself if its parent is repositioned. - - A displays its content in its own window on the screen. A control supports animation when the property is set to `true` and the application is running with full trust. An application that is running with full trust has complete access to system resources and is typically installed on the user's system. For more information, see [Security (WPF)](/dotnet/framework/wpf/security-wpf). - - For bitmap and opacity effects to appear on the content of a , you must set the effects directly on the content. The content of a does not inherit effects that are set on the control or on any other element that is in the parent window. - - A is sized to its content by default. When this occurs, applying a or bitmap effects may cause the to be obscured. This occurs because the default size of the content does not provide enough area for the effects to display. If more space is required, you can define a margin around the content to increase the area that is available to the control. - - The property must be set on the when used in a XAML browser application (XBAP). - - To create a tooltip, use the and classes. For more information, see [ToolTip Overview](/dotnet/framework/wpf/controls/tooltip-overview). - - - -## Examples - The following example shows how to create a control. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/UIElement/IsFocused/Window1.xaml" id="Snippet2"::: - + has one content property: . A can have a maximum of one child, which can be any . + + The following illustration shows a control that has a as its parent. + + ![Popup illustration](~/add/media/popuppicture.JPG "Popup illustration") + + You can position a popup by setting the , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). When is displayed on the screen, it does not reposition itself if its parent is repositioned. + + A displays its content in its own window on the screen. A control supports animation when the property is set to `true` and the application is running with full trust. An application that is running with full trust has complete access to system resources and is typically installed on the user's system. For more information, see [Security (WPF)](/dotnet/framework/wpf/security-wpf). + + For bitmap and opacity effects to appear on the content of a , you must set the effects directly on the content. The content of a does not inherit effects that are set on the control or on any other element that is in the parent window. + + A is sized to its content by default. When this occurs, applying a or bitmap effects may cause the to be obscured. This occurs because the default size of the content does not provide enough area for the effects to display. If more space is required, you can define a margin around the content to increase the area that is available to the control. + + The property must be set on the when used in a XAML browser application (XBAP). + + To create a tooltip, use the and classes. For more information, see [ToolTip Overview](/dotnet/framework/wpf/controls/tooltip-overview). + + + +## Examples + The following example shows how to create a control. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/UIElement/IsFocused/Window1.xaml" id="Snippet2"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/IsFocused/Window1.xaml.cs" id="Snippetcreatepopup"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSimple/VisualBasic/Window1.xaml.vb" id="Snippetcreatepopup"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSimple/VisualBasic/Window1.xaml.vb" id="Snippetcreatepopup"::: + ]]> @@ -136,32 +136,32 @@ if the control can contain transparent content; otherwise, . The default is . - control can only contain transparent content when the application runs with full trust. An application that runs with full trust has complete access to system resources and is typically installed on the local system. For more information, see [Security (WPF)](/dotnet/framework/wpf/security-wpf). - - This property cannot be set to `true` when the is hosted in a XAML browser application (XBAP). - - If the property is set to `true` in an application that does not run in full trust, the property value is changed to `false`. An application that is hosted in a browser is an example of an application that does not run in full trust. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a control. - + control can only contain transparent content when the application runs with full trust. An application that runs with full trust has complete access to system resources and is typically installed on the local system. For more information, see [Security (WPF)](/dotnet/framework/wpf/security-wpf). + + This property cannot be set to `true` when the is hosted in a XAML browser application (XBAP). + + If the property is set to `true` in an application that does not run in full trust, the property value is changed to `false`. An application that is hosted in a browser is an example of an application that does not run in full trust. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetallowstransparency"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetallowstransparency"::: - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetallowstransparency"::: - + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetallowstransparency"::: + ]]> @@ -191,16 +191,16 @@ Identifies the dependency property. - dependency property. - - - -## Examples - [Dependency Properties Overview](/dotnet/framework/wpf/advanced/dependency-properties-overview) - + dependency property. + + + +## Examples + [Dependency Properties Overview](/dotnet/framework/wpf/advanced/dependency-properties-overview) + ]]> @@ -236,30 +236,30 @@ Gets or sets the content of the control. The content of the control. The default is . - property is the only content property for the control. A can only have one as a child, but that child can contain complex embedded content. For example, the child can be a that contains an , text, and other types of controls. - - When content is added to a control, the control becomes the logical parent to the content. Similarly, the content is considered to be the logical child of the . The child content is not added to the visual tree that contains the control. Instead, the child content is rendered in a separate window with its own visual tree when the is set to `true`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to add content to a control. - + property is the only content property for the control. A can only have one as a child, but that child can contain complex embedded content. For example, the child can be a that contains an , text, and other types of controls. + + When content is added to a control, the control becomes the logical parent to the content. Similarly, the content is considered to be the logical child of the . The child content is not added to the visual tree that contains the control. Instead, the child content is rendered in a separate window with its own visual tree when the is set to `true`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to add content to a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetchild"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetchild"::: - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetchild"::: - + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetchild"::: + ]]> @@ -314,20 +314,20 @@ Occurs when the property changes to . - is opened and closed by toggling the property. - - - -## Examples - The following example shows how to define an event handler for the event. - + is opened and closed by toggling the property. + + + +## Examples + The following example shows how to define an event handler for the event. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetclosed"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetclosed"::: - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetclosed"::: - + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetclosed"::: + ]]> @@ -363,33 +363,33 @@ The child content. Attaches a child element to a control. - . You can make your control behave like a by adding a to your control and calling the method. - - This method assigns `child` to the child property and binds the following properties to `child`. - -- - -- - -- - -- - -- - -- - -- - -- - - You should implement these as dependency properties in your control so it can be used the same way as a . For more information, see [Custom Dependency Properties](/dotnet/framework/wpf/advanced/custom-dependency-properties). - - When you call , `child` cannot be a child of a . Also, `PlacementTarget` should be set on your control before you call this method. - + . You can make your control behave like a by adding a to your control and calling the method. + + This method assigns `child` to the child property and binds the following properties to `child`. + +- + +- + +- + +- + +- + +- + +- + +- + + You should implement these as dependency properties in your control so it can be used the same way as a . For more information, see [Custom Dependency Properties](/dotnet/framework/wpf/advanced/custom-dependency-properties). + + When you call , `child` cannot be a child of a . Also, `PlacementTarget` should be set on your control before you call this method. + ]]> @@ -429,29 +429,29 @@ Gets or sets a delegate handler method that positions the control. The delegate method that provides placement information for the control. The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set a delegate. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set a delegate. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/CustomPopupPlacementCallback/Window1.xaml.cs" id="Snippetdelegatedefinition"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupCustomPlacement/visualbasic/window1.xaml.vb" id="Snippetdelegatedefinition"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupCustomPlacement/visualbasic/window1.xaml.vb" id="Snippetdelegatedefinition"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/CustomPopupPlacementCallback/Window1.xaml.cs" id="Snippetdelegateinstance"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupCustomPlacement/visualbasic/window1.xaml.vb" id="Snippetdelegateinstance"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupCustomPlacement/visualbasic/window1.xaml.vb" id="Snippetdelegateinstance"::: + ]]> @@ -537,27 +537,27 @@ if the is displayed with a drop shadow; otherwise, . - property and the property are set to `true`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to get the value of the property. - + property and the property are set to `true`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to get the value of the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippethasdropshadow"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippethasdropshadow"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippethasdropshadow"::: + ]]> @@ -586,16 +586,16 @@ Identifies the dependency property. - dependency property. - - - -## Examples - [Dependency Properties Overview](/dotnet/framework/wpf/advanced/dependency-properties-overview) - + dependency property. + + + +## Examples + [Dependency Properties Overview](/dotnet/framework/wpf/advanced/dependency-properties-overview) + ]]> @@ -637,57 +637,57 @@ Get or sets the horizontal distance between the target origin and the popup alignment point. - The horizontal distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). The default is 0. + The horizontal distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see Popup Placement Behavior. The default is 0. - , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - -## XAML Attribute Usage - -``` - -- or - - -``` - - -## XAML Values - `double` - - - A string representation of a value. This is interpreted as a device-independent unit (1/96th inch) measurement. Strings do not have to explicitly include decimal points. For example, a value of `1` is acceptable. - - The same range restrictions apply as those that are mentioned in the Property Value section of this topic. - - `qualifiedDouble` - A `double` value as described earlier in this table, followed by one of the following unit declaration strings: `px`, `in`, `cm`, or `pt`. - - `px` (default) is device-independent units (1/96th inch per unit) - - `in` is inches; 1in=96px - - `cm` is centimeters; 1cm=(96/2.54) px - - `pt` is points; 1pt=(96/72) px - - - -## Examples - The following example creates a and sets the and properties to 20. The property is set to (which is the default), so the target origin is the bottom left corner of the target area and the popup alignment point is the top left corner of the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet5"::: - + , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + +## XAML Attribute Usage + +``` + +- or - + +``` + + +## XAML Values + `double` + + + A string representation of a value. This is interpreted as a device-independent unit (1/96th inch) measurement. Strings do not have to explicitly include decimal points. For example, a value of `1` is acceptable. + + The same range restrictions apply as those that are mentioned in the Property Value section of this topic. + + `qualifiedDouble` + A `double` value as described earlier in this table, followed by one of the following unit declaration strings: `px`, `in`, `cm`, or `pt`. + + `px` (default) is device-independent units (1/96th inch per unit) + + `in` is inches; 1in=96px + + `cm` is centimeters; 1cm=(96/2.54) px + + `pt` is points; 1pt=(96/72) px + + + +## Examples + The following example creates a and sets the and properties to 20. The property is set to (which is the default), so the target origin is the bottom left corner of the target area and the popup alignment point is the top left corner of the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet5"::: + ]]> @@ -758,28 +758,28 @@ if the is visible; otherwise, . The default is . - as part of its default style, bind the property of the to a property of the control. For example, a can bind its property to the property of the . This simplifies the logic for controlling when the is visible. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example shows how to set the property. - + as part of its default style, bind the property of the to a property of the control. For example, a can bind its property to the property of the . This simplifies the logic for controlling when the is visible. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example shows how to set the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetisopen"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetisopen"::: - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetisopen"::: - + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetisopen"::: + ]]> @@ -835,11 +835,11 @@ Gets an enumerator that you can use to access the logical child elements of the control. An that you can use to access the logical child elements of a control. The default is . - control, the control becomes the logical parent to the content. Similarly, the content is considered to be the logical child of the . The child content is not added to the visual tree that contains the control. Instead, the child content is rendered in a separate window that has its own visual tree when the property is set to `true`. - + control, the control becomes the logical parent to the content. Similarly, the content is considered to be the logical child of the . The child content is not added to the visual tree that contains the control. Instead, the child content is rendered in a separate window that has its own visual tree when the property is set to `true`. + ]]> @@ -873,11 +873,11 @@ Determines the required size of the content within the visual tree of the logical parent. A structure that has the and properties both equal to zero (0). - that has a width and height of zero (0), because content is not located in the visual tree of its logical parent or . The child content is created in a different window that has its own visual tree. - + that has a width and height of zero (0), because content is not located in the visual tree of its logical parent or . The child content is created in a different window that has its own visual tree. + ]]> @@ -970,11 +970,11 @@ The event data. Provides class handling for the event. - closes when a mouse event occurs outside the when the property is set to `false`. - + closes when a mouse event occurs outside the when the property is set to `false`. + ]]> @@ -1007,11 +1007,11 @@ The event data. Provides class handling for the event. - closes when a mouse event occurs outside the when the property is set to `false`. - + closes when a mouse event occurs outside the when the property is set to `false`. + ]]> @@ -1044,11 +1044,11 @@ The event data. Provides class handling for the event. - closes when a mouse event occurs outside the when the property is set to `false`. - + closes when a mouse event occurs outside the when the property is set to `false`. + ]]> @@ -1081,11 +1081,11 @@ The event data. Provides class handling for the event. - closes when a mouse event occurs outside the when the property is set to `false`. - + closes when a mouse event occurs outside the when the property is set to `false`. + ]]> @@ -1114,20 +1114,20 @@ Occurs when the property changes to . - is opened and closed by toggling the property. - - - -## Examples - The following example shows how to define an event handler for the event. - + is opened and closed by toggling the property. + + + +## Examples + The following example shows how to define an event handler for the event. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetopened"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetopened"::: - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetopened"::: - + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetopened"::: + ]]> @@ -1168,28 +1168,28 @@ Gets or sets the orientation of the control when the control opens, and specifies the behavior of the control when it overlaps screen boundaries. A enumeration value that determines the orientation of the control when the control opens, and that specifies how the control interacts with screen boundaries. The default is . - , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - If the property is `true`, setting to or reverses the position of the ; a with set to aligns its left edge with the right edge of and a with set to aligns its right edge with the left edge of . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example creates four controls that are relative to an image. Each has a different value for the placement property. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet3"::: - + , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + If the property is `true`, setting to or reverses the position of the ; a with set to aligns its left edge with the right edge of and a with set to aligns its right edge with the left edge of . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example creates four controls that are relative to an image. Each has a different value for the placement property. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet3"::: + ]]> @@ -1259,24 +1259,24 @@ Gets or sets the rectangle relative to which the control is positioned when it opens. The rectangle that is used to position the control. The default is . - , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| + , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| |Metadata properties set to `true`|None| - -## Examples - The following example sets the property of a . The , , , and properties of the are 50, 50, 50, and 100, respectively. The is relative to the bounds of the property. Note that the property does not create a visible element in the application; the example creates a with the same bounds to represent the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet6"::: - + +## Examples + The following example sets the property of a . The , , , and properties of the are 50, 50, 50, and 100, respectively. The is relative to the bounds of the property. Note that the property does not create a visible element in the application; the example creates a with the same bounds to represent the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet6"::: + ]]> @@ -1351,26 +1351,26 @@ Gets or sets the element relative to which the is positioned when it opens. The that is the logical parent of the control. The default is . - , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example creates a that is the child of a , and sets to `ellipse1`, so the popup is relative to the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet2"::: - + , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example creates a that is the child of a , and sets to `ellipse1`, so the popup is relative to the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet2"::: + ]]> @@ -1440,33 +1440,33 @@ Gets or sets an animation for the opening and closing of a control. The enumeration value that defines an animation to open and close a control. The default is . - can only animate when the property is set to `true`. This requires the application that creates the control to run with full trust. - - If the is animated, the will not be animated. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property. - + can only animate when the property is set to `true`. This requires the application that creates the control to run with full trust. + + If the is animated, the will not be animated. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetallowstransparency"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetallowstransparency"::: - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetallowstransparency"::: - + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetallowstransparency"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetanimation"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetanimation"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetanimation"::: + ]]> @@ -1534,28 +1534,28 @@ if the control closes when property is set to ; if the control closes when a mouse or keyboard event occurs outside the control. The default is . - property is set to `true`, stays open until it is explicitly closed by setting the property to `false`. When is `false`, the control intercepts all mouse and keyboard events to determine when one of these events occurs outside the control. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property. - + property is set to `true`, stays open until it is explicitly closed by setting the property to `false`. When is `false`, the control intercepts all mouse and keyboard events to determine when one of these events occurs outside the control. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml.cs" id="Snippetstaysopen"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PopupSnips/visualbasic/window1.xaml.vb" id="Snippetstaysopen"::: - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetstaysopen"::: - + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Primitives/Popup/AllowsTransparency/Window1.xaml" id="Snippetstaysopen"::: + ]]> @@ -1690,57 +1690,57 @@ Gets or sets the vertical distance between the target origin and the popup alignment point. - The vertical distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). The default is 0. + The vertical distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see Popup Placement Behavior. The default is 0. - , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## XAML Attribute Usage - -``` - -- or - - -``` - - -## XAML Values - `double` - - - A string representation of a value. This is interpreted as a device-independent unit (1/96th inch) measurement. Strings do not have to explicitly include decimal points. For example, a value of `1` is acceptable. - - The same range restrictions apply as those that are mentioned in the Property Value section of this topic. - - `qualifiedDouble` - A `double` value as described earlier in this table, followed by one of the following unit declaration strings: `px`, `in`, `cm`, or `pt`. - - `px` (default) is device-independent units (1/96th inch per unit) - - `in` is inches; 1in=96px - - `cm` is centimeters; 1cm=(96/2.54) px - - `pt` is points; 1pt=(96/72) px - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example creates a and sets the and properties to 20. The property is set to (which is the default), so the target origin is the bottom left corner of the target area, and the popup alignment point is the top left corner of the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet5"::: - + , , , , and properties. For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## XAML Attribute Usage + +``` + +- or - + +``` + + +## XAML Values + `double` + + + A string representation of a value. This is interpreted as a device-independent unit (1/96th inch) measurement. Strings do not have to explicitly include decimal points. For example, a value of `1` is acceptable. + + The same range restrictions apply as those that are mentioned in the Property Value section of this topic. + + `qualifiedDouble` + A `double` value as described earlier in this table, followed by one of the following unit declaration strings: `px`, `in`, `cm`, or `pt`. + + `px` (default) is device-independent units (1/96th inch per unit) + + `in` is inches; 1in=96px + + `cm` is centimeters; 1cm=(96/2.54) px + + `pt` is points; 1pt=(96/72) px + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example creates a and sets the and properties to 20. The property is set to (which is the default), so the target origin is the bottom left corner of the target area, and the popup alignment point is the top left corner of the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback/Window1.xaml" id="Snippet5"::: + ]]> diff --git a/xml/System.Windows.Controls.Primitives/StatusBar.xml b/xml/System.Windows.Controls.Primitives/StatusBar.xml index 1e27b1830b1..e0894d6246e 100644 --- a/xml/System.Windows.Controls.Primitives/StatusBar.xml +++ b/xml/System.Windows.Controls.Primitives/StatusBar.xml @@ -29,35 +29,35 @@ Represents a control that displays items and information in a horizontal bar in an application window. - is an , which means it can contain a collection of objects of any type (such as string, image, or panel). For more information, see the class. - - A is a bar that typically displays a horizontal row of images and status information. You can divide the items in a into groups that contain related items, by using controls. The items in a can display text, graphics, or other complex content. Items in a are defined as objects. - - Events that are defined on a are raised when the user clicks the item in the . - - The does not receive keyboard focus. - - The following illustration shows an example of a . - - **Status Bar** - - ![Status bar](~/add/media/ss-ctl-statusbar.GIF "Status bar") - -## Customizing the StatusBar Control - To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [StatusBar Styles and Templates](/dotnet/framework/wpf/controls/statusbar-styles-and-templates). - + is an , which means it can contain a collection of objects of any type (such as string, image, or panel). For more information, see the class. + + A is a bar that typically displays a horizontal row of images and status information. You can divide the items in a into groups that contain related items, by using controls. The items in a can display text, graphics, or other complex content. Items in a are defined as objects. + + Events that are defined on a are raised when the user clicks the item in the . + + The does not receive keyboard focus. + + The following illustration shows an example of a . + + **Status Bar** + + ![Status bar](~/add/media/ss-ctl-statusbar.GIF "Status bar") + +## Customizing the StatusBar Control + To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [StatusBar Styles and Templates](/dotnet/framework/wpf/controls/statusbar-styles-and-templates). + Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. - -[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] - -## Examples - The following example creates a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ProgressBar/Overview/Window11.xaml" id="Snippet1"::: - + +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] + +## Examples + The following example creates a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ProgressBar/Overview/Window11.xaml" id="Snippet1"::: + ]]> @@ -149,11 +149,11 @@ Determines if the specified item is (or is eligible to be) its own container. Returns if the item is (or is eligible to be) its own container; otherwise, . - or a . - + or a . + ]]> @@ -182,19 +182,19 @@ Gets or sets the custom logic for choosing a template used to display each item. A custom object that provides logic and returns an item container. - to choose different item containers if the items in your collection are the same type and you need to provide custom logic to choose the item container. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + to choose different item containers if the items in your collection are the same type and you need to provide custom logic to choose the item container. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -282,11 +282,11 @@ The content of the item to display. Prepares an item for display in the . - , this method sets its . - + , this method sets its . + ]]> @@ -316,17 +316,17 @@ The key that represents the style to use for objects in the . A that references the style to use for objects. - -## XAML Attribute Usage - -``` - -``` - + +## XAML Attribute Usage + +``` + +``` + ]]> @@ -363,11 +363,11 @@ if the is not a ; otherwise, . - is not applied to a element. - + is not applied to a element. + ]]> @@ -395,23 +395,23 @@ Gets or sets a value that indicates whether the menu selects different item containers, depending on the type of the item in the underlying collection or some other heuristic. - the menu selects different item containers; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + the menu selects different item containers; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - objects and objects, set the property to true and create an for each type of object in your collection. Each must contain either a or a . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + objects and objects, set the property to true and create an for each type of object in your collection. Each must contain either a or a . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Primitives/TextBoxBase.xml b/xml/System.Windows.Controls.Primitives/TextBoxBase.xml index 182a5034ab3..91d00f78203 100644 --- a/xml/System.Windows.Controls.Primitives/TextBoxBase.xml +++ b/xml/System.Windows.Controls.Primitives/TextBoxBase.xml @@ -33,18 +33,18 @@ An abstract base class that provides functionality for text editing controls, including and . - object in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml" id="Snippettextboxbase1"::: - - The following example demonstrates how to use the derived object in code. - + object in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml" id="Snippettextboxbase1"::: + + The following example demonstrates how to use the derived object in code. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/RichTextBox/Overview/Window1.xaml.cs" id="Snippet_richtextbox_mouseupdown"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/RichTextBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_richtextbox_mouseupdown"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/RichTextBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_richtextbox_mouseupdown"::: + ]]> @@ -77,19 +77,19 @@ if pressing the ENTER key inserts a new line at the current cursor position; otherwise, the ENTER key is ignored. The default value is for and for . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -146,23 +146,23 @@ Gets or sets a value that indicates how the text editing control responds when the user presses the TAB key. - if pressing the TAB key inserts a tab character at the current cursor position; if pressing the TAB key moves the focus to the next control that is marked as a tab stop and does not insert a tab character. - + if pressing the TAB key inserts a tab character at the current cursor position; if pressing the TAB key moves the focus to the next control that is marked as a tab stop and does not insert a tab character. + The default value is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -221,19 +221,19 @@ A string that specifies the text to append to the current contents of the text control. Appends a string to the contents of a text control. - method enables the user to append text to the contents of a text control without using text concatenation, which, can yield better performance when many concatenations are required. - - - -## Examples - The following example demonstrates how to use the method. - + method enables the user to append text to the contents of a text control without using text concatenation, which, can yield better performance when many concatenations are required. + + + +## Examples + The following example demonstrates how to use the method. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase11"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase11"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase11"::: + ]]> @@ -262,28 +262,28 @@ Gets or sets a value that determines whether when a user selects part of a word by dragging across it with the mouse, the rest of the word is selected. - if automatic word selection is enabled; otherwise, . - + if automatic word selection is enabled; otherwise, . + The default value is . - is enabled, every time that part of a word is selected by the user dragging over part of a word using the mouse, the selection is automatically expanded to include the whole word. The user can override automatic selection of a whole word by momentarily reversing the direction in which the mouse pointer is being dragged as the selection is made. This action undoes the automatic selection of the whole word, and enables the user to precisely select part or all of the word. - - When is disabled, a selection is not automatically expanded to include whole words; in this case, precise selections are always determined manually. - - > [!NOTE] - > Auto selection does not affect the first word that the user drags across. It is only after this first word boundary is crossed that auto selection takes effect. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + is enabled, every time that part of a word is selected by the user dragging over part of a word using the mouse, the selection is automatically expanded to include the whole word. The user can override automatic selection of a whole word by momentarily reversing the direction in which the mouse pointer is being dragged as the selection is made. This action undoes the automatic selection of the whole word, and enables the user to precisely select part or all of the word. + + When is disabled, a selection is not automatically expanded to include whole words; in this case, precise selections are always determined manually. + + > [!NOTE] + > Auto selection does not affect the first word that the user drags across. It is only after this first word boundary is crossed that auto selection takes effect. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -339,23 +339,23 @@ Begins a change block. - [!NOTE] - > When you call , you must also call to complete the change block otherwise an exception will be thrown. - - A change block logically groups multiple changes into a single undo unit and prevents text content or selection change events from being raised until after the change block. This way you can make multiple edits to the text element without the danger of the text element being changed at the same time by another listener. A change block is created by calling the method. Calling the method causes all subsequent changes to be included in the specified change block until a corresponding call to the method is made. - - - -## Examples - The following example shows how to use the and methods to create a change block. - + > [!NOTE] + > When you call , you must also call to complete the change block otherwise an exception will be thrown. + + A change block logically groups multiple changes into a single undo unit and prevents text content or selection change events from being raised until after the change block. This way you can make multiple edits to the text element without the danger of the text element being changed at the same time by another listener. A change block is created by calling the method. Calling the method causes all subsequent changes to be included in the specified change block until a corresponding call to the method is made. + + + +## Examples + The following example shows how to use the and methods to create a change block. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/CharacterCasing/Overview/BeginChangeEndChangeExample.cs" id="Snippetbeginchangeendchangecodeexampleinline1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/beginchangeendchangeexample.vb" id="Snippetbeginchangeendchangecodeexampleinline1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/beginchangeendchangeexample.vb" id="Snippetbeginchangeendchangecodeexampleinline1"::: + ]]> @@ -387,18 +387,18 @@ Gets a value that indicates whether the most recent undo action can be redone. - if the most recent undo action can be redone; otherwise, . - + if the most recent undo action can be redone; otherwise, . + This property has no default value. - property to determine whether the most recent undo action can be redone. - + property to determine whether the most recent undo action can be redone. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase9"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase9"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase9"::: + ]]> @@ -430,18 +430,18 @@ Gets a value that indicates whether the most recent action can be undone. - if the most recent action can be undone; otherwise, . - + if the most recent action can be undone; otherwise, . + This property has no default value. - property to determine whether the most recent action can be undone. - + property to determine whether the most recent action can be undone. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase8"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase8"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase8"::: + ]]> @@ -473,18 +473,18 @@ Gets or sets the brush that is used to paint the caret of the text box. The brush that is used to paint the caret of the text box. - and adds the text, "This is some text." The example sets the and properties of a to blue. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippettextbox"::: - - The preceding example produces output that is like the following illustration. - - ![TextBox with CaretBrush set to blue.](~/add/media/textboxcaretbrush.png "TextBox with CaretBrush set to blue.") -TextBox with CaretBrush set to blue - + and adds the text, "This is some text." The example sets the and properties of a to blue. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippettextbox"::: + + The preceding example produces output that is like the following illustration. + + ![TextBox with CaretBrush set to blue.](~/add/media/textboxcaretbrush.png "TextBox with CaretBrush set to blue.") +TextBox with CaretBrush set to blue + ]]> @@ -545,19 +545,19 @@ TextBox with CaretBrush set to blue Copies the current selection of the text editing control to the . - . Note that the selected text is not removed from the text editing control in the process. A similar method, , moves the current selection to the and removes the selected text from the text editing control in the process. - - - -## Examples - The following example demonstrates how to use the method to copy the text that is selected in a control. - + . Note that the selected text is not removed from the text editing control in the process. A similar method, , moves the current selection to the and removes the selected text from the text editing control in the process. + + + +## Examples + The following example demonstrates how to use the method to copy the text that is selected in a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase4"::: + ]]> @@ -594,19 +594,19 @@ TextBox with CaretBrush set to blue Removes the current selection from the text editing control and copies it to the . - . Note that the selected text is removed (cut) from the text editing control in the process. A similar method, , copies the current selection to the Clipboard, but does not remove the selected text from the text editing control. - - - -## Examples - The following example demonstrates how to use the method to delete the text that is selected in a control. - + . Note that the selected text is removed (cut) from the text editing control in the process. A similar method, , copies the current selection to the Clipboard, but does not remove the selected text from the text editing control. + + + +## Examples + The following example demonstrates how to use the method to delete the text that is selected in a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase5"::: + ]]> @@ -638,11 +638,11 @@ TextBox with CaretBrush set to blue Creates a change block. An object that refers to a new change block. - method. Calling the method causes all subsequent changes to be included in the specified change block until a corresponding call to the method is made. - + method. Calling the method causes all subsequent changes to be included in the specified change block until a corresponding call to the method is made. + ]]> @@ -674,22 +674,22 @@ TextBox with CaretBrush set to blue Ends a change block. - [!NOTE] - > When you call , you must also call to complete the change block otherwise an exception will be thrown. - - A change block logically groups multiple changes into a single undo unit and prevents text content or selection change events from being raised until after the change block. This way you can make multiple edits to the text element without the danger of the text element being changed at the same time by another process. A change block is created by calling the method. Calling the method causes all subsequent changes to be included in the specified change block until a corresponding call to the method is made. - - - -## Examples - The following example shows how to use the and methods to create a change block. - + [!NOTE] + > When you call , you must also call to complete the change block otherwise an exception will be thrown. + + A change block logically groups multiple changes into a single undo unit and prevents text content or selection change events from being raised until after the change block. This way you can make multiple edits to the text element without the danger of the text element being changed at the same time by another process. A change block is created by calling the method. Calling the method causes all subsequent changes to be included in the specified change block until a corresponding call to the method is made. + + + +## Examples + The following example shows how to use the and methods to create a change block. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/CharacterCasing/Overview/BeginChangeEndChangeExample.cs" id="Snippetbeginchangeendchangecodeexampleinline1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/beginchangeendchangeexample.vb" id="Snippetbeginchangeendchangecodeexampleinline1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/beginchangeendchangeexample.vb" id="Snippetbeginchangeendchangecodeexampleinline1"::: + ]]> @@ -721,20 +721,20 @@ TextBox with CaretBrush set to blue Gets the vertical size of the visible content area. - A floating-point value that specifies the vertical size of the visible content area, in device-independent units (1/96th inch per unit). - - The value of this property is 0.0 if the text-editing control is not configured to support scrolling. - + A floating-point value that specifies the vertical size of the visible content area, in device-independent units (1/96th inch per unit). + + The value of this property is 0.0 if the text-editing control is not configured to support scrolling. + This property has no default value. - property. - + property. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: + ]]> @@ -765,20 +765,20 @@ TextBox with CaretBrush set to blue Gets the horizontal size of the visible content area. - A floating-point value that specifies the horizontal size of the visible content area, in device-independent units (1/96th inch per unit). - - The value of this property is 0.0 if the text editing control is not configured to support scrolling. - + A floating-point value that specifies the horizontal size of the visible content area, in device-independent units (1/96th inch per unit). + + The value of this property is 0.0 if the text editing control is not configured to support scrolling. + This property has no default value. - property. - + property. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: + ]]> @@ -809,27 +809,27 @@ TextBox with CaretBrush set to blue Gets or sets the horizontal scroll position. - A floating-point value that specifies the horizontal scroll position, in device-independent units (1/96th inch per unit). - - Setting this property causes the text editing control to scroll to the specified horizontal offset. Reading this property returns the current horizontal offset. - - The value of this property is 0.0 if the text editing control is not configured to support scrolling. - + A floating-point value that specifies the horizontal scroll position, in device-independent units (1/96th inch per unit). + + Setting this property causes the text editing control to scroll to the specified horizontal offset. Reading this property returns the current horizontal offset. + + The value of this property is 0.0 if the text editing control is not configured to support scrolling. + This property has no default value. - property. - + property. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: + ]]> An attempt is made to set this property to a negative value. @@ -863,29 +863,29 @@ TextBox with CaretBrush set to blue Gets or sets a value that indicates whether a horizontal scroll bar is shown. - A value that is defined by the enumeration. - + A value that is defined by the enumeration. + The default value is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example demonstrates how to set the value of the property by using Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml" id="Snippettextboxbase1"::: - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example demonstrates how to set the value of the property by using Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml" id="Snippettextboxbase1"::: + ]]> @@ -939,22 +939,22 @@ TextBox with CaretBrush set to blue Gets or sets a value that indicates whether the text box displays selected text when the text box does not have focus. - if the text box displays selected text when the text box does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the text box displays selected text when the text box does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1010,19 +1010,19 @@ TextBox with CaretBrush set to blue if the contents of the text editing control are read-only to a user; otherwise, the contents of the text editing control can be modified by the user. The default value is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1052,11 +1052,11 @@ TextBox with CaretBrush set to blue if a read-only text box displays a caret; otherwise, . The default is . - is `true`, a user can still select and copy text. If the property is also set to `true`, a caret will appear in the text box when the text box has keyboard focus. When is `false`, the property has no effect. - + is `true`, a user can still select and copy text. If the property is also set to `true`, a caret will appear in the text box when the text box has keyboard focus. When is `false`, the property has no effect. + ]]> @@ -1135,22 +1135,22 @@ TextBox with CaretBrush set to blue Gets a value that indicates whether the text box has focus and selected text. - if the text box has focus and selected text; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the text box has focus and selected text; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1206,26 +1206,26 @@ TextBox with CaretBrush set to blue if undo support is enabled; otherwise, . The default value is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example demonstrates how to use the property in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml" id="Snippettextboxbase1"::: - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example demonstrates how to use the property in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml" id="Snippettextboxbase1"::: + ]]> @@ -1287,14 +1287,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control down by one line. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase13"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase13"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase13"::: + ]]> @@ -1327,14 +1327,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control to the left by one line. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase14"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase14"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase14"::: + ]]> @@ -1367,14 +1367,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control to the right by one line. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase15"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase15"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase15"::: + ]]> @@ -1407,14 +1407,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control upward by one line. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase16"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase16"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase16"::: + ]]> @@ -1446,11 +1446,11 @@ TextBox with CaretBrush set to blue Locks the most recent undo unit of the undo stack of the application. This prevents the locked unit from being merged with undo units that are added subsequently. - @@ -1486,11 +1486,11 @@ TextBox with CaretBrush set to blue Is called when a control template is applied. - . - + . + ]]> @@ -1532,13 +1532,13 @@ TextBox with CaretBrush set to blue Arguments of the event. Called whenever an unhandled routed event reaches this class in its route. Implement this method to add class handling for this event. - can call private class handler methods when the event is received along the route. One scenario is to take the arguments of the event and deliberately mark the event as handled. - + can call private class handler methods when the event is received along the route. One scenario is to take the arguments of the event and deliberately mark the event as handled. + ]]> @@ -1974,13 +1974,13 @@ TextBox with CaretBrush set to blue The mouse wheel arguments that are associated with this event. Is called when a event is routed to this class (or to a class that inherits from this class). - event occurs when the mouse wheel is rolled. - - Overrides . - + event occurs when the mouse wheel is rolled. + + Overrides . + ]]> @@ -2042,13 +2042,13 @@ TextBox with CaretBrush set to blue Provides data about the event. Invoked whenever an unhandled attached routed event reaches an element derived from this class in its route. Implement this method to add class handling for this event. - can choose to call private class handler methods when the event is received along the route. One scenario is to take the arguments of the event and mark the event as handled. - + can choose to call private class handler methods when the event is received along the route. One scenario is to take the arguments of the event and mark the event as handled. + ]]> @@ -2112,11 +2112,11 @@ TextBox with CaretBrush set to blue The arguments that are associated with the event. Is called when the caret or current selection changes position. - event. - + event. + ]]> @@ -2151,11 +2151,11 @@ TextBox with CaretBrush set to blue A object that specifies a new control template to use. Is called when the control template changes. - . - + . + ]]> @@ -2188,11 +2188,11 @@ TextBox with CaretBrush set to blue The arguments that are associated with the event. Is called when content in this editing control changes. - event. - + event. + ]]> @@ -2253,14 +2253,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control down by one page. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase17"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase17"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase17"::: + ]]> @@ -2293,14 +2293,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control to the left by one page. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase18"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase18"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase18"::: + ]]> @@ -2333,14 +2333,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control to the right by one page. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase19"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase19"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase19"::: + ]]> @@ -2373,14 +2373,14 @@ TextBox with CaretBrush set to blue Scrolls the contents of the control up by one page. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase20"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase20"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase20"::: + ]]> @@ -2413,14 +2413,14 @@ TextBox with CaretBrush set to blue Pastes the contents of the Clipboard over the current selection in the text editing control. - method to paste selected content into a control. - + method to paste selected content into a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase6"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase6"::: + ]]> @@ -2454,14 +2454,14 @@ TextBox with CaretBrush set to blue if the redo operation was successful; otherwise, . This method returns if there is no undo command available (the undo stack is empty). - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase9"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase9"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase9"::: + ]]> @@ -2496,14 +2496,14 @@ TextBox with CaretBrush set to blue Scrolls the view of the editing control to the end of the content. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase22"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase22"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase22"::: + ]]> @@ -2534,14 +2534,14 @@ TextBox with CaretBrush set to blue Scrolls the view of the editing control to the beginning of the viewport. - method to scroll the contents of a control. - + method to scroll the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase21"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase21"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase21"::: + ]]> @@ -2634,14 +2634,14 @@ TextBox with CaretBrush set to blue Selects all the contents of the text editing control. - method to select all the contents of a control. - + method to select all the contents of a control. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase7"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase7"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase7"::: + ]]> @@ -2670,23 +2670,23 @@ TextBox with CaretBrush set to blue Gets or sets the brush that highlights selected text. The brush that highlights selected text. - and properties. The property specifies the opacity of the . - - - -## Examples - The following example creates a and adds the text, "This is some text." The example sets the property to red and the property to 0.5 to customize the appearance of selected text. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippettextbox"::: - - The following illustration shows the from the preceding example with its text selected. - - ![TextBox with a red SelectionBrush](~/add/media/textboxselectionbrush.png "TextBox with a red SelectionBrush") -Selected text in a TextBox with SelectionBrush set to red - + and properties. The property specifies the opacity of the . + + + +## Examples + The following example creates a and adds the text, "This is some text." The example sets the property to red and the property to 0.5 to customize the appearance of selected text. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippettextbox"::: + + The following illustration shows the from the preceding example with its text selected. + + ![TextBox with a red SelectionBrush](~/add/media/textboxselectionbrush.png "TextBox with a red SelectionBrush") +Selected text in a TextBox with SelectionBrush set to red + ]]> @@ -2740,27 +2740,27 @@ Selected text in a TextBox with SelectionBrush set to red Occurs when the text selection has changed. - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|| - - - -## Examples - The following example demonstrates how to handle the event by using code. - + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|| + + + +## Examples + The following example demonstrates how to handle the event by using code. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase10"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase10"::: + ]]> @@ -2816,23 +2816,23 @@ Selected text in a TextBox with SelectionBrush set to red Gets or sets the opacity of the . The opacity of the . The default is 0.4. - is set to 0, the is transparent and is not visible. If is set to 1.0 or greater, the is opaque and the selected text is not visible. - - - -## Examples - The following example creates a and adds the text, "This is some text." The example sets the property to red and the property to 0.5 to customize the appearance of selected text. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippettextbox"::: - - The following illustration shows the from the preceding example with its text selected. - - ![TextBox with a red SelectionBrush](~/add/media/textboxselectionbrush.png "TextBox with a red SelectionBrush") -Selected text in a TextBox with SelectionOpacity set to 0.5 - + is set to 0, the is transparent and is not visible. If is set to 1.0 or greater, the is opaque and the selected text is not visible. + + + +## Examples + The following example creates a and adds the text, "This is some text." The example sets the property to red and the property to 0.5 to customize the appearance of selected text. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippettextbox"::: + + The following illustration shows the from the preceding example with its text selected. + + ![TextBox with a red SelectionBrush](~/add/media/textboxselectionbrush.png "TextBox with a red SelectionBrush") +Selected text in a TextBox with SelectionOpacity set to 0.5 + ]]> @@ -2887,10 +2887,10 @@ Selected text in a TextBox with SelectionOpacity set to 0.5 The brush used for selected text. with the system-defined color for highlighted text. +## Remarks + +The default value is a with the system-defined color for highlighted text. ]]> @@ -2920,10 +2920,10 @@ The default value is a with the syst Identifies the dependency property. @@ -2952,8 +2952,8 @@ If this property is `null`, selected text is not rendered. Gets a object that provides access to spelling errors in the text contents of a or . - A object that provides access to spelling errors in the text contents of a or . - + A object that provides access to spelling errors in the text contents of a or . + This property has no default value. To be added. @@ -2985,20 +2985,20 @@ If this property is `null`, selected text is not rendered. Occurs when content changes in the text element. - , this event occurs when its text changes; for a , this event occurs when any content or formatting changes (for example, images, table, or background color). - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|| - + , this event occurs when its text changes; for a , this event occurs when any content or formatting changes (for example, images, table, or background color). + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|| + ]]> @@ -3059,14 +3059,14 @@ If this property is `null`, selected text is not rendered. if the undo operation was successful; otherwise, . This method returns if the undo stack is empty. - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase8"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase8"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase8"::: + ]]> @@ -3101,13 +3101,13 @@ If this property is `null`, selected text is not rendered. Gets or sets the number of actions stored in the undo queue. The number of actions stored in the undo queue. The default is -1, which means the undo queue is limited to the memory that is available. - clears the undo queue. When is set to -1, the undo queue is limited only by the memory that is available. When is set to 0, undo is disabled on the . - - is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). - + clears the undo queue. When is set to -1, the undo queue is limited only by the memory that is available. When is set to 0, undo is disabled on the . + + is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). + ]]> @@ -3138,11 +3138,11 @@ If this property is `null`, selected text is not rendered. Identifies the dependency property. - is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). - + is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). + ]]> @@ -3170,27 +3170,27 @@ If this property is `null`, selected text is not rendered. Gets or sets the vertical scroll position. - A floating-point value that specifies the vertical scroll position, in device-independent units (1/96th inch per unit). - - Setting this property causes the text editing control to scroll to the specified vertical offset. Reading this property returns the current vertical offset. - - The value of this property is 0.0 if the text editing control is not configured to support scrolling. - + A floating-point value that specifies the vertical scroll position, in device-independent units (1/96th inch per unit). + + Setting this property causes the text editing control to scroll to the specified vertical offset. Reading this property returns the current vertical offset. + + The value of this property is 0.0 if the text editing control is not configured to support scrolling. + This property has no default value. - property. - + property. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: + ]]> An attempt is made to set this property to a negative value. @@ -3224,22 +3224,22 @@ If this property is `null`, selected text is not rendered. Gets or sets a value that indicates whether a vertical scroll bar is shown. - A value that is defined by the enumeration. - + A value that is defined by the enumeration. + The default value is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -3296,20 +3296,20 @@ If this property is `null`, selected text is not rendered. Gets the vertical size of the scrollable content area. - A floating-point value that specifies the vertical size of the scrollable content area, in device-independent units (1/96th inch per unit). - - The value of this property is 0.0 if the text editing control is not configured to support scrolling. - + A floating-point value that specifies the vertical size of the scrollable content area, in device-independent units (1/96th inch per unit). + + The value of this property is 0.0 if the text editing control is not configured to support scrolling. + This property has no default value. - property. - + property. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: + ]]> @@ -3340,20 +3340,20 @@ If this property is `null`, selected text is not rendered. Gets the horizontal size of the scrollable content area. - A floating-point value that specifies the horizontal size of the scrollable content area, in device-independent units (1/96th inch per unit). - - The value of this property is 0.0 if the text editing control is not configured to support scrolling. - + A floating-point value that specifies the horizontal size of the scrollable content area, in device-independent units (1/96th inch per unit). + + The value of this property is 0.0 if the text editing control is not configured to support scrolling. + This property has no default value. - property. - + property. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextWrapping/Overview/Window1.xaml.cs" id="Snippettextboxbase3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb" id="Snippettextboxbase3"::: + ]]> diff --git a/xml/System.Windows.Controls.Ribbon.Primitives/RibbonContextualTabGroupsPanel.xml b/xml/System.Windows.Controls.Ribbon.Primitives/RibbonContextualTabGroupsPanel.xml index 4ef5728c822..21e225ff7aa 100644 --- a/xml/System.Windows.Controls.Ribbon.Primitives/RibbonContextualTabGroupsPanel.xml +++ b/xml/System.Windows.Controls.Ribbon.Primitives/RibbonContextualTabGroupsPanel.xml @@ -188,21 +188,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTabHeadersPanel.xml b/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTabHeadersPanel.xml index b726c040d6c..968b6385ed5 100644 --- a/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTabHeadersPanel.xml +++ b/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTabHeadersPanel.xml @@ -25,11 +25,11 @@ Represents a panel that supports horizontal scrolling of the tab headers in a . - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -144,11 +144,11 @@ in all cases. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -180,11 +180,11 @@ This API is not implemented. 0.0 in all cases. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -216,11 +216,11 @@ Gets the horizontal size of the scrolled content in device-independent units (1/96th inch per unit). The horizontal size of the scrolled content in device-independent units (1/96th inch per unit). This property has no default value. - value of the panel's internal . - + value of the panel's internal . + ]]> @@ -252,11 +252,11 @@ Gets the horizontal offset of the scrolled content in device-independent units (1/96th inch per unit). The horizontal offset of the scrolled content in device-independent units (1/96th inch per unit). This property has no default value. - value of the panel's internal . - + value of the panel's internal . + ]]> @@ -288,11 +288,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -382,11 +382,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -483,11 +483,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -519,11 +519,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -555,11 +555,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -591,11 +591,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -687,11 +687,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -723,11 +723,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -759,11 +759,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -795,11 +795,11 @@ This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -826,21 +826,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -961,11 +961,11 @@ This API is not implemented. This API is not implemented. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -997,11 +997,11 @@ This API is not implemented. 0.0 in all cases. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -1033,11 +1033,11 @@ This API is not implemented. 0.0 in all cases. - provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. - + provides horizontal scrolling by line for controls in a . Scrolling up or down, and scrolling by page is not supported. + ]]> @@ -1069,11 +1069,11 @@ Gets the horizontal size of the content's visible range in device-independent units (1/96th inch per unit). The horizontal size of the content's visible range in device-independent units (1/96th inch per unit). This property has no default value. - value of the panel's internal . - + value of the panel's internal . + ]]> diff --git a/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTitlePanel.xml b/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTitlePanel.xml index be19119fc97..7d276cd7156 100644 --- a/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTitlePanel.xml +++ b/xml/System.Windows.Controls.Ribbon.Primitives/RibbonTitlePanel.xml @@ -128,21 +128,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon.Primitives/StarLayoutInfo.xml b/xml/System.Windows.Controls.Ribbon.Primitives/StarLayoutInfo.xml index 4288f3399a9..42bebdcabf9 100644 --- a/xml/System.Windows.Controls.Ribbon.Primitives/StarLayoutInfo.xml +++ b/xml/System.Windows.Controls.Ribbon.Primitives/StarLayoutInfo.xml @@ -21,11 +21,11 @@ Contains information about a particular star layout. - @@ -125,20 +125,20 @@ Gets or sets the requested maximum width. - The requested maximum width. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The requested maximum width. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -190,20 +190,20 @@ Gets or sets the requested minimum width. - The requested minimum width. The registered default is 0.0. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The requested minimum width. The registered default is 0.0. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -255,20 +255,20 @@ Gets or sets the requested weight. - The requested weight. The registered default is 0.0. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The requested weight. The registered default is 0.0. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/Ribbon.xml b/xml/System.Windows.Controls.Ribbon/Ribbon.xml index 547243abcdd..706e701a6a3 100644 --- a/xml/System.Windows.Controls.Ribbon/Ribbon.xml +++ b/xml/System.Windows.Controls.Ribbon/Ribbon.xml @@ -56,54 +56,54 @@ Represents the root element of a ribbon user interface that hosts a Quick Access Toolbar, Application Menu, and tabs. - class is the root element of a ribbon user interface (UI) in Windows Presentation Foundation (WPF). The class hosts a , a , and one or more controls. These controls then host a variety of button and menu controls that enable access to application commands. - - The following list shows the typical hierarchy of ribbon elements. - -- - - - - - - - - - , , , , - - - , , - - - - - - - - - - - - - - - - - - - - - - - - - - - , , , , - - - , , - - - - - - -## Examples - The following example shows a simple ribbon that is created by the Visual Studio 2010 template, with help pane and Quick Access Toolbar elements added. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/mainwindow.xaml" id="Snippetribbondefault"::: - + class is the root element of a ribbon user interface (UI) in Windows Presentation Foundation (WPF). The class hosts a , a , and one or more controls. These controls then host a variety of button and menu controls that enable access to application commands. + + The following list shows the typical hierarchy of ribbon elements. + +- + + - + + - + + - , , , , + + - , , + + - + + - + + - + + - + + - + + - + + - + + - + + - , , , , + + - , , + + - + + + +## Examples + The following example shows a simple ribbon that is created by the Visual Studio 2010 template, with help pane and Quick Access Toolbar elements added. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/mainwindow.xaml" id="Snippetribbondefault"::: + ]]> @@ -152,44 +152,44 @@ Gets or sets the that is a logical child of this control. - The ribbon Application Menu that is a logical child of this control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The ribbon Application Menu that is a logical child of this control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to associate a object with the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows a simple Application Menu attached to a ribbon control. For more examples, see . - -```xaml -xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" -... - -     -         -             -         -     -     - -     - - -``` - + property to associate a object with the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows a simple Application Menu attached to a ribbon control. For more examples, see . + +```xaml +xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" +... + +     +         +             +         +     +     + +     + + +``` + ]]> @@ -241,20 +241,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush that is used to draw the background of controls when they are in the Checked state. - The brush that is used to draw the background of controls when they are in the Checked state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of controls when they are in the Checked state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -306,20 +306,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush that is used to draw the outer border of controls when they are in the Checked state. - The brush that is used to draw the outer border of controls when they are in the Checked state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of controls when they are in the Checked state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -421,20 +421,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the template that is used to display items in the . - The template that is used to display items in the . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The template that is used to display items in the . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -494,28 +494,28 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets a collection that contains all of the items in the . The collection of items in the if one exists; otherwise, a new empty collection. - named **Pens** that is in the **Ink Tools** contextual tab group. - -```xaml - -     - -     -     -         -     - - -``` - + named **Pens** that is in the **Ink Tools** contextual tab group. + +```xaml + +     + +     +     +         +     + + +``` + ]]> @@ -542,20 +542,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets a collection used to generate the content of items. - A collection used to generate the content of items. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A collection used to generate the content of items. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -607,20 +607,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the style that is used when rendering items in the . - The style applied to all items in the . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The style applied to all items in the . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -722,20 +722,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush used to draw the background of controls in the Focused state. - The brush used to draw the background of controls in the Focused state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush used to draw the background of controls in the Focused state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -787,21 +787,21 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush used to draw the outer border of controls in the Focused state. - The brush used to draw the outer border of controls in the Focused state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush used to draw the outer border of controls in the Focused state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -880,21 +880,21 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the contents of the help pane. - The contents of the help pane. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The contents of the help pane. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to a single button that launches a separate help window. However, you can define any content to go in the help pane. You can specify the layout and appearance of the content by setting the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to a single button that launches a separate help window. However, you can define any content to go in the help pane. You can specify the layout and appearance of the content by setting the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -946,20 +946,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the template that is used to display the content of the help pane. - The template that is used to display the content of the help pane. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The template that is used to display the content of the help pane. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1012,23 +1012,23 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets a value that indicates whether the is collapsed. - if the is collapsed; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the is collapsed; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - event occurs. When the ribbon is expanded, the event occurs. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + event occurs. When the ribbon is expanded, the event occurs. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1084,23 +1084,23 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets a value that indicates whether the drop-down for a is open. - if the drop-down for a is open; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the drop-down for a is open; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property is `true`, the Quick Access Toolbar, Application Menu, and tab headers are shown, but the tab contents are put in a drop-down and are not shown by default. When a user selects a tab header, the drop-down for the tab is opened and its contents are shown. Selecting or deselecting the tab header toggles the property between `true` and `false`. - - If the property is `false`, the property is also `false`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property is `true`, the Quick Access Toolbar, Application Menu, and tab headers are shown, but the tab contents are put in a drop-down and are not shown by default. When a user selects a tab header, the drop-down for the tab is opened and its contents are shown. Selecting or deselecting the tab header toggles the property between `true` and `false`. + + If the property is `false`, the property is also `false`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1154,20 +1154,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets a value that indicates whether the is currently hosted in a . - if the is hosted in a ; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the is hosted in a ; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1251,23 +1251,23 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets a value that indicates whether the is minimized. - if the is minimized; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the is minimized; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property is `true`, the Quick Access Toolbar, Application Menu, and tab headers are shown, but the tab contents are put in a drop-down and are not shown by default. When a user selects a tab header, the drop-down for the tab is opened and its contents are shown. - - If the property is `true`, selecting or deselecting the tab header toggles the property between `true` and `false`. If the property is `false`, the property is also `false`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property is `true`, the Quick Access Toolbar, Application Menu, and tab headers are shown, but the tab contents are put in a drop-down and are not shown by default. When a user selects a tab header, the drop-down for the tab is opened and its contents are shown. + + If the property is `true`, selecting or deselecting the tab header toggles the property between `true` and `false`. If the property is `false`, the property is also `false`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1342,20 +1342,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush that is used to draw the background of controls when they are in the MouseOver state. - The brush that is used to draw the background of controls when they are in the MouseOver state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of controls when they are in the MouseOver state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1407,20 +1407,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush that is used to draw the outer border of controls when they are in the MouseOver state. - The brush that is used to draw the outer border of controls when they are in the MouseOver state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of controls when they are in the MouseOver state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1474,11 +1474,11 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1653,13 +1653,13 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro The event data. Provides class handling for the event. - causes the to switch between tabs. - - This implementation marks the event as handled by setting the property of the event data to `true`. - + causes the to switch between tabs. + + This implementation marks the event as handled by setting the property of the event data to `true`. + ]]> @@ -1691,11 +1691,11 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro The event data. Provides class handling for the event. - . - + . + ]]> @@ -1753,20 +1753,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush that is used to draw the background of controls when they are in the Pressed state. - The brush that is used to draw the background of controls when they are in the Pressed state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of controls when they are in the Pressed state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1818,20 +1818,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the brush that is used to draw the outer border of controls when they are in the Pressed state. - The brush that is used to draw the outer border of controls when they are in the Pressed state. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of controls when they are in the Pressed state. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1883,20 +1883,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the that is a logical child of this . - The Quick Access Toolbar that is the logical child of this control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The Quick Access Toolbar that is the logical child of this control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1949,20 +1949,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets a value that indicates whether to show the Quick Access Toolbar above the . - if the Quick Access Toolbar is shown above the ; if the Quick Access Toolbar is shown below the . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the Quick Access Toolbar is shown above the ; if the Quick Access Toolbar is shown below the . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2014,20 +2014,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the style that is used when rendering tab headers. - The style that is used when rendering tab headers. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The style that is used when rendering tab headers. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2079,20 +2079,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the template that is used to display tab headers. - The template that is used to display tab headers. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The template that is used to display tab headers. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2144,25 +2144,25 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the title of this control. - The title of this control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title of this control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the instead of setting the property. - - The is shown in the title bar of the if the property of the is `null`. If the property is not `null`, the title is shown instead of the value. - - If the is hosted in a instead of a , the is shown next to the Quick Access Toolbar, below the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property on the instead of setting the property. + + The is shown in the title bar of the if the property of the is `null`. If the property is not `null`, the title is shown instead of the value. + + If the is hosted in a instead of a , the is shown next to the Quick Access Toolbar, below the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2215,20 +2215,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the template that is used to display the title. - The template that is used to display the title. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The template that is used to display the title. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2280,20 +2280,20 @@ xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=RibbonContro Gets or sets the for the icon of the that contains this . - One of the enumeration values that specifies the visibility of the icon. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + One of the enumeration values that specifies the visibility of the icon. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenu.xml b/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenu.xml index 399dd832347..76d89df6f4c 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenu.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenu.xml @@ -48,42 +48,42 @@ Represents an Application Menu that is used in a control. - can host and objects. The Application Menu also has an *auxiliary pane* and a *footer pane* that can host additional content. The property hosts a and is typically used to display a list of recent documents. The property typically hosts buttons that enable access to program options and the Exit command. - - The following list shows the typical hierarchy of elements in an Application Menu. - -- - - - - - - - - - - - - - - - - - - - - - - - - -## Examples - The following example shows the Application Menu as illustrated previously. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenufull"::: - + can host and objects. The Application Menu also has an *auxiliary pane* and a *footer pane* that can host additional content. The property hosts a and is typically used to display a list of recent documents. The property typically hosts buttons that enable access to program options and the Exit command. + + The following list shows the typical hierarchy of elements in an Application Menu. + +- + + - + + - + + - + + - + + - + + - + + - + + + +## Examples + The following example shows the Application Menu as illustrated previously. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenufull"::: + ]]> @@ -132,32 +132,32 @@ Gets or sets the content of the Application Menu auxiliary pane. - The content of the Application Menu auxiliary pane. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The content of the Application Menu auxiliary pane. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property hosts a and is typically used to display a list of recent documents. - - The following illustration shows the Application Menu for a ribbon control. The auxiliary pane hosts a list of recent documents. - - ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the auxiliary pane content of the Application Menu shown previously. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenuauxpane"::: - + property hosts a and is typically used to display a list of recent documents. + + The following illustration shows the Application Menu for a ribbon control. The auxiliary pane hosts a list of recent documents. + + ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the auxiliary pane content of the Application Menu shown previously. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenuauxpane"::: + ]]> @@ -209,20 +209,20 @@ Gets or sets the template that is used to display the content of the Application Menu auxiliary pane. - The template that is used to display the content of the Application Menu auxiliary pane. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The template that is used to display the content of the Application Menu auxiliary pane. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -274,21 +274,21 @@ Gets or sets the custom logic for selecting a that is used to display the contents of the Application Menu auxiliary pane. - A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to specify the visualization of the content. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the visualization of the content. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -340,32 +340,32 @@ Gets or sets the content of the Application Menu footer pane. - The content of the Application Menu footer pane. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The content of the Application Menu footer pane. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property typically hosts buttons that enable access to program options and the Exit command. - - The following illustration shows the Application Menu for a ribbon control. The footer pane hosts an **Exit** button. - - ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the footer pane content of the Application Menu shown previously. - - - + property typically hosts buttons that enable access to program options and the Exit command. + + The following illustration shows the Application Menu for a ribbon control. The footer pane hosts an **Exit** button. + + ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the footer pane content of the Application Menu shown previously. + + + ]]> @@ -417,20 +417,20 @@ Gets or sets the template that is used to display the content of the Application Menu footer pane. - The template that is used to display the content of the Application Menu footer pane. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The template that is used to display the content of the Application Menu footer pane. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -482,21 +482,21 @@ Gets or sets the custom logic for selecting a that is used to display the contents of the Application Menu footer pane. - A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to specify the visualization of the content. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the visualization of the content. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -637,11 +637,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenuItem.xml b/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenuItem.xml index 73a371842ce..e2e90154b3a 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenuItem.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonApplicationMenuItem.xml @@ -28,26 +28,26 @@ Represents a menu item inside a control. - to invoke a command when the menu item is clicked. For more information about using commands with menu items, see [How to: Add a Command to a MenuItem](https://learn.microsoft.com/previous-versions/dotnet/netframework-3.5/ms741839(v=vs.90)). - - A can have submenus. The submenu of the is made up of the objects within the collection of a . It is common for a to contain other objects to create nested submenus. - - A cannot have submenus and also invoke a command. If the has a submenu, the command associated with the is not invoked. When you need a control that acts as a menu header and invokes a command, use a . - - The following illustration shows the Application Menu for a ribbon control. The **Open**, **Save**, and **Page Setup** items are examples of the control. - - ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") - - - -## Examples - The following example shows the menu items of the Application Menu shown previously. The objects are hosted directly in the and in a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenuitems"::: - + to invoke a command when the menu item is clicked. For more information about using commands with menu items, see [How to: Add a Command to a MenuItem](https://learn.microsoft.com/previous-versions/dotnet/netframework-3.5/ms741839(v=vs.90)). + + A can have submenus. The submenu of the is made up of the objects within the collection of a . It is common for a to contain other objects to create nested submenus. + + A cannot have submenus and also invoke a command. If the has a submenu, the command associated with the is not invoked. When you need a control that acts as a menu header and invokes a command, use a . + + The following illustration shows the Application Menu for a ribbon control. The **Open**, **Save**, and **Page Setup** items are examples of the control. + + ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") + + + +## Examples + The following example shows the menu items of the Application Menu shown previously. The objects are hosted directly in the and in a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenuitems"::: + ]]> @@ -154,20 +154,20 @@ Gets a value that indicates at what level the menu item is displayed. - One the enumeration values that specifies at what level the menu item is displayed. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + One the enumeration values that specifies at what level the menu item is displayed. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -250,11 +250,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonApplicationSplitMenuItem.xml b/xml/System.Windows.Controls.Ribbon/RibbonApplicationSplitMenuItem.xml index 9aa2bcaf9c5..6acca29ad94 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonApplicationSplitMenuItem.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonApplicationSplitMenuItem.xml @@ -28,24 +28,24 @@ Represents a menu item inside a control that can invoke a command and also display a submenu. - when you want to invoke a command and also display a submenu of related commands using a single menu item. For more information about using commands with menu items, see [How to: Add a Command to a MenuItem](https://learn.microsoft.com/previous-versions/dotnet/netframework-3.5/ms741839(v=vs.90)). - - The command that is associated with the is invoked when the menu item is clicked. The submenu is displayed when the mouse pointer is moved over the menu item. The submenu of the is made up of the objects within the collection of a . It is common for a to host objects to create submenus. - - The following illustration shows the Application Menu for a ribbon control. The **Save As** and **Print** items are examples of the control. - - ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") - - - -## Examples - The following example shows the menu items of the Application Menu shown previously. The objects are hosting objects. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenuitems"::: - + when you want to invoke a command and also display a submenu of related commands using a single menu item. For more information about using commands with menu items, see [How to: Add a Command to a MenuItem](https://learn.microsoft.com/previous-versions/dotnet/netframework-3.5/ms741839(v=vs.90)). + + The command that is associated with the is invoked when the menu item is clicked. The submenu is displayed when the mouse pointer is moved over the menu item. The submenu of the is made up of the objects within the collection of a . It is common for a to host objects to create submenus. + + The following illustration shows the Application Menu for a ribbon control. The **Save As** and **Print** items are examples of the control. + + ![Ribbon Application Menu](~/add/media/wpfribbon-appmenu.png "Ribbon Application Menu") + + + +## Examples + The following example shows the menu items of the Application Menu shown previously. The objects are hosting objects. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/ribbonwindow1.xaml" id="Snippetappmenuitems"::: + ]]> @@ -152,20 +152,20 @@ Gets a value that indicates at what level the menu item is displayed. - One the enumeration values that specifies at what level the menu item is displayed. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + One the enumeration values that specifies at what level the menu item is displayed. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -248,11 +248,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonButton.xml b/xml/System.Windows.Controls.Ribbon/RibbonButton.xml index c3feebdec57..7ddf96d77d9 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonButton.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonButton.xml @@ -28,26 +28,26 @@ Represents a button that is used in a control. - controls in large, medium, and small variations, and with no images. - - ![Ribbon button controls](~/add/media/wpfribbon-button.png "Ribbon button controls") -Ribbon button controls - - The following illustration shows how a appears when the mouse pointer is moved over it. - - ![Ribbon button controls with highlight](~/add/media/wpfribbon-button-selection.png "Ribbon button controls with highlight") -Ribbon button controls with highlight - - - -## Examples - The following example shows the markup to create the first button. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbutton"::: - + controls in large, medium, and small variations, and with no images. + + ![Ribbon button controls](~/add/media/wpfribbon-button.png "Ribbon button controls") +Ribbon button controls + + The following illustration shows how a appears when the mouse pointer is moved over it. + + ![Ribbon button controls with highlight](~/add/media/wpfribbon-button-selection.png "Ribbon button controls with highlight") +Ribbon button controls with highlight + + + +## Examples + The following example shows the markup to create the first button. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbutton"::: + ]]> @@ -97,20 +97,20 @@ Ribbon button controls with highlight Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -164,19 +164,19 @@ Ribbon button controls with highlight Gets or sets the for this control. The for this control. - contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -231,18 +231,18 @@ Ribbon button controls with highlight Gets or sets a value that indicates the amount that the corners of a ribbon button are rounded. A value that indicates the amount that the corners of a ribbon button are rounded. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -296,18 +296,18 @@ Ribbon button controls with highlight Gets or sets the brush that is used to draw the background of the control when it has focus. The brush that is used to draw the background of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -361,18 +361,18 @@ Ribbon button controls with highlight Gets or sets the brush that is used to draw the outer border of the control when it has focus. The brush that is used to draw the outer border of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -427,18 +427,18 @@ Ribbon button controls with highlight if the control is hosted in a ; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -493,18 +493,18 @@ Ribbon button controls with highlight if the control is hosted in the Quick Access Toolbar; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -556,23 +556,23 @@ Ribbon button controls with highlight Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -624,31 +624,31 @@ Ribbon button controls with highlight Gets or sets the text that is displayed next to or below the control. - The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the label. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the first button. The property is set to "Paste". - - ![Ribbon button controls](~/add/media/wpfribbon-button.png "Ribbon button controls") -Ribbon button controls - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbutton"::: - + property on the to control the visibility of the label. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the first button. The property is set to "Paste". + + ![Ribbon button controls](~/add/media/wpfribbon-button.png "Ribbon button controls") +Ribbon button controls + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbutton"::: + ]]> @@ -700,21 +700,21 @@ Ribbon button controls Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -769,18 +769,18 @@ Ribbon button controls Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. The brush that is used to draw the background of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -834,18 +834,18 @@ Ribbon button controls Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. The brush that is used to draw the outer border of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -928,11 +928,11 @@ Ribbon button controls Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -961,11 +961,11 @@ Ribbon button controls Handles the event and raises the attached event. - attached event. - + attached event. + ]]> @@ -1024,13 +1024,13 @@ Ribbon button controls The event data. Provides class handling for the event and enables the keyboard focus visual when this control gets keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1091,13 +1091,13 @@ Ribbon button controls The event data. Provides class handling for the event and disables the keyboard focus visual when this control loses keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1129,13 +1129,13 @@ Ribbon button controls The event data. Provides class handling for the routed event to prevent the control from receiving keyboard focus. - should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. - - This implementation does not change the handled state (the property) of the event data. - + should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. + + This implementation does not change the handled state (the property) of the event data. + ]]> @@ -1164,18 +1164,18 @@ Ribbon button controls Gets or sets the brush that is used to draw the background of the control when it is pressed. The brush that is used to draw the background of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1229,18 +1229,18 @@ Ribbon button controls Gets or sets the brush that is used to draw the outer border of the control when it is pressed. The brush that is used to draw the outer border of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1294,19 +1294,19 @@ Ribbon button controls Gets or sets the for this control when it is hosted in the Quick Access Toolbar. The for this control when it is hosted in the Quick Access Toolbar. - contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1361,18 +1361,18 @@ Ribbon button controls Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1424,21 +1424,21 @@ Ribbon button controls Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1493,18 +1493,18 @@ Ribbon button controls to show the keyboard focus visual; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1556,21 +1556,21 @@ Ribbon button controls Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -1623,33 +1623,33 @@ Ribbon button controls Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: + ]]> @@ -1702,33 +1702,33 @@ Enhanced ToolTip Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: + ]]> @@ -1781,33 +1781,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: + ]]> @@ -1860,33 +1860,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: + ]]> @@ -1939,33 +1939,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: + ]]> @@ -2018,33 +2018,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonbuttontt"::: + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonCheckBox.xml b/xml/System.Windows.Controls.Ribbon/RibbonCheckBox.xml index d0458a1aa9b..6ab21be4bcf 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonCheckBox.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonCheckBox.xml @@ -28,26 +28,26 @@ Represents a check box that is used in a control. - controls in large, medium, and small variations, and with no images. - - ![Ribbon check box controls](~/add/media/wpfribbon-checkbox.png "Ribbon check box controls") -Ribbon check box controls - - The following illustration shows examples of controls that are selected. - - ![Ribbon check box controls that are selected](~/add/media/wpfribbon-checkbox-selection.png "Ribbon check box controls that are selected") -Ribbon check box controls that are selected - - - -## Examples - The following example shows the markup to create a control with a large image, a small image, and a label. Setting the property adds text that is aligned with the check box. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: - + controls in large, medium, and small variations, and with no images. + + ![Ribbon check box controls](~/add/media/wpfribbon-checkbox.png "Ribbon check box controls") +Ribbon check box controls + + The following illustration shows examples of controls that are selected. + + ![Ribbon check box controls that are selected](~/add/media/wpfribbon-checkbox-selection.png "Ribbon check box controls that are selected") +Ribbon check box controls that are selected + + + +## Examples + The following example shows the markup to create a control with a large image, a small image, and a label. Setting the property adds text that is aligned with the check box. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: + ]]> @@ -97,7 +97,7 @@ Ribbon check box controls that are selected Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. To be added. @@ -150,18 +150,18 @@ Ribbon check box controls that are selected Gets or sets the brush that is used to draw the background of the control when it is in the Checked state. The brush that is used to draw the background of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -215,18 +215,18 @@ Ribbon check box controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it is in the Checked state. The brush that is used to draw the outer border of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -280,19 +280,19 @@ Ribbon check box controls that are selected Gets or sets the for this control. The for this control. - contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -347,18 +347,18 @@ Ribbon check box controls that are selected Gets or sets the brush that is used to draw the background of the control when it has focus. The brush that is used to draw the background of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -412,18 +412,18 @@ Ribbon check box controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it has focus. The brush that is used to draw the outer border of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -478,18 +478,18 @@ Ribbon check box controls that are selected if the control is hosted in a ; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -544,18 +544,18 @@ Ribbon check box controls that are selected if the control is hosted in the Quick Access Toolbar; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -607,23 +607,23 @@ Ribbon check box controls that are selected Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -675,28 +675,28 @@ Ribbon check box controls that are selected Gets or sets the text that is displayed next to or below the control. - The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the label. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: - + property on the to control the visibility of the label. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: + ]]> @@ -748,28 +748,28 @@ Ribbon check box controls that are selected Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property for a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property for a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: + ]]> Ribbon Layout and Resizing @@ -824,18 +824,18 @@ Ribbon check box controls that are selected Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. The brush that is used to draw the background of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -889,18 +889,18 @@ Ribbon check box controls that are selected Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. The brush that is used to draw the outer border of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -983,11 +983,11 @@ Ribbon check box controls that are selected Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1016,11 +1016,11 @@ Ribbon check box controls that are selected Handles the event and raises the attached event. - attached event. - + attached event. + ]]> @@ -1079,13 +1079,13 @@ Ribbon check box controls that are selected The event data. Provides class handling for the event and enables the keyboard focus visual when this control gets keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1146,13 +1146,13 @@ Ribbon check box controls that are selected The event data. Provides class handling for the event and disables the keyboard focus visual when this control loses keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1184,13 +1184,13 @@ Ribbon check box controls that are selected The event data. Provides class handling for the routed event to prevent the control from receiving keyboard focus. - should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. - - This implementation does not change the handled state (the property) of the event data. - + should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. + + This implementation does not change the handled state (the property) of the event data. + ]]> @@ -1219,18 +1219,18 @@ Ribbon check box controls that are selected Gets or sets the brush that is used to draw the background of the control when it is pressed. The brush that is used to draw the background of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1335,19 +1335,19 @@ Ribbon check box controls that are selected Gets or sets the for this control when it is hosted in the Quick Access Toolbar. The for this control when it is hosted in the Quick Access Toolbar. - contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1451,21 +1451,21 @@ Ribbon check box controls that are selected Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1520,18 +1520,18 @@ Ribbon check box controls that are selected to show the keyboard focus visual; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1583,28 +1583,28 @@ Ribbon check box controls that are selected Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckbox"::: + ]]> Ribbon Layout and Resizing @@ -1657,33 +1657,33 @@ Ribbon check box controls that are selected Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: + ]]> @@ -1736,33 +1736,33 @@ Enhanced ToolTip Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: + ]]> @@ -1815,33 +1815,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: + ]]> @@ -1894,33 +1894,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: + ]]> @@ -1973,33 +1973,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: + ]]> @@ -2052,33 +2052,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncheckboxtt"::: + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonComboBox.xml b/xml/System.Windows.Controls.Ribbon/RibbonComboBox.xml index cdcf32f6500..cbfcb0440a5 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonComboBox.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonComboBox.xml @@ -22,26 +22,26 @@ Represents a combo box that is used in a control. - controls that have images and labels, that just have images, and that just have labels. - - ![Ribbon combo box controls](~/add/media/wpfribbon-combobox.png "Ribbon combo box controls") -Ribbon combo box controls - - The following illustration shows a when the drop-down is opened. - - ![Ribbon combo box control with drop-down open](~/add/media/wpfribbon-combobox-selection.png "Ribbon combo box control with drop-down open") -Ribbon combo box control with drop-down open - - - -## Examples - The following example shows the markup to create a combo box with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: - + controls that have images and labels, that just have images, and that just have labels. + + ![Ribbon combo box controls](~/add/media/wpfribbon-combobox.png "Ribbon combo box controls") +Ribbon combo box controls + + The following illustration shows a when the drop-down is opened. + + ![Ribbon combo box control with drop-down open](~/add/media/wpfribbon-combobox-selection.png "Ribbon combo box control with drop-down open") +Ribbon combo box control with drop-down open + + + +## Examples + The following example shows the markup to create a combo box with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: + ]]> @@ -97,11 +97,11 @@ Ribbon combo box control with drop-down open The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -129,27 +129,27 @@ Ribbon combo box control with drop-down open Gets or sets a value that indicates whether the content of the combo box can be edited. - if the content of the combo box can be edited; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the content of the combo box can be edited; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup to create a combo box with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup to create a combo box with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: + ]]> @@ -202,20 +202,20 @@ Ribbon combo box control with drop-down open Gets or sets a value that indicates whether selection-only mode is enabled, in which the contents of the combo box are selectable but not editable. - if the contents of the combo box are selectable but not editable; if the contents of the combo box are not selectable and not editable. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the contents of the combo box are selectable but not editable; if the contents of the combo box are not selectable and not editable. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -298,11 +298,11 @@ Ribbon combo box control with drop-down open Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -390,11 +390,11 @@ Ribbon combo box control with drop-down open The event data. Provides class handling for the event. - property) of the event data. - + property) of the event data. + ]]> @@ -629,11 +629,11 @@ Ribbon combo box control with drop-down open The event data. Provides class handling for the routed attached event. - event as handled by setting the property of the event data to `true`. This implementation does not call the base implementation. - + event as handled by setting the property of the event data to `true`. This implementation does not call the base implementation. + ]]> @@ -691,20 +691,20 @@ Ribbon combo box control with drop-down open Gets the item that is displayed in the selection box. - The item that is displayed in the selection box. The registered default is an string. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The item that is displayed in the selection box. The registered default is an string. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -756,20 +756,20 @@ Ribbon combo box control with drop-down open Gets a composite string that specifies how to format the selected item in the selection box if it is displayed as a string. - A composite string that specifies how to format the selected item in the selection box if it is displayed as a string. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A composite string that specifies how to format the selected item in the selection box if it is displayed as a string. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -821,20 +821,20 @@ Ribbon combo box control with drop-down open Gets the item template of the selection box content. - The item template of the selection box content. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The item template of the selection box content. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -886,20 +886,20 @@ Ribbon combo box control with drop-down open Gets or sets the custom logic for selecting a that is used to display the . - A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -951,28 +951,28 @@ Ribbon combo box control with drop-down open Gets or sets the width of the text box that displays the selected item in the combo box. - The width of the text box that displays the selected item in the combo box. The registered default is 0.0. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The width of the text box that displays the selected item in the combo box. The registered default is 0.0. For more information about what can influence the value, see Dependency Property Value Precedence. - property does not include the widths of the image and label that are associated with the combo box. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup to create a combo box with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: - + property does not include the widths of the image and label that are associated with the combo box. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup to create a combo box with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: + ]]> @@ -1027,18 +1027,18 @@ Ribbon combo box control with drop-down open to show the keyboard focus visual; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1091,20 +1091,20 @@ Ribbon combo box control with drop-down open Gets or sets a value that indicates whether a combo box that is open and displays a drop-down control will remain open when a user clicks the selection box. - to keep the drop-down control open when the user clicks the text area to start editing; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + to keep the drop-down control open when the user clicks the text area to start editing; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1156,21 +1156,21 @@ Ribbon combo box control with drop-down open Gets or sets the text of the currently selected item. - The text of the item that is displayed in the selection box. The registered default is an string. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text of the item that is displayed in the selection box. The registered default is an string. For more information about what can influence the value, see Dependency Property Value Precedence. - and is `true`, this property represents the text entered in the text box. When is `false`, this property represents the string version of the selected item. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + and is `true`, this property represents the text entered in the text box. When is `false`, this property represents the string version of the selected item. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonContextMenu.xml b/xml/System.Windows.Controls.Ribbon/RibbonContextMenu.xml index b0c694195b3..3fc2cba49c6 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonContextMenu.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonContextMenu.xml @@ -81,11 +81,11 @@ The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -140,20 +140,20 @@ Gets a value that indicates whether at least one menu item is a . - if at least one menu item is a ; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if at least one menu item is a ; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonContextualTabGroup.xml b/xml/System.Windows.Controls.Ribbon/RibbonContextualTabGroup.xml index dd7bec1cc5d..cebb268af36 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonContextualTabGroup.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonContextualTabGroup.xml @@ -28,28 +28,28 @@ Represents a tab group that dynamically displays controls that are only relevant in a particular context. - named **Pens** that is in the **Ink Tools** contextual tab group. - -```xaml - -     - -     -     -         -     - - -``` - + named **Pens** that is in the **Ink Tools** contextual tab group. + +```xaml + +     + +     +     +         +     + + +``` + ]]> @@ -98,20 +98,20 @@ Gets or sets the content of the contextual tab group header. - The content of the contextual tab group header. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The content of the contextual tab group header. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -163,21 +163,21 @@ Gets or sets the format that is used to display the header content as a string. - The format that is used to display the header content as a string. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The format that is used to display the header content as a string. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property is only used when there is no header template. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property is only used when there is no header template. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -231,20 +231,20 @@ Gets or sets the that is used to display the contents of the header. - A template that specifies the visualization of the header. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A template that specifies the visualization of the header. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -298,21 +298,21 @@ Gets or sets the custom logic for selecting a that is used to display the contents of the header. - A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to specify the visualization of the header. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the visualization of the header. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -429,13 +429,13 @@ The event data. Provides class handling for the routed event. - event as handled by setting the property of the event data to `true`. - + event as handled by setting the property of the event data to `true`. + ]]> @@ -467,13 +467,13 @@ The event data. Provides class handling for the routed event and releases the mouse. - . - - This implementation marks the event as handled by setting the property of the event data to `true`. - + . + + This implementation marks the event as handled by setting the property of the event data to `true`. + ]]> @@ -502,19 +502,19 @@ Gets a reference to the that this control belongs to. A reference to the that this control belongs to. - class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonControlGroup.xml b/xml/System.Windows.Controls.Ribbon/RibbonControlGroup.xml index 9379c113e4d..4e872cb41ca 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonControlGroup.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonControlGroup.xml @@ -75,11 +75,11 @@ The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -106,21 +106,21 @@ Gets or sets the for this control. - The for this control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The for this control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - contains properties that specify size and visibility information for the image and label associated with a control. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -233,11 +233,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -298,11 +298,11 @@ The item to display from the collection. Prepares the specified element to display the specified item. - to display items. - + to display items. + ]]> @@ -331,19 +331,19 @@ Gets a reference to the that this control belongs to. A reference to the that this control belongs to. - class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonControlSizeDefinition.xml b/xml/System.Windows.Controls.Ribbon/RibbonControlSizeDefinition.xml index 3832991298d..9afcf85c8a3 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonControlSizeDefinition.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonControlSizeDefinition.xml @@ -21,11 +21,11 @@ Specifies information about the size and visibility of the images and label associated with a Ribbon control. - Ribbon Layout and Resizing @@ -103,21 +103,21 @@ Gets or sets a value that indicates how to show the image on a control. - One of the enumeration values that specify how to show the image on a control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + One of the enumeration values that specify how to show the image on a control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control can display a image, a image, or the image can be . If the control does not specify an image of the size that corresponds to the setting, no image is displayed. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control can display a image, a image, or the image can be . If the control does not specify an image of the size that corresponds to the setting, no image is displayed. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -223,21 +223,21 @@ Gets or sets a value that indicates whether the control's label is visible. - if the control's label is visible; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the control's label is visible; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property is `true`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property is `true`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -290,21 +290,21 @@ Gets or sets the maximum width constraint of a container control in a Ribbon. - The maximum width of the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The maximum width of the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -357,21 +357,21 @@ Gets or sets the minimum width constraint of a container control in a Ribbon. - The minimum width of the control. The registered default is 0. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The minimum width of the control. The registered default is 0. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -424,21 +424,21 @@ Gets or sets the width of a container control in a Ribbon. - The width of the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The width of the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing diff --git a/xml/System.Windows.Controls.Ribbon/RibbonGallery.xml b/xml/System.Windows.Controls.Ribbon/RibbonGallery.xml index ace0063a102..e8823af8a20 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonGallery.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonGallery.xml @@ -67,21 +67,21 @@ Represents a menu that displays a set of related items or commands in a visually rich format that can be organized into multiple categorized subsets. - hosting a simple . - - ![Ribbon combo box control with drop-down open](~/add/media/wpfribbon-combobox-selection.png "Ribbon combo box control with drop-down open") -Ribbon gallery in a combo box - - - -## Examples - The following example shows the markup to create a combo box that hosts a with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: - + hosting a simple . + + ![Ribbon combo box control with drop-down open](~/add/media/wpfribbon-combobox-selection.png "Ribbon combo box control with drop-down open") +Ribbon gallery in a combo box + + + +## Examples + The following example shows the markup to create a combo box that hosts a with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribboncombobox"::: + ]]> @@ -132,11 +132,11 @@ Ribbon gallery in a combo box Gets the filter that returns all items in a ribbon gallery. The filter that returns all items in a ribbon gallery. - or , you can use this property to distinguish between "All" filter items and custom filter items. - + or , you can use this property to distinguish between "All" filter items and custom filter items. + ]]> @@ -165,18 +165,18 @@ Ribbon gallery in a combo box Gets or sets the style that is applied to items in the filter when the "All" filter is selected. The style that is applied to items in the filter when the "All" filter is selected. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -228,20 +228,20 @@ Ribbon gallery in a combo box Gets or sets the that is used to display items in the filter when the "All" filter is selected. - A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -294,20 +294,20 @@ Ribbon gallery in a combo box Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -360,20 +360,20 @@ Ribbon gallery in a combo box Gets or sets a value that indicates whether a user can apply a filter to gallery items. - if a filter can be applied to gallery items; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if a filter can be applied to gallery items; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -425,21 +425,21 @@ Ribbon gallery in a combo box Gets or sets the style that is applied to the element generated for each item. - The style that is applied to the container element generated for each item. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The style that is applied to the container element generated for each item. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -497,21 +497,21 @@ Ribbon gallery in a combo box Gets or sets the that is used to display each item in a . - A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -570,11 +570,11 @@ Ribbon gallery in a combo box The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -602,21 +602,21 @@ Ribbon gallery in a combo box Gets or sets a value that indicates that the gallery distributes all its available width equally between its columns. - if the gallery distributes its available width equally between its columns; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the gallery distributes its available width equally between its columns; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property only has an effect when is set to `true`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property only has an effect when is set to `true`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -670,20 +670,20 @@ Ribbon gallery in a combo box Gets or sets the command that is associated with this ribbon gallery. - The command that is associated with this ribbon gallery. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The command that is associated with this ribbon gallery. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -710,20 +710,20 @@ Ribbon gallery in a combo box Gets or sets a user-defined data value to pass to the command. - A user-defined data value to pass to the command. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A user-defined data value to pass to the command. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -800,20 +800,20 @@ Ribbon gallery in a combo box Gets or sets the element on which to invoke the specified command. - The element on which to invoke the command. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The element on which to invoke the command. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -893,18 +893,18 @@ Ribbon gallery in a combo box Gets or sets the style that is applied to the filter items container generated from a header. The style applied to the filter items container element. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -956,21 +956,21 @@ Ribbon gallery in a combo box Gets or sets the custom logic for selecting a that is applied to items in the filter when a custom filter is selected. - A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to specify the appearance of the content. If you have more than one style defined and want to specify logic that selects a style to use, then you use this property. This property is ignored if the property is set. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the appearance of the content. If you have more than one style defined and want to specify logic that selects a style to use, then you use this property. This property is ignored if the property is set. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1022,20 +1022,20 @@ Ribbon gallery in a combo box Gets or sets the that is used to display items in the filter when a custom filter is selected. - A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1087,21 +1087,21 @@ Ribbon gallery in a combo box Gets or sets the custom logic for selecting a that is used to display items in the filter when a custom filter is selected. - A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A custom object that provides logic and returns a . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to specify the visualization of the content. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the visualization of the content. If you have more than one template defined and want to specify logic that selects a template to use, then you use this property. This property is ignored if the property is set. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1153,20 +1153,20 @@ Ribbon gallery in a combo box Gets or sets the style that is applied to the filter menu button. - The style that is applied to the filter menu button. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The style that is applied to the filter menu button. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1218,20 +1218,20 @@ Ribbon gallery in a combo box Gets or sets the contents of the filter pane. - The contents of the filter pane. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The contents of the filter pane. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1283,20 +1283,20 @@ Ribbon gallery in a combo box Gets or sets the that is used to display the contents of the filter pane. - A template that specifies the visualization of the filter pane contents. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A template that specifies the visualization of the filter pane contents. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1348,20 +1348,20 @@ Ribbon gallery in a combo box Gets or sets the style that is applied to items in the . - The style that is applied to items in the . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The style that is applied to items in the . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1413,20 +1413,20 @@ Ribbon gallery in a combo box Gets or sets the that is used to display each item in a . - A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A template that specifies the visualization of the items. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1507,18 +1507,18 @@ Ribbon gallery in a combo box Gets the item that is currently highlighted. The item that is currently highlighted. The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1629,20 +1629,20 @@ Ribbon gallery in a combo box Gets or sets a value that specifies whether this gallery defines the scope used for uniform layout of items. - if this gallery defines the scope used for uniform layout of items; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this gallery defines the scope used for uniform layout of items; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1695,20 +1695,20 @@ Ribbon gallery in a combo box Gets or sets a value that indicates whether the gallery should keep the synchronized with the current item in the collection. - if the is always synchronized with the current item in the source collection; if the is never synchronized with the current item; if the is synchronized with the current item only if the gallery is bound to a . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the is always synchronized with the current item in the source collection; if the is never synchronized with the current item; if the is synchronized with the current item only if the gallery is bound to a . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1760,20 +1760,20 @@ Ribbon gallery in a combo box Gets or sets a value that specifies the maximum number of columns used to layout items in a gallery . - The maximum number of columns used to layout items in a gallery . The registered default is Int32.MaxValue. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The maximum number of columns used to layout items in a gallery . The registered default is Int32.MaxValue. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1825,20 +1825,20 @@ Ribbon gallery in a combo box Gets or sets a value that specifies the minimum number of columns used to layout items in a gallery . - The minimum number of columns used to layout items in a gallery . The registered default is 1. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The minimum number of columns used to layout items in a gallery . The registered default is 1. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1892,11 +1892,11 @@ Ribbon gallery in a combo box Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -2014,11 +2014,11 @@ Ribbon gallery in a combo box The event data. Provides class handling for the event. - property) of the event data. - + property) of the event data. + ]]> @@ -2110,11 +2110,11 @@ Ribbon gallery in a combo box The event data. Provides class handling for the event. - property) of the event data. - + property) of the event data. + ]]> @@ -2146,11 +2146,11 @@ Ribbon gallery in a combo box The event data. Provides class handling for the event. - property) of the event data. - + property) of the event data. + ]]> @@ -2211,11 +2211,11 @@ Ribbon gallery in a combo box The event data. Raises the event. - property changes. - + property changes. + ]]> @@ -2249,11 +2249,11 @@ Ribbon gallery in a combo box The item to display from the collection. Prepares the specified element to display the specified item. - to display objects. - + to display objects. + ]]> @@ -2280,20 +2280,20 @@ Ribbon gallery in a combo box Gets or sets a user-defined data value to pass to the command when it is previewed. - A user-defined data value to pass to the command. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A user-defined data value to pass to the command. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2347,18 +2347,18 @@ Ribbon gallery in a combo box Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2410,20 +2410,20 @@ Ribbon gallery in a combo box Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2504,20 +2504,20 @@ Ribbon gallery in a combo box Gets or sets the currently selected item in the ribbon gallery. - The currently selected item, or if no item is selected. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The currently selected item, or if no item is selected. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -2571,20 +2571,20 @@ Ribbon gallery in a combo box Gets or sets the value of the property on the that is specified by the . - The value of the property on the that is specified by the , or if no item is selected. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The value of the property on the that is specified by the , or if no item is selected. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -2619,20 +2619,20 @@ Ribbon gallery in a combo box Gets or sets the path that is used to get the of the in a . - The path that is used to get the of the . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The path that is used to get the of the . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2761,20 +2761,20 @@ Ribbon gallery in a combo box Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -2841,11 +2841,11 @@ Ribbon gallery in a combo box if the listener handled the event. if it receives an event that it does not recognize or handle. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -2872,23 +2872,23 @@ Ribbon gallery in a combo box Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2941,23 +2941,23 @@ Ribbon gallery in a combo box Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -3010,23 +3010,23 @@ Ribbon gallery in a combo box Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -3079,23 +3079,23 @@ Ribbon gallery in a combo box Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -3148,23 +3148,23 @@ Ribbon gallery in a combo box Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -3217,23 +3217,23 @@ Ribbon gallery in a combo box Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonGalleryCategory.xml b/xml/System.Windows.Controls.Ribbon/RibbonGalleryCategory.xml index 67515921603..2a79532405b 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonGalleryCategory.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonGalleryCategory.xml @@ -93,11 +93,11 @@ The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -125,21 +125,21 @@ Gets or sets a value that indicates that the gallery category distributes all its available width equally between its columns. - if the gallery category distributes its available width equally between its columns; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the gallery category distributes its available width equally between its columns; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property only has an effect when is set to `true`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property only has an effect when is set to `true`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -220,20 +220,20 @@ Gets or sets the for the ribbon gallery header. - One of the enumeration values that specifies the visibility of the header. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + One of the enumeration values that specifies the visibility of the header. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -317,20 +317,20 @@ Gets or sets a value that specifies whether this gallery category defines the scope used for uniform layout of items. - if this gallery category defines the scope used for uniform layout of items; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this gallery category defines the scope used for uniform layout of items; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -382,20 +382,20 @@ Gets or sets a value that specifies the maximum number of columns used to lay out items in a gallery . - The maximum number of columns used to lay out items in a gallery . The registered default is Int32.MaxValue. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The maximum number of columns used to lay out items in a gallery . The registered default is Int32.MaxValue. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -447,20 +447,20 @@ Gets or sets a value that specifies the minimum number of columns used to lay out items in a gallery . - The minimum number of columns used to lay out items in a gallery . The registered default is 1. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The minimum number of columns used to lay out items in a gallery . The registered default is 1. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -514,11 +514,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -577,11 +577,11 @@ The event data. Raises the event. - event and adds an event listener to listen for currency changes on the for the category. - + event and adds an event listener to listen for currency changes on the for the category. + ]]> @@ -714,11 +714,11 @@ if the listener handled the event. if it receives an event that it does not recognize or handle. - instance is cast to an interface. - + instance is cast to an interface. + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonGalleryItem.xml b/xml/System.Windows.Controls.Ribbon/RibbonGalleryItem.xml index d647691a651..a44e20ac707 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonGalleryItem.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonGalleryItem.xml @@ -70,18 +70,18 @@ Gets or sets the brush that is used to draw the background of the control when it is in the Checked state. The brush that is used to draw the background of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -135,18 +135,18 @@ Gets or sets the brush that is used to draw the outer border of the control when it is in the Checked state. The brush that is used to draw the outer border of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -201,18 +201,18 @@ if this item is highlighted; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -267,18 +267,18 @@ if the left mouse button or the SPACEBAR is pressed over the item; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -331,20 +331,20 @@ Gets or sets a value that indicates whether this item is selected. - if this item is selected; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this item is selected; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -396,23 +396,23 @@ Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -466,18 +466,18 @@ Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. The brush that is used to draw the background of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -531,18 +531,18 @@ Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. The brush that is used to draw the outer border of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -655,13 +655,13 @@ The event data. Provides class handling for the routed event. - property to `true` when this control gets keyboard focus. - - This implementation marks the event as handled by setting the property of the event data to `true`. - + property to `true` when this control gets keyboard focus. + + This implementation marks the event as handled by setting the property of the event data to `true`. + ]]> @@ -780,13 +780,13 @@ The event data. Provides class handling for the routed event. - and properties to `false` when this control loses keyboard focus. - - This implementation marks the event as handled by setting the property of the event data to `true`. - + and properties to `false` when this control loses keyboard focus. + + This implementation marks the event as handled by setting the property of the event data to `true`. + ]]> @@ -818,13 +818,13 @@ The event data. Provides class handling for the routed event. - and properties to `false` when the mouse pointer leaves this control. - - This implementation marks the event as handled by setting the property of the event data to `true`. - + and properties to `false` when the mouse pointer leaves this control. + + This implementation marks the event as handled by setting the property of the event data to `true`. + ]]> @@ -856,13 +856,13 @@ The event data. Provides class handling for the routed event. - property to `true`. If the mouse button is pressed, it also sets the property to `true`. - - This implementation marks the event as handled by setting the property of the event data to `true`. - + property to `true`. If the mouse button is pressed, it also sets the property to `true`. + + This implementation marks the event as handled by setting the property of the event data to `true`. + ]]> @@ -894,13 +894,13 @@ The event data. Provides class handling for the event. - property to `false` when the left mouse button is released over this control. - - This implementation marks the event as handled by setting the property of the event data to `true`. - + property to `false` when the left mouse button is released over this control. + + This implementation marks the event as handled by setting the property of the event data to `true`. + ]]> @@ -932,13 +932,13 @@ The event data. Provides class handling for the event. - event as handled by setting the property of the event data to `true`. - + event as handled by setting the property of the event data to `true`. + ]]> @@ -967,11 +967,11 @@ The event data. Raises the routed event. - property changes to `true`. - + property changes to `true`. + ]]> @@ -1000,11 +1000,11 @@ The event data. Raises the routed event. - property changes to `false`. - + property changes to `false`. + ]]> @@ -1033,18 +1033,18 @@ Gets or sets the brush that is used to draw the background of the control when it is pressed. The brush that is used to draw the background of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1098,18 +1098,18 @@ Gets or sets the brush that is used to draw the outer border of the control when it is pressed. The brush that is used to draw the outer border of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1161,21 +1161,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1277,23 +1277,23 @@ Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1346,23 +1346,23 @@ Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1415,23 +1415,23 @@ Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1484,23 +1484,23 @@ Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1553,23 +1553,23 @@ Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1622,23 +1622,23 @@ Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonGroup.xml b/xml/System.Windows.Controls.Ribbon/RibbonGroup.xml index ddbaece5134..28b7797ece0 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonGroup.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonGroup.xml @@ -52,11 +52,11 @@ Represents a logical group of controls as they appear on a . - @@ -106,20 +106,20 @@ Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -178,11 +178,11 @@ The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -238,39 +238,39 @@ Gets or sets the collection for a ribbon group. A collection of objects that describe how to size controls in the group for different sizes of the . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows a collection that specifies three different group sizes. - -```xaml - -   -     -     -     -   -   -     -     -     -   -   - -``` - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows a collection that specifies three different group sizes. + +```xaml + +   +     +     +     +   +   +     +     +     +   +   + +``` + ]]> @@ -323,25 +323,25 @@ Gets a value that indicates whether the ribbon group is collapsed. - if the group is collapsed; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the group is collapsed; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -395,21 +395,21 @@ Gets or sets a value that indicates whether the drop-down for the group is open. - if the drop-down is open; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the drop-down is open; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -464,18 +464,18 @@ if the control is hosted in the Quick Access Toolbar; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -558,23 +558,23 @@ Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -626,20 +626,20 @@ Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -724,18 +724,18 @@ Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. The brush that is used to draw the background of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -789,18 +789,18 @@ Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. The brush that is used to draw the outer border of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -883,11 +883,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1033,11 +1033,11 @@ The event data. Provides class handling for the event. - property) of the event data. - + property) of the event data. + ]]> @@ -1069,11 +1069,11 @@ The event data. Provides class handling for the event. - property) of the event data. - + property) of the event data. + ]]> @@ -1186,18 +1186,18 @@ Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1249,21 +1249,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1315,20 +1315,20 @@ Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -1381,23 +1381,23 @@ Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1450,23 +1450,23 @@ Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1519,23 +1519,23 @@ Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1588,23 +1588,23 @@ Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1657,23 +1657,23 @@ Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1726,23 +1726,23 @@ Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinition.xml b/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinition.xml index 47fa05609f7..f7e5c8239c9 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinition.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinition.xml @@ -27,27 +27,27 @@ Specifies information about the size of controls in a and the visual state of the group. - collection that specifies three different group sizes. - -``` - -   -     -     -     -   -   -     -     -     -   -   - -``` - + collection that specifies three different group sizes. + +``` + +   +     +     +     +   +   +     +     +     +   +   + +``` + ]]> @@ -96,20 +96,20 @@ Gets or sets a collection of items that specify the size of controls in the group. - A collection of items that specify the size of controls in the group. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A collection of items that specify the size of controls in the group. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinitionBase.xml b/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinitionBase.xml index 9f9fd932ec8..fe873a4ff76 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinitionBase.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonGroupSizeDefinitionBase.xml @@ -68,20 +68,20 @@ Gets or sets a value that indicates whether the control group is collapsed. - if the group is collapsed; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the group is collapsed; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonGroupTemplateSizeDefinition.xml b/xml/System.Windows.Controls.Ribbon/RibbonGroupTemplateSizeDefinition.xml index 67d484e45b4..0b2c011b376 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonGroupTemplateSizeDefinition.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonGroupTemplateSizeDefinition.xml @@ -73,20 +73,20 @@ Gets or sets the that is used to display a . - A template that specifies the visualization of the ribbon group. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A template that specifies the visualization of the ribbon group. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonMenuButton.xml b/xml/System.Windows.Controls.Ribbon/RibbonMenuButton.xml index aac4569fa46..1f5aba7518d 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonMenuButton.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonMenuButton.xml @@ -44,29 +44,29 @@ Represents a button on the ribbon that displays a drop-down menu when clicked. - controls in large, medium, and small variations, and with no images. - - ![Ribbon menu button controls](~/add/media/wpfribbon-menubutton.png "Ribbon menu button controls") -Ribbon menu button controls - - The following illustrations show controls when the drop-down is opened. - - ![Ribbon menu button control with drop-down open](~/add/media/wpfribbon-menubutton-selection.png "Ribbon menu button control with drop-down open") -Ribbon menu button control with drop-down open - - ![Ribbon menu button control with drop-down open](~/add/media/wpfribbon-menubutton-selection2.png "Ribbon menu button control with drop-down open") -Ribbon menu button control with drop-down open - - - -## Examples - The following example shows the markup to create a menu button with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubutton"::: - + controls in large, medium, and small variations, and with no images. + + ![Ribbon menu button controls](~/add/media/wpfribbon-menubutton.png "Ribbon menu button controls") +Ribbon menu button controls + + The following illustrations show controls when the drop-down is opened. + + ![Ribbon menu button control with drop-down open](~/add/media/wpfribbon-menubutton-selection.png "Ribbon menu button control with drop-down open") +Ribbon menu button control with drop-down open + + ![Ribbon menu button control with drop-down open](~/add/media/wpfribbon-menubutton-selection2.png "Ribbon menu button control with drop-down open") +Ribbon menu button control with drop-down open + + + +## Examples + The following example shows the markup to create a menu button with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubutton"::: + ]]> @@ -116,20 +116,20 @@ Ribbon menu button control with drop-down open Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -182,20 +182,20 @@ Ribbon menu button control with drop-down open Gets or sets a value that indicates whether the user can resize the drop-down horizontally. - if the drop-down can be resized by the user; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the drop-down can be resized by the user; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -248,20 +248,20 @@ Ribbon menu button control with drop-down open Gets or sets a value that indicates whether the user can resize the drop-down vertically. - if the drop-down can be resized by the user; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the drop-down can be resized by the user; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -320,11 +320,11 @@ Ribbon menu button control with drop-down open The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -353,19 +353,19 @@ Ribbon menu button control with drop-down open Gets or sets the for this control. The for this control. - contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -444,20 +444,20 @@ Ribbon menu button control with drop-down open Gets or sets the height of the drop-down. - The height of the drop-down. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The height of the drop-down. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -535,20 +535,20 @@ Ribbon menu button control with drop-down open Gets or sets the brush that is used to draw the background of the control when it has focus. - The brush that is used to draw the background of the control when it has focus. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of the control when it has focus. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -600,20 +600,20 @@ Ribbon menu button control with drop-down open Gets or sets the brush that is used to draw the outer border of the control when it has focus. - The brush that is used to draw the outer border of the control when it has focus. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of the control when it has focus. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -697,11 +697,11 @@ Ribbon menu button control with drop-down open The event data. Invoked when a mouse button is pressed or released. - @@ -751,20 +751,20 @@ Ribbon menu button control with drop-down open Gets a value that indicates whether at least one menu item is a . - if at least one menu item is a ; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if at least one menu item is a ; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -817,20 +817,20 @@ Ribbon menu button control with drop-down open Gets or sets a value that indicates whether the drop-down is open. - if the drop-down is open; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the drop-down is open; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -883,21 +883,21 @@ Ribbon menu button control with drop-down open Gets a value that indicates whether the menu drop-down is shown above the menu button. - if the menu drop-down is shown above the menu button; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the menu drop-down is shown above the menu button; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -952,18 +952,18 @@ Ribbon menu button control with drop-down open if the control is hosted in a ; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1018,18 +1018,18 @@ Ribbon menu button control with drop-down open if the control is hosted in the Quick Access Toolbar; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1112,23 +1112,23 @@ Ribbon menu button control with drop-down open Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1180,21 +1180,21 @@ Ribbon menu button control with drop-down open Gets or sets the text that is displayed next to or below the control. - The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to control the visibility of the label. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to control the visibility of the label. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1246,28 +1246,28 @@ Ribbon menu button control with drop-down open Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup to create a menu button with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubutton"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup to create a menu button with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubutton"::: + ]]> Ribbon Layout and Resizing @@ -1320,20 +1320,20 @@ Ribbon menu button control with drop-down open Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. - The brush that is used to draw the background of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1385,20 +1385,20 @@ Ribbon menu button control with drop-down open Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. - The brush that is used to draw the outer border of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1481,11 +1481,11 @@ Ribbon menu button control with drop-down open Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1544,11 +1544,11 @@ Ribbon menu button control with drop-down open The event data. Provides class handling for the attached event. - attached event as handled so that the parent drop-down is not closed. - + attached event as handled so that the parent drop-down is not closed. + ]]> @@ -1609,11 +1609,11 @@ Ribbon menu button control with drop-down open The event data. Provides class handling for the event. - property) of the event data. - + property) of the event data. + ]]> @@ -1847,20 +1847,20 @@ Ribbon menu button control with drop-down open Gets or sets the brush that is used to draw the background of the control when it is pressed. - The brush that is used to draw the background of the control when it is pressed. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of the control when it is pressed. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1912,20 +1912,20 @@ Ribbon menu button control with drop-down open Gets or sets the brush that is used to draw the outer border of the control when it is pressed. - The brush that is used to draw the outer border of the control when it is pressed. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of the control when it is pressed. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1979,19 +1979,19 @@ Ribbon menu button control with drop-down open Gets or sets the for this control when it is hosted in the Quick Access Toolbar. The for this control when it is hosted in the Quick Access Toolbar. - contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2046,18 +2046,18 @@ Ribbon menu button control with drop-down open Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2109,21 +2109,21 @@ Ribbon menu button control with drop-down open Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2208,28 +2208,28 @@ Ribbon menu button control with drop-down open Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup to create a menu button with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubutton"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup to create a menu button with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubutton"::: + ]]> Ribbon Layout and Resizing @@ -2282,33 +2282,33 @@ Ribbon menu button control with drop-down open Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: + ]]> @@ -2361,33 +2361,33 @@ Enhanced ToolTip Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: + ]]> @@ -2440,33 +2440,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: + ]]> @@ -2519,33 +2519,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: + ]]> @@ -2598,33 +2598,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: + ]]> @@ -2677,33 +2677,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonmenubuttontt"::: + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonMenuItem.xml b/xml/System.Windows.Controls.Ribbon/RibbonMenuItem.xml index 80203602b34..ef4e01672ee 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonMenuItem.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonMenuItem.xml @@ -91,20 +91,20 @@ Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -157,20 +157,20 @@ Gets or sets a value that indicates whether the user can resize the drop-down horizontally. - if the drop-down can be resized horizontally by the user; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the drop-down can be resized horizontally by the user; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -223,20 +223,20 @@ Gets or sets a value that indicates whether the user can resize the drop-down vertically. - if the drop-down can be resized vertically by the user; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the drop-down can be resized vertically by the user; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -290,18 +290,18 @@ Gets or sets the brush that is used to draw the background of the control when it is in the Checked state. The brush that is used to draw the background of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -355,18 +355,18 @@ Gets or sets the brush that is used to draw the outer border of the control when it is in the Checked state. The brush that is used to draw the outer border of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -425,11 +425,11 @@ The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -456,20 +456,20 @@ Gets or sets the height of the drop-down. - The height of the drop-down. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The height of the drop-down. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -549,20 +549,20 @@ Gets a value that indicates whether at least one menu item is a . - if at least one menu item is a ; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if at least one menu item is a ; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -614,20 +614,20 @@ Gets or sets the image that is displayed on the control. - The image that is displayed on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image that is displayed on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -681,20 +681,20 @@ Gets a value that indicates whether the menu drop-down is positioned to the left of the menu button. - if menu drop-down is positioned to the left of the menu button; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if menu drop-down is positioned to the left of the menu button; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -777,23 +777,23 @@ Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -847,18 +847,18 @@ Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. The brush that is used to draw the background of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -912,18 +912,18 @@ Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. The brush that is used to draw the outer border of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1006,11 +1006,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1095,11 +1095,11 @@ The event data. Provides class handling for the routed event. - property) of the event data. - + property) of the event data. + ]]> @@ -1131,11 +1131,11 @@ The event data. Provides class handling for the routed event. - property) of the event data. - + property) of the event data. + ]]> @@ -1225,11 +1225,11 @@ The event data. Provides class handling for the routed event. - property) of the event data. - + property) of the event data. + ]]> @@ -1405,18 +1405,18 @@ Gets or sets the brush that is used to draw the background of the control when it is pressed. The brush that is used to draw the background of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1470,18 +1470,18 @@ Gets or sets the brush that is used to draw the outer border of the control when it is pressed. The brush that is used to draw the outer border of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1535,18 +1535,18 @@ Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1598,21 +1598,21 @@ Gets or sets the image that is displayed on the control when it is hosted in the Quick Access Toolbar. - The image that is displayed on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image that is displayed on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property is used when the menu item is hosted in the Quick Access Toolbar. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property is used when the menu item is hosted in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -1665,21 +1665,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1764,23 +1764,23 @@ Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1833,23 +1833,23 @@ Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1902,23 +1902,23 @@ Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1971,23 +1971,23 @@ Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2040,23 +2040,23 @@ Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2109,23 +2109,23 @@ Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonQuickAccessToolBar.xml b/xml/System.Windows.Controls.Ribbon/RibbonQuickAccessToolBar.xml index 17e896eacab..fc82ce0f4ba 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonQuickAccessToolBar.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonQuickAccessToolBar.xml @@ -40,42 +40,42 @@ Represents a ribbon toolbar that is always visible in the window frame to provide access to common commands. - to a control by specifying it as the content of the property using XAML [Property Element Syntax](/dotnet/framework/wpf/advanced/xaml-syntax-in-detail). - -``` - - - - -... - - -``` - - The following list shows the typical placement of the in the hierarchy of ribbon elements. - -- - - - property - - - - - - , , , , - - - , , - - - - - - -## Examples - The following example shows a simple ribbon that is created by the Visual Studio 2010 template, with help pane and Quick Access Toolbar elements added. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/mainwindow.xaml" id="Snippetribbondefault"::: - + to a control by specifying it as the content of the property using XAML [Property Element Syntax](/dotnet/framework/wpf/advanced/xaml-syntax-in-detail). + +``` + + + + +... + + +``` + + The following list shows the typical placement of the in the hierarchy of ribbon elements. + +- + + - property + + - + + - , , , , + + - , , + + - + + + +## Examples + The following example shows a simple ribbon that is created by the Visual Studio 2010 template, with help pane and Quick Access Toolbar elements added. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/mainwindow.xaml" id="Snippetribbondefault"::: + ]]> @@ -162,11 +162,11 @@ The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -241,18 +241,18 @@ Gets or sets a that is used to show the Quick Access Toolbar customization menu. A button that is used to show the Quick Access Toolbar customization menu. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -364,20 +364,20 @@ Gets a value that indicates whether the Quick Access Toolbar has items hidden in the overflow menu. - if the Quick Access Toolbar has items hidden in the overflow menu; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the Quick Access Toolbar has items hidden in the overflow menu; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -458,17 +458,17 @@ Gets a value that indicates whether an item in the Quick Access Toolbar is shown in the overflow menu. -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +## Remarks + This property can be attached to items in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -528,20 +528,20 @@ Gets or sets a value that indicates whether the Quick Access Toolbar overflow menu is open. - if the Quick Access Toolbar overflow menu is open; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the Quick Access Toolbar overflow menu is open; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -624,11 +624,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -831,21 +831,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonRadioButton.xml b/xml/System.Windows.Controls.Ribbon/RibbonRadioButton.xml index 98d7084e584..4191f478593 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonRadioButton.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonRadioButton.xml @@ -28,26 +28,26 @@ Represents a radio button that is used in a control. - controls in large, medium, and small variations, and with no images. - - ![Ribbon radio button controls](~/add/media/wpfribbon-radiobutton.png "Ribbon radio button controls") -Ribbon radio button controls - - The following illustration shows examples of controls that are selected. - - ![Ribbon radio button controls that are selected](~/add/media/wpfribbon-radiobutton-selection.png "Ribbon radio button controls that are selected") -Ribbon radio button controls that are selected - - - -## Examples - The following example shows the markup to create a control with a large image, a small image, and a label. Setting the property adds text that is aligned with the image. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: - + controls in large, medium, and small variations, and with no images. + + ![Ribbon radio button controls](~/add/media/wpfribbon-radiobutton.png "Ribbon radio button controls") +Ribbon radio button controls + + The following illustration shows examples of controls that are selected. + + ![Ribbon radio button controls that are selected](~/add/media/wpfribbon-radiobutton-selection.png "Ribbon radio button controls that are selected") +Ribbon radio button controls that are selected + + + +## Examples + The following example shows the markup to create a control with a large image, a small image, and a label. Setting the property adds text that is aligned with the image. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: + ]]> @@ -97,20 +97,20 @@ Ribbon radio button controls that are selected Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -164,18 +164,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the background of the control when it is in the Checked state. The brush that is used to draw the background of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -229,18 +229,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it is in the Checked state. The brush that is used to draw the outer border of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -294,19 +294,19 @@ Ribbon radio button controls that are selected Gets or sets the for this control. The for this control. - contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -361,18 +361,18 @@ Ribbon radio button controls that are selected Gets or sets a value that indicates the amount that the corners of a ribbon button are rounded. A value that indicates the amount that the corners of a ribbon button are rounded. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -426,18 +426,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the background of the control when it has focus. The brush that is used to draw the background of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -491,18 +491,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it has focus. The brush that is used to draw the outer border of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -557,18 +557,18 @@ Ribbon radio button controls that are selected if the control is hosted in a ; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -623,18 +623,18 @@ Ribbon radio button controls that are selected if the control is hosted in the Quick Access Toolbar; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -686,23 +686,23 @@ Ribbon radio button controls that are selected Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -754,28 +754,28 @@ Ribbon radio button controls that are selected Gets or sets the text that is displayed next to or below the control. - The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the label. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: - + property on the to control the visibility of the label. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: + ]]> @@ -827,28 +827,28 @@ Ribbon radio button controls that are selected Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property for a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property for a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: + ]]> Ribbon Layout and Resizing @@ -903,18 +903,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. The brush that is used to draw the background of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -968,18 +968,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. The brush that is used to draw the outer border of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1062,11 +1062,11 @@ Ribbon radio button controls that are selected Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1095,11 +1095,11 @@ Ribbon radio button controls that are selected Handles the event and raises the attached event. - attached event. - + attached event. + ]]> @@ -1158,13 +1158,13 @@ Ribbon radio button controls that are selected The event data. Provides class handling for the event and enables the keyboard focus visual when this control gets keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1225,13 +1225,13 @@ Ribbon radio button controls that are selected The event data. Provides class handling for the event and disables the keyboard focus visual when this control loses keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1263,13 +1263,13 @@ Ribbon radio button controls that are selected The event data. Provides class handling for the routed event to prevent the control from receiving keyboard focus. - should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. - - This implementation does not change the handled state (the property) of the event data. - + should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. + + This implementation does not change the handled state (the property) of the event data. + ]]> @@ -1298,18 +1298,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the background of the control when it is pressed. The brush that is used to draw the background of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1363,18 +1363,18 @@ Ribbon radio button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it is pressed. The brush that is used to draw the outer border of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1428,19 +1428,19 @@ Ribbon radio button controls that are selected Gets or sets the for this control when it is hosted in the Quick Access Toolbar. The for this control when it is hosted in the Quick Access Toolbar. - contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1495,18 +1495,18 @@ Ribbon radio button controls that are selected Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1558,21 +1558,21 @@ Ribbon radio button controls that are selected Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1627,18 +1627,18 @@ Ribbon radio button controls that are selected to show the keyboard focus visual; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1690,28 +1690,28 @@ Ribbon radio button controls that are selected Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobutton"::: + ]]> Ribbon Layout and Resizing @@ -1764,33 +1764,33 @@ Ribbon radio button controls that are selected Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: + ]]> @@ -1843,33 +1843,33 @@ Enhanced ToolTip Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: + ]]> @@ -1922,33 +1922,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: + ]]> @@ -2001,33 +2001,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: + ]]> @@ -2080,33 +2080,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: + ]]> @@ -2159,33 +2159,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonradiobuttontt"::: + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonSeparator.xml b/xml/System.Windows.Controls.Ribbon/RibbonSeparator.xml index 60d602994f9..febc3831868 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonSeparator.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonSeparator.xml @@ -68,21 +68,21 @@ Gets or sets the text that is displayed with the visual separator line. - The text that is displayed with the visual separator line. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text that is displayed with the visual separator line. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to display text along with the visual separator line that is displayed by the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to display text along with the visual separator line that is displayed by the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -214,21 +214,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonSplitButton.xml b/xml/System.Windows.Controls.Ribbon/RibbonSplitButton.xml index 0aa389aef7e..819cb8e3be2 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonSplitButton.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonSplitButton.xml @@ -36,29 +36,29 @@ Represents a composite control that has a primary button that responds to a event and a secondary button that displays a drop-down list of mutually exclusive values. - controls in large, medium, and small variations, and with no images. - - ![Ribbon split button controls](~/add/media/wpfribbon-splitbutton.png "Ribbon split button controls") -Ribbon split button controls - - The following illustrations show controls when the drop-down is opened. - - ![Ribbon split button control with drop-down open](~/add/media/wpfribbon-splitbutton-selection.png "Ribbon split button control with drop-down open") -Ribbon split button control with drop-down open - - ![Ribbon split button control with drop-down open](~/add/media/wpfribbon-splitbutton-selection2.png "Ribbon split button control with drop-down open") -Ribbon split button control with drop-down open - - - -## Examples - The following example shows the markup to create a split button with three available items. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonsplitbutton"::: - + controls in large, medium, and small variations, and with no images. + + ![Ribbon split button controls](~/add/media/wpfribbon-splitbutton.png "Ribbon split button controls") +Ribbon split button controls + + The following illustrations show controls when the drop-down is opened. + + ![Ribbon split button control with drop-down open](~/add/media/wpfribbon-splitbutton-selection.png "Ribbon split button control with drop-down open") +Ribbon split button control with drop-down open + + ![Ribbon split button control with drop-down open](~/add/media/wpfribbon-splitbutton-selection2.png "Ribbon split button control with drop-down open") +Ribbon split button control with drop-down open + + + +## Examples + The following example shows the markup to create a split button with three available items. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbonsplitbutton"::: + ]]> @@ -109,18 +109,18 @@ Ribbon split button control with drop-down open Gets or sets the brush that is used to draw the background of the control when it is in the Checked state. The brush that is used to draw the background of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -174,18 +174,18 @@ Ribbon split button control with drop-down open Gets or sets the brush that is used to draw the outer border of the control when it is in the Checked state. The brush that is used to draw the outer border of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -289,18 +289,18 @@ Ribbon split button control with drop-down open Gets or sets the command that is associated with this control. The command that is associated with this control. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -327,20 +327,20 @@ Ribbon split button control with drop-down open Gets or sets a user-defined data value to pass to the command. - A user-defined data value to pass to the command. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A user-defined data value to pass to the command. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -417,20 +417,20 @@ Ribbon split button control with drop-down open Gets or sets the element on which to raise the specified command. - The element on which to invoke the command. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The element on which to invoke the command. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -482,20 +482,20 @@ Ribbon split button control with drop-down open Gets or sets the descriptive text that is displayed in the ToolTip for the drop-down area of this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -547,20 +547,20 @@ Ribbon split button control with drop-down open Gets or sets the descriptive text that is displayed in the footer of the ToolTip for the drop-down area of this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -612,20 +612,20 @@ Ribbon split button control with drop-down open Gets or sets the image that is displayed in the footer of the ToolTip for the drop-down area of this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -677,20 +677,20 @@ Ribbon split button control with drop-down open Gets or sets the title text that is displayed in the footer of the ToolTip for the drop-down area of this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -742,20 +742,20 @@ Ribbon split button control with drop-down open Gets or sets the image that is displayed in the ToolTip for the drop-down area of this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -807,20 +807,20 @@ Ribbon split button control with drop-down open Gets or sets the title text that is displayed in the ToolTip for the drop-down area of this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -872,23 +872,23 @@ Ribbon split button control with drop-down open Gets or sets the keyboard shortcut for the header area of this control. - The keyboard shortcut for the header area of this control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the header area of this control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -942,18 +942,18 @@ Ribbon split button control with drop-down open Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1006,21 +1006,21 @@ Ribbon split button control with drop-down open Gets or sets a value that indicates whether a user can check and uncheck the button. - if the user can check and uncheck the button; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the user can check and uncheck the button; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1073,20 +1073,20 @@ Ribbon split button control with drop-down open Gets or sets a value that indicates whether the button is checked. - if the button is checked; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the button is checked; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1140,18 +1140,18 @@ Ribbon split button control with drop-down open Gets or sets a value that indicates the relative position of the label for this control. A value that indicates the relative position of the label. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1234,11 +1234,11 @@ Ribbon split button control with drop-down open Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonSplitMenuItem.xml b/xml/System.Windows.Controls.Ribbon/RibbonSplitMenuItem.xml index f4393849184..4aa07128fc7 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonSplitMenuItem.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonSplitMenuItem.xml @@ -82,20 +82,20 @@ Gets or sets the descriptive text that is displayed in the ToolTip for the drop-down area of this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -147,20 +147,20 @@ Gets or sets the descriptive text that is displayed in the footer of the ToolTip for the drop-down area of this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -212,20 +212,20 @@ Gets or sets the image that is displayed in the footer of the ToolTip for the drop-down area of this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -277,20 +277,20 @@ Gets or sets the title text that is displayed in the footer of the ToolTip for the drop-down area of this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -342,20 +342,20 @@ Gets or sets the image that is displayed in the ToolTip for the drop-down area of this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -407,20 +407,20 @@ Gets or sets the title text that is displayed in the ToolTip for the drop-down area of this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -472,23 +472,23 @@ Gets or sets the keyboard shortcut for the header area of this control. - The keyboard shortcut for the header area of this control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the header area of this control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -542,18 +542,18 @@ Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -663,11 +663,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonTab.xml b/xml/System.Windows.Controls.Ribbon/RibbonTab.xml index a574e6f658f..10d0e5cd07c 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonTab.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonTab.xml @@ -28,32 +28,32 @@ Represents a tab in a . - to organize related groups of commands in a . The hosts one or more instances. A then hosts controls that represent application commands. - - The following list shows the typical hierarchy of elements in a . - -- - - - - - - - - - , , , , - - - , , - - - - - - -## Examples - The following example shows the markup for a simple ribbon tab. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/mainwindow.xaml" id="Snippetribbontabdefault"::: - + to organize related groups of commands in a . The hosts one or more instances. A then hosts controls that represent application commands. + + The following list shows the typical hierarchy of elements in a . + +- + + - + + - + + - , , , , + + - , , + + - + + + +## Examples + The following example shows the markup for a simple ribbon tab. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/Ribbon/Overview/mainwindow.xaml" id="Snippetribbontabdefault"::: + ]]> @@ -109,11 +109,11 @@ The item to display from the collection. Unloads the container for the specified item. - method. - + method. + ]]> @@ -140,38 +140,38 @@ Gets a reference to the that this tab is in. - The contextual tab group that this tab is in; or if this tab is not in a contextual tab group. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The contextual tab group that this tab is in; or if this tab is not in a contextual tab group. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows a named **Pens** that is in the **Ink Tools** contextual tab group. - -```xaml - -     - -     -     -         -     - - -``` - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows a named **Pens** that is in the **Ink Tools** contextual tab group. + +```xaml + +     + +     +     +         +     + + +``` + ]]> @@ -198,20 +198,20 @@ Gets or sets the header content of the that this tab is in. - The header of the contextual tab group that this tab is in; or if this tab is not in a contextual tab group. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The header of the contextual tab group that this tab is in; or if this tab is not in a contextual tab group. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -321,47 +321,47 @@ Gets or sets a collection of names that specify the order in which group size definitions are applied as the ribbon is reduced in size. - A collection of names that specify the order in which group size definitions are applied as the is reduced in size. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A collection of names that specify the order in which group size definitions are applied as the is reduced in size. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to specify the . - -```xaml - -     -        ...   -     -     -        ... -     -     -        ... -     -     -        ... -     -     -        ... -     - - -``` - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to specify the . + +```xaml + +     +        ...   +     +     +        ... +     +     +        ... +     +     +        ... +     +     +        ... +     + + +``` + ]]> Ribbon Layout and Resizing @@ -412,11 +412,11 @@ in all cases. - in the that keyboard input has been handled the . - + in the that keyboard input has been handled the . + ]]> @@ -443,20 +443,20 @@ Gets or sets the style that is applied to the header of the ribbon tab. - The style that is applied to the header of the ribbon tab. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The style that is applied to the header of the ribbon tab. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -540,20 +540,20 @@ Gets or sets a value that indicates whether the ribbon tab is selected. - if this tab is selected; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this tab is selected; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|, , | - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|, , | + ]]> @@ -607,23 +607,23 @@ Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -823,11 +823,11 @@ The event data. Raises the attached event. - property changes to `true`. - + property changes to `true`. + ]]> @@ -859,11 +859,11 @@ The event data. Raises the attached event. - property changes to `false`. - + property changes to `false`. + ]]> @@ -921,21 +921,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -987,20 +987,20 @@ Gets a value that indicates the position of the left edge of the corresponding in the coordinate space of this . - A value that indicates the position of the left edge of the corresponding in the coordinate space of this . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A value that indicates the position of the left edge of the corresponding in the coordinate space of this . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1052,20 +1052,20 @@ Gets a value that indicates the position of the right edge of the corresponding in the coordinate space of this . - A value that indicates the position of the right edge of the corresponding in the coordinate space of this . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A value that indicates the position of the right edge of the corresponding in the coordinate space of this . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonTabHeader.xml b/xml/System.Windows.Controls.Ribbon/RibbonTabHeader.xml index fb5a1c00bb6..4ed4aeba1f5 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonTabHeader.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonTabHeader.xml @@ -76,18 +76,18 @@ Gets or sets the brush that is used to draw the background of the control when it is in the Checked state. The brush that is used to draw the background of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -141,18 +141,18 @@ Gets or sets the brush that is used to draw the outer border of the control when it is in the Checked state. The brush that is used to draw the outer border of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -204,20 +204,20 @@ Gets a reference to the that this control belongs to. - The contextual tab group that the tab for this header is in; or if the tab is not in a contextual tab group. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The contextual tab group that the tab for this header is in; or if the tab is not in a contextual tab group. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -271,18 +271,18 @@ Gets or sets the brush that is used to draw the background of the control when it has focus. The brush that is used to draw the background of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -336,18 +336,18 @@ Gets or sets the brush that is used to draw the outer border of the control when it has focus. The brush that is used to draw the outer border of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -400,7 +400,7 @@ Gets a value that indicates whether this header is for a tab in a . - if this header is for a tab in a ; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this header is for a tab in a ; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. To be added. @@ -452,7 +452,7 @@ Gets a value that indicates whether the tab that this header belongs to is selected. - if the tab that this header belongs to is selected; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the tab that this header belongs to is selected; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. To be added. @@ -505,18 +505,18 @@ Gets or sets the brush that is used to draw the background of the control when the mouse is over it. The brush that is used to draw the background of the control when the mouse is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -570,18 +570,18 @@ Gets or sets the brush that is used to draw the outer border of the control when the mouse is over it. The brush that is used to draw the outer border of the control when the mouse is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -664,11 +664,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -727,13 +727,13 @@ The event data. Provides class handling for the routed event. - property to `true` for the that this header belongs to when this header gets keyboard focus. - - This implementation does not change the handled state (the property) of the event data. - + property to `true` for the that this header belongs to when this header gets keyboard focus. + + This implementation does not change the handled state (the property) of the event data. + ]]> @@ -765,11 +765,11 @@ The event data. Provides class handling for the routed event. - event as handled by setting the property of the event data to `true`. - + event as handled by setting the property of the event data to `true`. + ]]> @@ -830,11 +830,11 @@ The event data. Notifies the of a mouse left button down event on this tab header. - event as handled by setting the property of the event data to `true`. - + event as handled by setting the property of the event data to `true`. + ]]> @@ -866,11 +866,11 @@ The drawing instructions for a specific element. This context is provided to the layout system. Participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing. - method, and then ensures that the is completely rendered before the and properties are calculated. - + method, and then ensures that the is completely rendered before the and properties are calculated. + ]]> @@ -897,21 +897,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonTextBox.xml b/xml/System.Windows.Controls.Ribbon/RibbonTextBox.xml index 1013d8957de..9dc61c68b2b 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonTextBox.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonTextBox.xml @@ -32,21 +32,21 @@ Represents a text box that is used in a control. - controls in large, medium, and small variations, and with no images. - - ![Ribbon text box controls](~/add/media/wpfribbon-textbox.png "Ribbon text box controls") -Ribbon text box controls - - - -## Examples - The following example shows the markup to create a control with a large image, a small image, and a label. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: - + controls in large, medium, and small variations, and with no images. + + ![Ribbon text box controls](~/add/media/wpfribbon-textbox.png "Ribbon text box controls") +Ribbon text box controls + + + +## Examples + The following example shows the markup to create a control with a large image, a small image, and a label. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: + ]]> @@ -96,7 +96,7 @@ Ribbon text box controls Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. To be added. @@ -149,18 +149,18 @@ Ribbon text box controls Gets or sets the command that is associated with this control. The command that is associated with this control. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -187,20 +187,20 @@ Ribbon text box controls Gets or sets a user defined data value to pass to the command. - A user defined data value to pass to the command. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A user defined data value to pass to the command. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -277,20 +277,20 @@ Ribbon text box controls Gets or sets the element on which to raise the specified command. - The element on which to invoke the command. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The element on which to invoke the command. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -344,19 +344,19 @@ Ribbon text box controls Gets or sets the for this control. The for this control. - contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -409,20 +409,20 @@ Ribbon text box controls Gets or sets the brush that is used to draw the background of the control when it has focus. - The brush that is used to draw the background of the control when it has focus. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of the control when it has focus. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -474,20 +474,20 @@ Ribbon text box controls Gets or sets the brush that is used to draw the outer border of the control when it has focus. - The brush that is used to draw the outer border of the control when it has focus. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of the control when it has focus. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -569,18 +569,18 @@ Ribbon text box controls if the control is hosted in a ; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -635,18 +635,18 @@ Ribbon text box controls if the control is hosted in the Quick Access Toolbar; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -698,23 +698,23 @@ Ribbon text box controls Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -766,28 +766,28 @@ Ribbon text box controls Gets or sets the text that is displayed next to or below the control. - The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property to control the visibility of the label. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: - + property to control the visibility of the label. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: + ]]> @@ -839,28 +839,28 @@ Ribbon text box controls Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property for a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property for a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: + ]]> Ribbon Layout and Resizing @@ -913,20 +913,20 @@ Ribbon text box controls Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. - The brush that is used to draw the background of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the background of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -978,20 +978,20 @@ Ribbon text box controls Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. - The brush that is used to draw the outer border of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outer border of the control when the mouse pointer is over it. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1074,11 +1074,11 @@ Ribbon text box controls Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1137,13 +1137,13 @@ Ribbon text box controls The event data. Provides class handling for the event and enables the keyboard focus visual when this control gets keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1233,13 +1233,13 @@ Ribbon text box controls The event data. Provides class handling for the event and disables the keyboard focus visual when this control loses keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1299,19 +1299,19 @@ Ribbon text box controls Gets or sets the for this control when it is hosted in the Quick Access Toolbar. The for this control when it is hosted in the Quick Access Toolbar. - contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1415,21 +1415,21 @@ Ribbon text box controls Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1484,18 +1484,18 @@ Ribbon text box controls to show the keyboard focus visual; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1547,28 +1547,28 @@ Ribbon text box controls Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextbox"::: + ]]> Ribbon Layout and Resizing @@ -1621,7 +1621,7 @@ Ribbon text box controls Gets or sets the width of the control. - The width of the in pixels. The registered default is 0. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The width of the in pixels. The registered default is 0. For more information about what can influence the value, see Dependency Property Value Precedence. To be added. @@ -1672,33 +1672,33 @@ Ribbon text box controls Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: + ]]> @@ -1751,33 +1751,33 @@ Enhanced ToolTip Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: + ]]> @@ -1830,33 +1830,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: + ]]> @@ -1909,33 +1909,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: + ]]> @@ -1988,33 +1988,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: + ]]> @@ -2067,33 +2067,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontextboxtt"::: + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonToggleButton.xml b/xml/System.Windows.Controls.Ribbon/RibbonToggleButton.xml index 2133624f785..3913adfdc24 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonToggleButton.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonToggleButton.xml @@ -28,26 +28,26 @@ Represents a toggle button that is used in a control. - controls in large, medium, and small variations, and with no images. - - ![Ribbon toggle button controls](~/add/media/wpfribbon-togglebutton.png "Ribbon toggle button controls") -Ribbon toggle button controls - - The following illustration shows examples of controls that are selected. - - ![Ribbon toggle button controls that are selected](~/add/media/wpfribbon-togglebutton-selection.gif "Ribbon toggle button controls that are selected") -Ribbon toggle button controls that are selected - - - -## Examples - The following example shows the markup to create a control with a large image, a small image, and a label. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: - + controls in large, medium, and small variations, and with no images. + + ![Ribbon toggle button controls](~/add/media/wpfribbon-togglebutton.png "Ribbon toggle button controls") +Ribbon toggle button controls + + The following illustration shows examples of controls that are selected. + + ![Ribbon toggle button controls that are selected](~/add/media/wpfribbon-togglebutton-selection.gif "Ribbon toggle button controls that are selected") +Ribbon toggle button controls that are selected + + + +## Examples + The following example shows the markup to create a control with a large image, a small image, and a label. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: + ]]> @@ -97,20 +97,20 @@ Ribbon toggle button controls that are selected Gets or sets a value that indicates whether this control can be added directly to the Quick Access Toolbar. - if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if this control can be added directly to the Quick Access Toolbar; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -164,18 +164,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the background of the control when it is in the Checked state. The brush that is used to draw the background of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -229,18 +229,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it is in the Checked state. The brush that is used to draw the outer border of the control when it is in the Checked state. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -294,19 +294,19 @@ Ribbon toggle button controls that are selected Gets or sets the for this control. The for this control. - contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. For the default property values, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Ribbon Layout and Resizing @@ -361,18 +361,18 @@ Ribbon toggle button controls that are selected Gets or sets a value that indicates the amount that the corners of a ribbon button are rounded. A value that indicates the amount that the corners of a ribbon button are rounded. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -426,18 +426,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the background of the control when it has focus. The brush that is used to draw the background of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -491,18 +491,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it has focus. The brush that is used to draw the outer border of the control when it has focus. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -557,18 +557,18 @@ Ribbon toggle button controls that are selected if the control is hosted in a ; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -623,18 +623,18 @@ Ribbon toggle button controls that are selected if the control is hosted in the Quick Access Toolbar; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -686,23 +686,23 @@ Ribbon toggle button controls that are selected Gets or sets the keyboard shortcut for the control. - The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The keyboard shortcut for the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - when you press the ALT key. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + when you press the ALT key. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -754,28 +754,28 @@ Ribbon toggle button controls that are selected Gets or sets the text that is displayed next to or below the control. - The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text that is displayed next to or below the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the label. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: - + property on the to control the visibility of the label. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: + ]]> @@ -827,28 +827,28 @@ Ribbon toggle button controls that are selected Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property for a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property for a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: + ]]> Ribbon Layout and Resizing @@ -903,18 +903,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the background of the control when the mouse pointer is over it. The brush that is used to draw the background of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -968,18 +968,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when the mouse pointer is over it. The brush that is used to draw the outer border of the control when the mouse pointer is over it. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1062,11 +1062,11 @@ Ribbon toggle button controls that are selected Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -1095,11 +1095,11 @@ Ribbon toggle button controls that are selected Handles the event and raises the attached event. - attached event. - + attached event. + ]]> @@ -1158,13 +1158,13 @@ Ribbon toggle button controls that are selected The event data. Provides class handling for the event and enables the keyboard focus visual when this control gets keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1225,13 +1225,13 @@ Ribbon toggle button controls that are selected The event data. Provides class handling for the event and disables the keyboard focus visual when this control loses keyboard focus. - property) of the event data. - + property) of the event data. + ]]> @@ -1263,13 +1263,13 @@ Ribbon toggle button controls that are selected The event data. Provides class handling for the routed event to prevent the control from receiving keyboard focus. - should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. - - This implementation does not change the handled state (the property) of the event data. - + should not take keyboard focus from the application. This method overrides the default behavior and temporarily sets the property to `false`, which prevents the control from taking keyboard focus. It then calls the base method. + + This implementation does not change the handled state (the property) of the event data. + ]]> @@ -1298,18 +1298,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the background of the control when it is pressed. The brush that is used to draw the background of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1363,18 +1363,18 @@ Ribbon toggle button controls that are selected Gets or sets the brush that is used to draw the outer border of the control when it is pressed. The brush that is used to draw the outer border of the control when it is pressed. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1428,19 +1428,19 @@ Ribbon toggle button controls that are selected Gets or sets the for this control when it is hosted in the Quick Access Toolbar. The for this control when it is hosted in the Quick Access Toolbar. - contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + contains properties that specify size and visibility information for the image and label associated with a control. This property specifies how the image and label will appear when this control is hosted in the Quick Access Toolbar. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1495,18 +1495,18 @@ Ribbon toggle button controls that are selected Gets or sets a unique identifier that links a ribbon control to a corresponding control in the Quick Access Toolbar. A unique identifier for a control in the Quick Access Toolbar. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1558,21 +1558,21 @@ Ribbon toggle button controls that are selected Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1627,18 +1627,18 @@ Ribbon toggle button controls that are selected to show the keyboard focus visual; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1690,28 +1690,28 @@ Ribbon toggle button controls that are selected Gets or sets the image that is displayed on the control when the image size is set to . - The image to display on the control. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display on the control. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - property on the to control the visibility of the . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: - + property on the to control the visibility of the . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebutton"::: + ]]> Ribbon Layout and Resizing @@ -1764,33 +1764,33 @@ Ribbon toggle button controls that are selected Gets or sets the descriptive text that is displayed in the ToolTip for this control. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: + ]]> @@ -1843,33 +1843,33 @@ Enhanced ToolTip Gets or sets the descriptive text that is displayed in the footer of the ToolTip for this control. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: + ]]> @@ -1922,33 +1922,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the footer of the ToolTip for this control. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: + ]]> @@ -2001,33 +2001,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the footer of the ToolTip for this control. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: + ]]> @@ -2080,33 +2080,33 @@ Enhanced ToolTip Gets or sets the image that is displayed in the ToolTip for this control. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: + ]]> @@ -2159,33 +2159,33 @@ Enhanced ToolTip Gets or sets the title text that is displayed in the ToolTip for this control. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - [!WARNING] -> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows the markup used to create the enhanced ToolTip. - - ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") -Enhanced ToolTip - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: - +> Each ribbon control inherits a property. If the property is set, the ribbon's enhanced ToolTip will not be shown; the standard ToolTip will be shown instead. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows the markup used to create the enhanced ToolTip. + + ![Enhanced ToolTip](~/add/media/wpfribbon-tooltipenhanced.png "Enhanced ToolTip") +Enhanced ToolTip + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls.Ribbon/RibbonButton/Overview/mainwindow.xaml" id="Snippetribbontogglebuttontt"::: + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonToolTip.xml b/xml/System.Windows.Controls.Ribbon/RibbonToolTip.xml index fc3d31bca08..a8ac98117a3 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonToolTip.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonToolTip.xml @@ -68,20 +68,20 @@ Gets or sets the descriptive text that is displayed for the control that is associated with this ToolTip. - The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -133,20 +133,20 @@ Gets or sets the descriptive text that is displayed in the ToolTip footer for the control that is associated with this ToolTip. - The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The descriptive text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -198,20 +198,20 @@ Gets or sets the image that is displayed in the ToolTip footer for the control that is associated with this ToolTip. - The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -263,20 +263,20 @@ Gets or sets the title text that is displayed in the ToolTip footer for the control that is associated with this ToolTip. - The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the footer of the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -329,21 +329,21 @@ Gets a value that indicates whether the ToolTip has content in its footer. - if the ToolTip has content in its footer; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the ToolTip has content in its footer; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - , , or properties has content. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + , , or properties has content. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -396,21 +396,21 @@ Gets a value that indicates whether the has content in its header. - if the ToolTip has content in its header; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the ToolTip has content in its header; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - , , or properties has content. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + , , or properties has content. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -462,20 +462,20 @@ Gets or sets the image that is displayed for the control that is associated with this ToolTip. - The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The image to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -528,20 +528,20 @@ Gets a value that indicates whether the ToolTip placement target is in a . - if the ToolTip placement target is in a ; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the ToolTip placement target is in a ; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -620,21 +620,21 @@ Gets a reference to the that this control belongs to. - A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A reference to the that this control belongs to. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - control and is inherited by the child controls. It is used to access visual style brushes defined on the class. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + control and is inherited by the child controls. It is used to access visual style brushes defined on the class. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -686,20 +686,20 @@ Gets or sets the title text that is displayed for the control that is associated with this ToolTip. - The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The title text to display in the ToolTip. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls.Ribbon/RibbonTwoLineText.xml b/xml/System.Windows.Controls.Ribbon/RibbonTwoLineText.xml index 42304420190..fe2ce680816 100644 --- a/xml/System.Windows.Controls.Ribbon/RibbonTwoLineText.xml +++ b/xml/System.Windows.Controls.Ribbon/RibbonTwoLineText.xml @@ -84,20 +84,20 @@ Gets or sets the amount by which each line of text is offset from the baseline. The amount by which each line of text is offset from the baseline, in device independent pixels. A value of indicates that an optimal baseline offset is automatically calculated from the current font characteristics. The default is . - property of the control's internal . For more information, see . - - -## Dependency Property Information - The baseline is the invisible horizontal line with which the base of each character in a line of text is aligned. - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property of the control's internal . For more information, see . + + +## Dependency Property Information + The baseline is the invisible horizontal line with which the base of each character in a line of text is aligned. + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -208,18 +208,18 @@ Gets or sets a value that indicates whether this control layout can extend to two lines or if it is restricted to one line. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -279,20 +279,20 @@ Gets or sets the height of each line of content. The height of each line, in device independent pixels, in the range of 0.0034 to 160000. A value of indicates that the line height is determined automatically from the current font characteristics. The default is . - property of the control's internal . For more information, see . - - -## Dependency Property Information - Gets or sets the height of the line set on the internal . - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property of the control's internal . For more information, see . + + +## Dependency Property Information + Gets or sets the height of the line set on the internal . + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -346,19 +346,19 @@ Gets or sets the mechanism by which the line box is determined for each line of content. One of the enumeration values that specifies how the line box is determined for each line of text. The default is . - property of the control's internal . For more information, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property of the control's internal . For more information, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -442,11 +442,11 @@ Builds the visual tree for the when a new template is applied. - method. - + method. + ]]> @@ -502,18 +502,18 @@ Gets or sets the thickness of the space between the boundaries of the content area and the displayed content. The thickness of the space between the boundaries of the content area and the displayed content. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -562,18 +562,18 @@ Gets or sets the geometry data that defines the shape that is displayed with the label. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|, | - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|, | + ]]> @@ -625,20 +625,20 @@ Gets or sets the brush that is used to draw the inside of the shape that is displayed with the label. - The brush that is used to draw the inside of the shape that is displayed with the label. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the inside of the shape that is displayed with the label. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -690,20 +690,20 @@ Gets or sets the brush that is used to draw the outline of the shape that is displayed with the label. - The brush that is used to draw the outline of the shape that is displayed with the label. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The brush that is used to draw the outline of the shape that is displayed with the label. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -819,20 +819,20 @@ Gets or sets the text content in this element. - The text content in this element. The registered default is an string. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text content in this element. The registered default is an string. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -861,19 +861,19 @@ Gets or sets a value that indicates the horizontal alignment of text content in this element. One of the enumeration values that indicates the horizontal alignment of text content in this element. The default is . - property of the control's internal . For more information, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property of the control's internal . For more information, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -927,19 +927,19 @@ Gets or sets a that contains the effects to apply to the text content in this element. A that contains the effects to apply to the text content in this element. The default is . - property of the control's internal . For more information, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property of the control's internal . For more information, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -993,19 +993,19 @@ Gets or sets the effects to apply to the text content in this element. A containing one or more objects that define effects to apply to the text content in this element. - property of the control's internal . For more information, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property of the control's internal . For more information, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1084,19 +1084,19 @@ Gets or sets the text trimming behavior to use when content overflows the content area. One of the enumeration values that specifies the text trimming behavior to use when content overflows the content area. The default is . - property of the control's internal . For more information, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property of the control's internal . For more information, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Controls/ComboBox.xml b/xml/System.Windows.Controls/ComboBox.xml index 9b3f2929983..bcb74bdd345 100644 --- a/xml/System.Windows.Controls/ComboBox.xml +++ b/xml/System.Windows.Controls/ComboBox.xml @@ -41,49 +41,49 @@ Represents a selection control with a drop-down list that can be shown or hidden by clicking the arrow on the control. - allows the user to select an item from a drop-down list or optionally to enter new text in the text box of the control. is an , which means it can contain a collection of objects of any type (such as string, image, or panel). For more information, see the class. - - The and properties specify how the behaves when the user does one of the following: - -- Enters a string to select an item in the . - -- Enters a string that does not correspond to an item in the . - -- Selects part of the string that is in the text box. - -- Copies or pastes a value into the text box. - - The following table describes the actions the user can and cannot take, depending on the values of and . - -|| is `true`| is `false`| -|-|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| is `true`|- Cannot select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy the string in the text box, but cannot paste a string into the text box.|- Can select an item in the by entering a string.
- Can enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy or paste the string in the text box.| -| is `false`|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .| - - The property has an effect only if is `true`. - - The is an , so it can display content other than simple strings. For example, you can create a that contains a list of images. When you have content other than strings in the , a nonsensical string might appear in the when the drop-down list is hidden. To display a string in the when it contains non-string items, use the or attached property. - -## Customizing the ComboBox Control - To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [ComboBox Styles and Templates](/dotnet/framework/wpf/controls/combobox-styles-and-templates). - + allows the user to select an item from a drop-down list or optionally to enter new text in the text box of the control. is an , which means it can contain a collection of objects of any type (such as string, image, or panel). For more information, see the class. + + The and properties specify how the behaves when the user does one of the following: + +- Enters a string to select an item in the . + +- Enters a string that does not correspond to an item in the . + +- Selects part of the string that is in the text box. + +- Copies or pastes a value into the text box. + + The following table describes the actions the user can and cannot take, depending on the values of and . + +|| is `true`| is `false`| +|-|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| is `true`|- Cannot select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy the string in the text box, but cannot paste a string into the text box.|- Can select an item in the by entering a string.
- Can enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy or paste the string in the text box.| +| is `false`|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .| + + The property has an effect only if is `true`. + + The is an , so it can display content other than simple strings. For example, you can create a that contains a list of images. When you have content other than strings in the , a nonsensical string might appear in the when the drop-down list is hidden. To display a string in the when it contains non-string items, use the or attached property. + +## Customizing the ComboBox Control + To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [ComboBox Styles and Templates](/dotnet/framework/wpf/controls/combobox-styles-and-templates). + Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. - -[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] - -## Examples - The following example creates a . The example populates the by binding the property to a collection object of type `VacationSpots`. The example also creates a that displays the selected item of the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippetcomboboxclass"::: - - The following example defines the collection object that the in the preceding example binds to. - + +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] + +## Examples + The following example creates a . The example populates the by binding the property to a collection object of type `VacationSpots`. The example also creates a that displays the selected item of the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippetcomboboxclass"::: + + The following example defines the collection object that the in the preceding example binds to. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml.cs" id="Snippetdata"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ComboBoxItems/VIsualBasic/Window1.xaml.vb" id="Snippetdata"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ComboBoxItems/VIsualBasic/Window1.xaml.vb" id="Snippetdata"::: + ]]>
@@ -137,16 +137,16 @@ Occurs when the drop-down list of the combo box closes. - and events. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/DropDownClosed/Pane1.xaml" id="Snippetcomboboxevents1"::: - + and events. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/DropDownClosed/Pane1.xaml" id="Snippetcomboboxevents1"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ComboBox/DropDownClosed/Pane1.xaml.cs" id="Snippetcomboboxevents2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ComboBoxSimple/VisualBasic/Pane1.xaml.vb" id="Snippetcomboboxevents2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ComboBoxSimple/VisualBasic/Pane1.xaml.vb" id="Snippetcomboboxevents2"::: + ]]> @@ -175,16 +175,16 @@ Occurs when the drop-down list of the combo box opens. - and events. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/DropDownClosed/Pane1.xaml" id="Snippetcomboboxevents1"::: - + and events. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/DropDownClosed/Pane1.xaml" id="Snippetcomboboxevents1"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ComboBox/DropDownClosed/Pane1.xaml.cs" id="Snippetcomboboxevents2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ComboBoxSimple/VisualBasic/Pane1.xaml.vb" id="Snippetcomboboxevents2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ComboBoxSimple/VisualBasic/Pane1.xaml.vb" id="Snippetcomboboxevents2"::: + ]]> @@ -243,11 +243,11 @@ if the supports scrolling; otherwise, . The default is . - in its style and has a custom keyboard scrolling behavior, should return `true`. - + in its style and has a custom keyboard scrolling behavior, should return `true`. + ]]>
@@ -319,25 +319,25 @@ if the drop-down is open; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example shows how to use the property to create a combo box with the drop down control opened when the combo box is initiated. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsDropDownOpen/app.xaml" id="Snippet4"::: - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example shows how to use the property to create a combo box with the drop down control opened when the combo box is initiated. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsDropDownOpen/app.xaml" id="Snippet4"::: + ]]> @@ -394,51 +394,51 @@ if the can be edited; otherwise . The default is . - and properties specify how the behaves when the user does one of the following: - -- Enters a string to select an item in the . - -- Enters a string that does not correspond to an item in the . - -- Selects part of the string that is in the text box. - -- Copies or pastes a value into the text box. - - The following table describes the actions the user can and cannot take, depending on the values of and . - -|| is `true`| is `false`| -|-|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| is `true`|- Cannot select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy the string in the text box, but cannot paste a string into the text box.|- Can select an item in the by entering a string.
- Can enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy or paste the string in the text box.| -| is `false`|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .| - - When is equal to `false`, the uses a to display the currently selected item; when is equal to `true`, a is used for this purpose instead. Note that a only displays plain text, and that a may include non-plain text content, such as images. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following examples create controls that contain images as items instead of text. If the property is set to `true`, the displays the value returned by the image's method. To avoid a with unexpected text, use the and properties to assign text to be displayed. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsEditable/pane1.xaml" id="Snippet1"::: - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsEditable/pane1.xaml" id="Snippet2"::: - - Another solution is to use the property. The drop-down control of the will not display the images but will display the text you assigned. - - The following example shows how to use . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsEditable/pane1.xaml" id="Snippet3"::: - + and properties specify how the behaves when the user does one of the following: + +- Enters a string to select an item in the . + +- Enters a string that does not correspond to an item in the . + +- Selects part of the string that is in the text box. + +- Copies or pastes a value into the text box. + + The following table describes the actions the user can and cannot take, depending on the values of and . + +|| is `true`| is `false`| +|-|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| is `true`|- Cannot select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy the string in the text box, but cannot paste a string into the text box.|- Can select an item in the by entering a string.
- Can enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy or paste the string in the text box.| +| is `false`|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .| + + When is equal to `false`, the uses a to display the currently selected item; when is equal to `true`, a is used for this purpose instead. Note that a only displays plain text, and that a may include non-plain text content, such as images. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following examples create controls that contain images as items instead of text. If the property is set to `true`, the displays the value returned by the image's method. To avoid a with unexpected text, use the and properties to assign text to be displayed. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsEditable/pane1.xaml" id="Snippet1"::: + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsEditable/pane1.xaml" id="Snippet2"::: + + Another solution is to use the property. The drop-down control of the will not display the images but will display the text you assigned. + + The following example shows how to use . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsEditable/pane1.xaml" id="Snippet3"::: + ]]>
@@ -527,43 +527,43 @@ if the is read-only; otherwise, . The default is . - and properties specify how the behaves when the user does one of the following: - -- Enters a string to select an item in the . - -- Enters a string that does not correspond to an item in the . - -- Selects part of the string that is in the text box. - -- Copies or pastes a value into the text box. - - The following table describes the actions the user can and cannot take, depending on the values of and . - -|| is `true`| is `false`| -|-|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| is `true`|- Cannot select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy the string in the text box, but cannot paste a string into the text box.|- Can select an item in the by entering a string.
- Can enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy or paste the string in the text box.| -| is `false`|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .| - - When is equal to `false`, the uses a to display the currently selected item; when is equal to `true`, a is used for this purpose instead. Note that a only displays plain text, and that a may include non-plain text content, such as images. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example shows a with an editable . The property is set to `true`, so the user cannot enter text into the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippet1"::: - + and properties specify how the behaves when the user does one of the following: + +- Enters a string to select an item in the . + +- Enters a string that does not correspond to an item in the . + +- Selects part of the string that is in the text box. + +- Copies or pastes a value into the text box. + + The following table describes the actions the user can and cannot take, depending on the values of and . + +|| is `true`| is `false`| +|-|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| is `true`|- Cannot select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy the string in the text box, but cannot paste a string into the text box.|- Can select an item in the by entering a string.
- Can enter a string that does not correspond to an item in the .
- Can select part of the string in the text box.
- Can copy or paste the string in the text box.| +| is `false`|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .|- Can select an item in the by entering a string.
- Cannot enter a string that does not correspond to an item in the .
- Cannot select part of the string in the .
- Cannot copy or paste the string in the .| + + When is equal to `false`, the uses a to display the currently selected item; when is equal to `true`, a is used for this purpose instead. Note that a only displays plain text, and that a may include non-plain text content, such as images. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example shows a with an editable . The property is set to `true`, so the user cannot enter text into the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippet1"::: + ]]>
@@ -620,11 +620,11 @@ if the is highlighted; otherwise, . - is not public. Therefore, you cannot use the backing dependency property for property system operations that require the dependency property identifier, such as calls to . However, you can still use as a property trigger. - + is not public. Therefore, you cannot use the backing dependency property for property system operations that require the dependency property identifier, such as calls to . However, you can still use as a property trigger. + ]]> @@ -668,60 +668,60 @@ Gets or sets the maximum height for a combo box drop-down. A double that represents the height that is retrieved or the height to set. The default value as defined to the property system is a calculated value based on taking a one-third fraction of the system max screen height parameters, but this default is potentially overridden by various control templates. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - -## XAML Attribute Usage - -``` - -- or - - -- or - - -``` - - -## XAML Values - *double* - - - String representation of a value. This is interpreted as a device-independent unit (1/96th inch) measurement. Strings need not explicitly include decimal points. For instance a value of `1` is acceptable. - - The same range restrictions as mentioned in the Property Value section apply. - - *qualifiedDouble* - A *double* value as described above, followed by one of the following unit declaration strings: `px`, `in`, `cm`, `pt`. - - `px` (default) is device-independent units (1/96th inch per unit) - - `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. - - - -## Examples - The following example shows how to use the property to specify the height of the control's drop-down. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsDropDownOpen/app.xaml" id="Snippet5"::: - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + +## XAML Attribute Usage + +``` + +- or - + +- or - + +``` + + +## XAML Values + *double* + + + String representation of a value. This is interpreted as a device-independent unit (1/96th inch) measurement. Strings need not explicitly include decimal points. For instance a value of `1` is acceptable. + + The same range restrictions as mentioned in the Property Value section apply. + + *qualifiedDouble* + A *double* value as described above, followed by one of the following unit declaration strings: `px`, `in`, `cm`, `pt`. + + `px` (default) is device-independent units (1/96th inch per unit) + + `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. + + + +## Examples + The following example shows how to use the property to specify the height of the control's drop-down. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/IsDropDownOpen/app.xaml" id="Snippet5"::: + ]]> @@ -1083,11 +1083,11 @@ Specified item. Prepares the specified element to display the specified item. - @@ -1117,35 +1117,35 @@ Gets the item that is displayed in the selection box. The selected item. - of the uses this property to show the selected item in the . To get the selected item of the outside of the , use the property instead of this property. - - -## XAML Attribute Usage - -``` - -``` - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples + of the uses this property to show the selected item in the . To get the selected item of the outside of the , use the property instead of this property. + + +## XAML Attribute Usage + +``` + +``` + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples The following example binds the property of a to the property. The is part of the for the . - + For a complete sample, see [Styling with ControlTemplates Sample](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ControlTemplateExamples/CS). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/combobox.xaml" id="Snippetcomboboxselectionbox"::: - + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/combobox.xaml" id="Snippetcomboboxselectionbox"::: + ]]> @@ -1254,32 +1254,32 @@ Gets the item template of the selection box content. An item template. - -## XAML Attribute Usage - -``` - -``` - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - -## Examples + +## XAML Attribute Usage + +``` + +``` + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + +## Examples The following example binds the property of a to the property. The is part of the for the . - + For a complete sample, see [Styling with ControlTemplates Sample](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ControlTemplateExamples/CS). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/combobox.xaml" id="Snippetcomboboxselectionbox"::: - + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/combobox.xaml" id="Snippetcomboboxselectionbox"::: + ]]> @@ -1333,21 +1333,21 @@ Gets or sets a value that indicates whether the keeps the user's input or replaces the input with a matching item. - if the keeps the user's input; if the replaces the input with a matching item The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the keeps the user's input; if the replaces the input with a matching item The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - that matches one of its items, the item is selected and the text that the user typed is replaced. This can cause the text that the user entered to change case. If the property is set to `true`, the selects the matching item, but preserves the text that the user entered. For example, suppose that a contains the string, "Hello" (with a capital H) and the user enters "hello" (with a lowercase h). If is `false`, the selects the matching item, "Hello," in its collection and populates its text box with that string. If is `true`, "Hello" is selected from the collection, but the text box says "hello." - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + that matches one of its items, the item is selected and the text that the user typed is replaced. This can cause the text that the user entered to change case. If the property is set to `true`, the selects the matching item, but preserves the text that the user entered. For example, suppose that a contains the string, "Hello" (with a capital H) and the user enters "hello" (with a lowercase h). If is `false`, the selects the matching item, "Hello," in its collection and populates its text box with that string. If is `true`, "Hello" is selected from the collection, but the text box says "hello." + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1403,25 +1403,25 @@ to keep the drop-down control open when the user clicks on the text area to start editing; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - This example shows how to use the property to create a combo box whose drop-down control stays open while the user enters information into the text box. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippet1"::: - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + This example shows how to use the property to create a combo box whose drop-down control stays open while the user enters information into the text box. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippet1"::: + ]]> @@ -1477,26 +1477,26 @@ Gets or sets the text of the currently selected item. The string of the currently selected item. The default is an empty string (""). - property is `true`, setting this property places initial text entered in the text box. When is `false`, setting this value has no effect. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|, | - - - -## Examples - This example shows how the property can be used to set text into the before the user makes a selection. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippet1"::: - + property is `true`, setting this property places initial text entered in the text box. When is `false`, setting this value has no effect. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|, | + + + +## Examples + This example shows how the property can be used to set text into the before the user makes a selection. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ComboBox/Overview/Window1.xaml" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Controls/ContextMenu.xml b/xml/System.Windows.Controls/ContextMenu.xml index b872ebcff2b..fe44c53b8c5 100644 --- a/xml/System.Windows.Controls/ContextMenu.xml +++ b/xml/System.Windows.Controls/ContextMenu.xml @@ -406,7 +406,7 @@ Get or sets the horizontal distance between the target origin and the popup alignment point. - The horizontal distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). The default is 0. + The horizontal distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see Popup Placement Behavior. The default is 0. Get or sets the vertical distance between the target origin and the popup alignment point. - The vertical distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). The default is 0. + The vertical distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see Popup Placement Behavior. The default is 0. Gets or sets the margin for the new item row. The margin for the new item row. - The registered default is 0. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The registered default is 0. For more information about what can influence the value, see Dependency Property Value Precedence. Represents a row. - row represents a single data item in a bound data source. Each row contains one cell per column in the , and each cell displays a single value in the bound data item. - + row represents a single data item in a bound data source. Each row contains one cell per column in the , and each cell displays a single value in the bound data item. + ]]> @@ -79,13 +79,13 @@ Gets the index of the row within a set of alternating rows. The index of the row within a set of alternating rows. The registered default is 0. For information about what can influence the value, see . - property of the to indicate the number of rows within a set of alternating rows. For more information about alternating rows, see . - - Override the method to respond to changes to the property. The property does not have its own property changed method because the field reuses the read-only field. - + property of the to indicate the number of rows within a set of alternating rows. For more information about alternating rows, see . + + Override the method to respond to changes to the property. The property does not have its own property changed method because the field reuses the read-only field. + ]]> @@ -116,11 +116,11 @@ Identifies the dependency property. - field reuses the read-only field. - + field reuses the read-only field. + ]]> @@ -456,13 +456,13 @@ Gets or sets the style that is used when rendering the row header. The style that is used when rendering the row header. The registered default is . For information about what can influence the value, see . - for a row header, specify a of . - - A can be applied to all row headers, or to an individual row header. To apply a to an individual header set the property, which takes precedence over the property. - + for a row header, specify a of . + + A can be applied to all row headers, or to an individual row header. To apply a to an individual header set the property, which takes precedence over the property. + ]]> @@ -679,22 +679,22 @@ Gets or sets a value that indicates whether the is a placeholder for a new item or for an item that has not been committed. - if the is a placeholder for a new item or for an item that has not been committed; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the is a placeholder for a new item or for an item that has not been committed; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1049,13 +1049,13 @@ The event data that describes the property that changed, as well as old and new values. Invoked whenever the effective value of any dependency property on this has been updated. - . The specific dependency property that changed is reported in the arguments parameter. - - Override this method to respond to changes to the property. The property does not have its own property changed method because the field reuses the read-only field. - + . The specific dependency property that changed is reported in the arguments parameter. + + Override this method to respond to changes to the property. The property does not have its own property changed method because the field reuses the read-only field. + ]]> @@ -1093,13 +1093,13 @@ The event data, which is empty when this method is called by the . Raises the event when the property value changes to . - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1170,13 +1170,13 @@ The event data, which is empty when this method is called by the . Raises the event when the property value changes to . - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1210,11 +1210,11 @@ Occurs when the row is selected. - property value changes to `true`. - + property value changes to `true`. + ]]> @@ -1270,11 +1270,11 @@ Occurs when the row selection is cleared. - property value changes to `false`. - + property value changes to `false`. + ]]> diff --git a/xml/System.Windows.Controls/FlowDocumentPageViewer.xml b/xml/System.Windows.Controls/FlowDocumentPageViewer.xml index b1009c6020a..d3cf92758e5 100644 --- a/xml/System.Windows.Controls/FlowDocumentPageViewer.xml +++ b/xml/System.Windows.Controls/FlowDocumentPageViewer.xml @@ -29,34 +29,34 @@ Represents a control for viewing flow content in a fixed viewing mode that shows content one page at a time. - allows only one as a child element. - - shows content in page-at-a-time viewing mode. A similar control, , shows content in continuous scrolling mode. Both and are fixed to a particular viewing mode. On the other hand, includes features that enable the user to dynamically choose between various viewing modes (as provided by the enumeration), at the cost of being poorer performing than or . - - The following illustration shows a control with its default user interface (UI). - - ![Screenshot: FlowDocumentPageViewer](~/add/media/flowdocpageviewer-main.png "Screenshot: FlowDocumentPageViewer") - -- **Content Area** - The content area displays the contents of the specified by the property. - -- **Toolbar** - The default toolbar is docked underneath the content area, and hosts controls for navigating pages, and changing the zoom level. - - - **Page Navigation Controls** - The page navigation controls include a button to jump to the next page (the down arrow) or previous page (the up arrow), as well as indicators for the current page number and total number of pages. - - - **Zoom Controls** - The zoom controls enable the user to increase or decrease the zoom level by clicking the plus or minus buttons, respectively. The zoom controls also include a slider for adjusting the zoom level. For more information, see . - - - **Search** - The user can use the Ctr+F keyboard shortcut or you can use to toggle a search textbox that is used to find strings within the content. See for more information. - - - -## Examples - The following example defines the pictured in the figure above. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: - + allows only one as a child element. + + shows content in page-at-a-time viewing mode. A similar control, , shows content in continuous scrolling mode. Both and are fixed to a particular viewing mode. On the other hand, includes features that enable the user to dynamically choose between various viewing modes (as provided by the enumeration), at the cost of being poorer performing than or . + + The following illustration shows a control with its default user interface (UI). + + ![Screenshot: FlowDocumentPageViewer](~/add/media/flowdocpageviewer-main.png "Screenshot: FlowDocumentPageViewer") + +- **Content Area** - The content area displays the contents of the specified by the property. + +- **Toolbar** - The default toolbar is docked underneath the content area, and hosts controls for navigating pages, and changing the zoom level. + + - **Page Navigation Controls** - The page navigation controls include a button to jump to the next page (the down arrow) or previous page (the up arrow), as well as indicators for the current page number and total number of pages. + + - **Zoom Controls** - The zoom controls enable the user to increase or decrease the zoom level by clicking the plus or minus buttons, respectively. The zoom controls also include a slider for adjusting the zoom level. For more information, see . + + - **Search** - The user can use the Ctr+F keyboard shortcut or you can use to toggle a search textbox that is used to find strings within the content. See for more information. + + + +## Examples + The following example defines the pictured in the figure above. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: + ]]> @@ -110,19 +110,19 @@ if the level can be decreased; otherwise, . - method decreases the level by the amount specified by the property. The value of this property is subject to the value of the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + method decreases the level by the amount specified by the property. The value of this property is subject to the value of the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -182,11 +182,11 @@ Identifies the dependency property. - , you need this key in order to set the value of the dependency property. Call , passing as the `key` parameter. - + , you need this key in order to set the value of the dependency property. Call , passing as the `key` parameter. + ]]> @@ -217,19 +217,19 @@ if the level can be increased; otherwise, . - method increases the level by the amount specified by the property. The value of this property is subject to the value of the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + method increases the level by the amount specified by the property. The value of this property is subject to the value of the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -288,11 +288,11 @@ Identifies the dependency property. - , you need this key in order to set the value of the dependency property. Call , passing as the `key` parameter. - + , you need this key in order to set the value of the dependency property. Call , passing as the `key` parameter. + ]]> @@ -328,15 +328,15 @@ Executes the routed command. - level by the value specified by the property. - - Default user interface (UI) includes a button to decrease the zoom. - - Calling this method has no effect if the property returns `false`. - + level by the value specified by the property. + + Default user interface (UI) includes a button to decrease the zoom. + + Calling this method has no effect if the property returns `false`. + ]]> @@ -377,25 +377,25 @@ Toggles the **Find** dialog. - with default UI. - - ![Screenshot: Find Dialog of FlowDocumentPageViewer](~/add/media/flowdocpageviewer-find.png "Screenshot: Find Dialog of FlowDocumentPageViewer") - - The default **Find** dialog includes a field for entering search text, as well as buttons for **Find Next**, **Find Previous**, and **Options**. The following **Find** options are provided by default: - -- Match whole word only - -- Match case - -- Match diacritic - -- Match kashida - -- Match alef hamza - + with default UI. + + ![Screenshot: Find Dialog of FlowDocumentPageViewer](~/add/media/flowdocpageviewer-find.png "Screenshot: Find Dialog of FlowDocumentPageViewer") + + The default **Find** dialog includes a field for entering search text, as well as buttons for **Find Next**, **Find Previous**, and **Options**. The following **Find** options are provided by default: + +- Match whole word only + +- Match case + +- Match diacritic + +- Match kashida + +- Match alef hamza + ]]> @@ -431,15 +431,15 @@ Executes the routed command. - level by the value specified by the property. - - Default user interface (UI) includes a button to increase the zoom. - - Calling this method has no effect if the property returns `false`. - + level by the value specified by the property. + + Default user interface (UI) includes a button to increase the zoom. + + Calling this method has no effect if the property returns `false`. + ]]> @@ -471,22 +471,22 @@ Gets or sets a value that indicates whether displays selected text when the control does not have focus. - if the displays selected text when the does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the displays selected text when the does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -539,22 +539,22 @@ Gets a value that indicates whether the has focus and selected text. - if the displays selected text when the text box does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the displays selected text when the text box does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -609,29 +609,29 @@ Gets or sets the maximum allowable level for the . The maximum allowable zoom level for the , interpreted as a percentage. The default is 200.0 (a maximum zoom of 200%). - user interface (UI) includes a slider that can be used to adjust the level. This property specifies the upper-limit value for the slider. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to use this property. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: - + user interface (UI) includes a slider that can be used to adjust the level. This property specifies the upper-limit value for the slider. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to use this property. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentpageviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: + ]]> @@ -693,29 +693,29 @@ Gets or sets the minimum allowable level for the . The minimum allowable zoom level for the , interpreted as a percentage. The default is 80.0 (a minimum zoom of 80%). - user interface (UI) includes a slider that can be used to adjust the level. This property specifies the lower-limit value for the slider. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to use this property. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: - + user interface (UI) includes a slider that can be used to adjust the level. This property specifies the lower-limit value for the slider. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to use this property. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentpageviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: + ]]> @@ -777,13 +777,13 @@ Builds the visual tree for the . - is called. - - This method overrides . - + is called. + + This method overrides . + ]]> @@ -813,11 +813,11 @@ Handles the routed command. - command is called. - + command is called. + ]]> @@ -850,13 +850,13 @@ Arguments of the event. Called whenever an unhandled routed event reaches this class in its route. Implement this method to add class handling for this event. - could call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled. - + could call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled. + ]]> @@ -914,11 +914,11 @@ Handles the routed command. - command is called. - + command is called. + ]]> @@ -948,11 +948,11 @@ Called when the property is changed. - . - + . + ]]> @@ -982,11 +982,11 @@ Handles the routed command. - command is called. - + command is called. + ]]> @@ -1016,13 +1016,13 @@ Handles the routed command. - command is called. - - This method overrides . - + command is called. + + This method overrides . + ]]> @@ -1055,13 +1055,13 @@ The page number to go to. Handles the routed command. - command is called. - - This method overrides . - + command is called. + + This method overrides . + ]]> @@ -1091,11 +1091,11 @@ Handles the routed command. - command is called. - + command is called. + ]]> @@ -1138,11 +1138,11 @@ A object that contains the arguments associated with the routed event. Handles the routed event. - . - + . + ]]> @@ -1172,13 +1172,13 @@ Handles the routed command. - command is called. - - This method overrides . - + command is called. + + This method overrides . + ]]> @@ -1211,13 +1211,13 @@ A object containing arguments associated with the routed event. Handles the routed event. - routed event is raised. - - This method overrides . - + routed event is raised. + + This method overrides . + ]]> @@ -1247,13 +1247,13 @@ Handles the routed command. - command is called. - - This method overrides . - + command is called. + + This method overrides . + ]]> @@ -1283,13 +1283,13 @@ Handles the routed event. - routed event is raised. - - This method overrides . - + routed event is raised. + + This method overrides . + ]]> @@ -1319,13 +1319,13 @@ Handles the routed command. - command is called. - - This method overrides . - + command is called. + + This method overrides . + ]]> @@ -1355,11 +1355,11 @@ Handles the routed command. - command is called. - + command is called. + ]]> @@ -1422,20 +1422,20 @@ Gets the selected content of the . The selected content of the . - is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). - - - -## Examples - The following example shows how to get the text that a user has selected in the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window1.xaml" id="Snippet1"::: + is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). + + + +## Examples + The following example shows how to get the text that a user has selected in the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window1.xaml" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window1.xaml.cs" id="Snippet2"::: -:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocSelection/VisualBasic/Window1.xaml.vb" id="Snippet2"::: - +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocSelection/VisualBasic/Window1.xaml.vb" id="Snippet2"::: + ]]> @@ -1464,18 +1464,18 @@ Gets or sets the brush that highlights the selected text. A brush that highlights the selected text. - by setting the and the properties.. - - - -## Examples - The following example creates a , sets the property to pink, and sets the property to 0.7. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: - + by setting the and the properties.. + + + +## Examples + The following example creates a , sets the property to pink, and sets the property to 0.7. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: + ]]> @@ -1529,18 +1529,18 @@ Gets or sets the opacity of the . The opacity of the . The default is 0.4. - to 0, the is transparent and is not visible. If you set the to 1.0 or greater, the is opaque and the selected text is not visible. - - - -## Examples - The following example creates a , sets the property to pink, and sets the property to 0.7. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: - + to 0, the is transparent and is not visible. If you set the to 1.0 or greater, the is opaque and the selected text is not visible. + + + +## Examples + The following example creates a , sets the property to pink, and sets the property to 0.7. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: + ]]> @@ -1595,29 +1595,29 @@ Gets or sets the current zoom level for the . The current zoom level, interpreted as a percentage. The default is 100.0 (a zoom level of 100%). - and properties. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to use this property. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: - + and properties. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to use this property. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentpageviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: + ]]> @@ -1651,29 +1651,29 @@ Gets or sets the zoom increment. The current zoom increment, interpreted as a percentage. The default is 10.0 (zoom increments by 10%). - level is increased or decreased when the or commands are executed, respectively. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to use this property. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: - + level is increased or decreased when the or commands are executed, respectively. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to use this property. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentpageviewerxaml"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentpageviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentpageviewer"::: + ]]> diff --git a/xml/System.Windows.Controls/FlowDocumentReader.xml b/xml/System.Windows.Controls/FlowDocumentReader.xml index 6e40610a351..8cf0d8e5102 100644 --- a/xml/System.Windows.Controls/FlowDocumentReader.xml +++ b/xml/System.Windows.Controls/FlowDocumentReader.xml @@ -41,38 +41,38 @@ Provides a control for viewing flow content, with built-in support for multiple viewing modes. - includes features that enable the user to dynamically choose between various viewing modes, including a single-page (page-at-a-time) viewing mode, a two-page-at-a-time (book reading format) viewing mode, and a continuous scrolling (bottomless) viewing mode. If you do not need the ability to dynamically switch between different viewing modes, there are lighter-weight flow content viewers that are fixed in a particular viewing mode. displays flow content in single-page viewing mode, and displays flow content in continuous-scrolling mode. For more information about available display modes, see . - - The following figure shows a control with its default user interface (UI). - - ![Screenshot with callouts: FlowDocumentReader](~/add/media/flowdocrdr-main.png "Screenshot with callouts: FlowDocumentReader") - -- **Content Area** - The content area displays the contents of the specified by the property. - -- **Tool Bar** - The default toolbar is docked underneath the content area. It hosts controls for searching content, navigating pages, selecting a viewing mode, and changing the zoom level. - - - **Find Button** - The **Find** button brings up a Find dialog, which enables the user to search the contents of the for specified terms or phrases. The **Find** button is not shown if is `false`. For more information, see . - - - **Page Navigation Controls** - The page navigation controls include a button to jump to the next page (the down arrow) or previous page (the up arrow), as well as indicators for the current page number and total number of pages. - - - **Viewing Mode Buttons** - The viewing mode buttons enable the user to select from available viewing modes. For more information, see . - - - **Zoom Controls** - The zoom controls enable the user to increase or decrease the zoom level by clicking the plus or minus buttons, respectively. The zoom controls also include a slider for adjusting the zoom level. For more information, see . - - The default toolbar UI does not include a **Print** button. - - is the only allowable child element for a . A element can host no more than one . - - - -## Examples - The following example defines the pictured in the preceding figure. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/Window1.xaml" id="Snippet_floaterfigurexaml"::: - + includes features that enable the user to dynamically choose between various viewing modes, including a single-page (page-at-a-time) viewing mode, a two-page-at-a-time (book reading format) viewing mode, and a continuous scrolling (bottomless) viewing mode. If you do not need the ability to dynamically switch between different viewing modes, there are lighter-weight flow content viewers that are fixed in a particular viewing mode. displays flow content in single-page viewing mode, and displays flow content in continuous-scrolling mode. For more information about available display modes, see . + + The following figure shows a control with its default user interface (UI). + + ![Screenshot with callouts: FlowDocumentReader](~/add/media/flowdocrdr-main.png "Screenshot with callouts: FlowDocumentReader") + +- **Content Area** - The content area displays the contents of the specified by the property. + +- **Tool Bar** - The default toolbar is docked underneath the content area. It hosts controls for searching content, navigating pages, selecting a viewing mode, and changing the zoom level. + + - **Find Button** - The **Find** button brings up a Find dialog, which enables the user to search the contents of the for specified terms or phrases. The **Find** button is not shown if is `false`. For more information, see . + + - **Page Navigation Controls** - The page navigation controls include a button to jump to the next page (the down arrow) or previous page (the up arrow), as well as indicators for the current page number and total number of pages. + + - **Viewing Mode Buttons** - The viewing mode buttons enable the user to select from available viewing modes. For more information, see . + + - **Zoom Controls** - The zoom controls enable the user to increase or decrease the zoom level by clicking the plus or minus buttons, respectively. The zoom controls also include a slider for adjusting the zoom level. For more information, see . + + The default toolbar UI does not include a **Print** button. + + is the only allowable child element for a . A element can host no more than one . + + + +## Examples + The following example defines the pictured in the preceding figure. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/Window1.xaml" id="Snippet_floaterfigurexaml"::: + ]]> @@ -167,19 +167,19 @@ if the level can be decreased; otherwise, . - method decreases the level by the amount specified by the property. The value of this property is subject to the value of the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + method decreases the level by the amount specified by the property. The value of this property is subject to the value of the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -242,18 +242,18 @@ if the can jump to the next page of content; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -316,11 +316,11 @@ if the is able to jump to the specified page number; otherwise, . - - + + ]]> @@ -351,18 +351,18 @@ if the can jump to the previous page of content; otherwise, . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -421,19 +421,19 @@ if the level can be increased; otherwise, . - method increases the level by the amount specified by the property. The value of this property is subject to the value of the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + method increases the level by the amount specified by the property. The value of this property is subject to the value of the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -501,15 +501,15 @@ Executes the routed command. - method decreases the current level by the value specified by the property. - - Default user interface (UI) includes a button to decrease the zoom. - - Calling this method has no effect if the property is `false`. - + method decreases the current level by the value specified by the property. + + Default user interface (UI) includes a button to decrease the zoom. + + Calling this method has no effect if the property is `false`. + ]]> @@ -543,18 +543,18 @@ Gets or sets a that hosts the content to be displayed by the . A that hosts the content to be displayed by the . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -616,27 +616,27 @@ Toggles the Find dialog. - user interface (UI) includes a **Find** button that toggles the Find dialog. The following figure shows the Find dialog on a with default UI. - - ![Screenshot with callouts: FlowDocumentReader](~/add/media/flowdocrdr-find.png "Screenshot with callouts: FlowDocumentReader") - - The default Find dialog includes a field for entering search text, as well as buttons for **Find Next**, **Find Previous**, and **Options**. The following Find options are provided by default: - -- Match whole word only. - -- Match case. - -- Match diacritic. - -- Match kashida. - -- Match alef hamza. - - Calling this method has no effect if the property is `false`. - + user interface (UI) includes a **Find** button that toggles the Find dialog. The following figure shows the Find dialog on a with default UI. + + ![Screenshot with callouts: FlowDocumentReader](~/add/media/flowdocrdr-find.png "Screenshot with callouts: FlowDocumentReader") + + The default Find dialog includes a field for entering search text, as well as buttons for **Find Next**, **Find Previous**, and **Options**. The following Find options are provided by default: + +- Match whole word only. + +- Match case. + +- Match diacritic. + +- Match kashida. + +- Match alef hamza. + + Calling this method has no effect if the property is `false`. + ]]> @@ -672,15 +672,15 @@ Executes the routed command. - method increases the current level by the value specified by the property. - - Default user interface (UI) includes a button to increase the zoom. - - Calling this method has no effect if the property is `false`. - + method increases the current level by the value specified by the property. + + Default user interface (UI) includes a button to increase the zoom. + + Calling this method has no effect if the property is `false`. + ]]> @@ -715,35 +715,35 @@ to enable the routed command; otherwise, . The default is . - user interface (UI) includes a **Find** button that toggles the Find dialog. The following figure shows the Find dialog on a with default UI. - - ![Screenshot with callouts: FlowDocumentReader](~/add/media/flowdocrdr-find.png "Screenshot with callouts: FlowDocumentReader") - - When is `false`, the **Find** button does not appear on the UI. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: - - The following example shows how to set the property programmatically. - + user interface (UI) includes a **Find** button that toggles the Find dialog. The following figure shows the Find dialog on a with default UI. + + ![Screenshot with callouts: FlowDocumentReader](~/add/media/flowdocrdr-find.png "Screenshot with callouts: FlowDocumentReader") + + When is `false`, the **Find** button does not appear on the UI. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentreader"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: + ]]> @@ -798,22 +798,22 @@ Gets or sets a value that indicates whether displays selected text when the control does not have focus. - if the displays selected text when the does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the displays selected text when the does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -869,19 +869,19 @@ to indicate that single-page viewing mode is available; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Setting this property to while and are also . @@ -942,30 +942,30 @@ to enable the routed command; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: - - The following example shows how to set the property programmatically. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentreader"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: + ]]> @@ -1024,19 +1024,19 @@ to indicate that is available as a viewing mode; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Setting this property to while and are also . @@ -1094,22 +1094,22 @@ Gets a value that indicates whether the has focus and selected text. - if the displays selected text when the text box does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the displays selected text when the text box does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1165,19 +1165,19 @@ to indicate that is available as a viewing mode; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Setting this property to while and are also . @@ -1264,31 +1264,31 @@ Gets or sets the maximum allowable level for the . The maximum allowable level for the , interpreted as a percentage. The default is 200.0 (maximum zoom of 200%). - user interface (UI) includes a slider that can be used to adjust the level. This property specifies the upper-limit value for the slider. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: - - The following example shows how to set the property programmatically. - + user interface (UI) includes a slider that can be used to adjust the level. This property specifies the upper-limit value for the slider. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentreader"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: + ]]> @@ -1350,31 +1350,31 @@ Gets or sets the minimum allowable level for the . The minimum allowable level for the , interpreted as a percentage. The default is 80.0 (minimum zoom of 80%). - user interface (UI) includes a slider that can be used to adjust the level. This property specifies the lower-limit value for the slider. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: - - The following example shows how to set the property programmatically. - + user interface (UI) includes a slider that can be used to adjust the level. This property specifies the lower-limit value for the slider. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentreader"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: + ]]> @@ -1436,13 +1436,13 @@ Builds the visual tree for the . - is called. - - This method overrides . - + is called. + + This method overrides . + ]]> @@ -1472,11 +1472,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1507,11 +1507,11 @@ Creates and returns an object for this . An object for this . - . - + . + ]]> @@ -1541,11 +1541,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1606,11 +1606,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1640,11 +1640,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1677,13 +1677,13 @@ An object containing the arguments associated with the routed event. Handles the routed event. - property is `true`. - - This method overrides . - + property is `true`. + + This method overrides . + ]]> @@ -1716,13 +1716,13 @@ A object containing the arguments associated with the routed event. Handles the routed event. - . - - This method is called whenever the dependency property changes. - + . + + This method is called whenever the dependency property changes. + ]]> @@ -1765,15 +1765,15 @@ Provides data about the event. Invoked whenever an unhandled attached routed event reaches an element derived from this class in its route. Implement this method to add class handling for this event. - will not be invoked. - - This method has no default implementation. Calling base() in your implementation is still recommended, in case an intermediate class in the inheritance implemented this method. You may call base() either before or after your special handling, depending on your requirements. - - The purpose of this method is somewhat similar to common language runtime (CLR) event pattern On* methods: it provides the means to handle the matching event from derived classes with a class handler instead of an instance handler. In this case the matching event is a routed event. The implementation pattern of the On* methods is different for routed events because the routed event may have been raised by a child element, not necessarily the element that will invoke handlers, so your implementation will need to take the event arguments' source properties into account (and should not try to re-raise the event in most cases). Subclasses of could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and mark the event as handled. - + will not be invoked. + + This method has no default implementation. Calling base() in your implementation is still recommended, in case an intermediate class in the inheritance implemented this method. You may call base() either before or after your special handling, depending on your requirements. + + The purpose of this method is somewhat similar to common language runtime (CLR) event pattern On* methods: it provides the means to handle the matching event from derived classes with a class handler instead of an instance handler. In this case the matching event is a routed event. The implementation pattern of the On* methods is different for routed events because the routed event may have been raised by a child element, not necessarily the element that will invoke handlers, so your implementation will need to take the event arguments' source properties into account (and should not try to re-raise the event in most cases). Subclasses of could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and mark the event as handled. + ]]> @@ -1804,11 +1804,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1874,11 +1874,11 @@ One of the values that specifies the viewing mode to switch to. Handles the routed command. - routed command is invoked. - + routed command is invoked. + ]]> @@ -1908,21 +1908,21 @@ Gets the current number of display pages for the content hosted by the . The current number of display pages for the content hosted by the . - are dynamically organized into a set of display pages, the number of which is based on current display and layout characteristics. For example, resizing a or changing the level affects the number of display pages that the content is organized into. - - When the is in the viewing mode, the page count and the current page number are always 1 (assuming any content has been loaded). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + are dynamically organized into a set of display pages, the number of which is based on current display and layout characteristics. For example, resizing a or changing the level affects the number of display pages that the content is organized into. + + When the is in the viewing mode, the page count and the current page number are always 1 (assuming any content has been loaded). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1979,21 +1979,21 @@ Gets the page number for the currently displayed page. The page number for the currently displayed page. - are dynamically organized into a set of display pages, the number of which is based on current display and layout characteristics. For example, resizing a or changing the level affects the number of display pages that the content is organized into. - - When the is in the viewing mode, the page count and the current page number are always 1 (assuming any content has been loaded). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + are dynamically organized into a set of display pages, the number of which is based on current display and layout characteristics. For example, resizing a or changing the level affects the number of display pages that the content is organized into. + + When the is in the viewing mode, the page count and the current page number are always 1 (assuming any content has been loaded). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -2056,17 +2056,17 @@ Invokes a standard Print dialog which can be used to print the contents of the and configure printing preferences. - user interface (UI) does not provide a **Print** button. - - The following figure shows an example of a standard Print dialog. Note that the specific appearance of the Print dialog may vary depending on the hosting computer's configuration. - - ![Screenshot: Print dialog box](~/add/media/flowdocrdr-print.png "Screenshot: Print dialog box") - - Calling this method has no effect if the property is `false`. - + user interface (UI) does not provide a **Print** button. + + The following figure shows an example of a standard Print dialog. Note that the specific appearance of the Print dialog may vary depending on the hosting computer's configuration. + + ![Screenshot: Print dialog box](~/add/media/flowdocrdr-print.png "Screenshot: Print dialog box") + + Calling this method has no effect if the property is `false`. + ]]> @@ -2098,20 +2098,20 @@ Gets the selected content of the . The selected content of the . - is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). - - - -## Examples - The following example shows how to get the text that a user has selected in the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window3.xaml" id="Snippet5"::: + is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). + + + +## Examples + The following example shows how to get the text that a user has selected in the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window3.xaml" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window3.xaml.cs" id="Snippet6"::: -:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocSelection/VisualBasic/Window3.xaml.vb" id="Snippet6"::: - +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocSelection/VisualBasic/Window3.xaml.vb" id="Snippet6"::: + ]]> @@ -2140,18 +2140,18 @@ Gets or sets the brush that highlights the selected text. A brush that highlights the selected text. - by setting the and the properties. - - - -## Examples - The following example creates a , sets the property to pink, and sets the property to 0.7. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentReader/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: - + by setting the and the properties. + + + +## Examples + The following example creates a , sets the property to pink, and sets the property to 0.7. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentReader/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: + ]]> @@ -2205,18 +2205,18 @@ Gets or sets the opacity of the . The opacity of the . The default is 0.4. - to 0, the is transparent and is not visible. If you set the to 1.0 or greater, the is opaque and the selected text is not visible. - - - -## Examples - The following example creates a , sets the property to pink, and sets the property to 0.7. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentReader/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: - + to 0, the is transparent and is not visible. If you set the to 1.0 or greater, the is opaque and the selected text is not visible. + + + +## Examples + The following example creates a , sets the property to pink, and sets the property to 0.7. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentReader/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: + ]]> @@ -2280,13 +2280,13 @@ One of the values that specifies the desired viewing mode. Executes the command. - to the specified viewing mode. - - For details on available viewing modes for a , see . - + to the specified viewing mode. + + For details on available viewing modes for a , see . + ]]> @@ -2315,24 +2315,24 @@ Gets the value that represents the **Switch Viewing Mode** command. - class has built-in handling for this command (as well as built-in handling for a number of application and navigation commands). For more information on commanding and command binding, see [Commanding Overview](/dotnet/framework/wpf/advanced/commanding-overview). - - Rather than initiate this command, you can instead call on the relevant . The result is the same. - - The **Switch Viewing Mode** command can either be parameterless, in which case the viewing mode advances to the next available viewing mode in the enumeration sequence, or it can specify a viewing mode by naming the in the command parameters. If used to set a command property in XAML, the command must be parameterless. - - You could also use or respond to this command in a derived class, using either the built-in handling or replacing it with handling of your own. is a callback that you can use to change the class handling, without requiring changes to command bindings in the template or in instances. - - -## XAML Text Usage - -``` - -``` - + class has built-in handling for this command (as well as built-in handling for a number of application and navigation commands). For more information on commanding and command binding, see [Commanding Overview](/dotnet/framework/wpf/advanced/commanding-overview). + + Rather than initiate this command, you can instead call on the relevant . The result is the same. + + The **Switch Viewing Mode** command can either be parameterless, in which case the viewing mode advances to the next available viewing mode in the enumeration sequence, or it can specify a viewing mode by naming the in the command parameters. If used to set a command property in XAML, the command must be parameterless. + + You could also use or respond to this command in a derived class, using either the built-in handling or replacing it with handling of your own. is a callback that you can use to change the class handling, without requiring changes to command bindings in the template or in instances. + + +## XAML Text Usage + +``` + +``` + ]]> @@ -2367,11 +2367,11 @@ One of the values that specifies the desired viewing mode. Handles the command. - , see . - + , see . + ]]> @@ -2467,23 +2467,23 @@ Gets or sets the viewing mode for the . One of the values that specifies the viewing mode. The default is . - user interface (UI) includes buttons for selecting the viewing mode. The following figure shows the viewing mode selection buttons on a with default UI. - - ![Screenshot: FlowDocumentReader ViewMode](~/add/media/flowdocrdr-viewmode.png "Screenshot: FlowDocumentReader ViewMode") - - For more information about viewing modes, see . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + user interface (UI) includes buttons for selecting the viewing mode. The following figure shows the viewing mode selection buttons on a with default UI. + + ![Screenshot: FlowDocumentReader ViewMode](~/add/media/flowdocrdr-viewmode.png "Screenshot: FlowDocumentReader ViewMode") + + For more information about viewing modes, see . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -2542,35 +2542,35 @@ Gets or sets the current zoom level. The current zoom level, interpreted as a percentage. The default value 100.0 (zoom level of 100%). - user interface (UI) includes a zoom control that provides buttons for increasing or decreasing the zoom, as well as a slider for adjusting the zoom level. The following figure shows the zoom controls on a with default UI. - - ![FlowDocumentReader content zoom](~/add/media/flowdocrdr-zoom.png "FlowDocumentReader content zoom") - - The zoom level is constrained by the values of the and properties. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: - - The following example shows how to set the property programmatically. - + user interface (UI) includes a zoom control that provides buttons for increasing or decreasing the zoom, as well as a slider for adjusting the zoom level. The following figure shows the zoom controls on a with default UI. + + ![FlowDocumentReader content zoom](~/add/media/flowdocrdr-zoom.png "FlowDocumentReader content zoom") + + The zoom level is constrained by the values of the and properties. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentreader"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: + ]]> @@ -2604,35 +2604,35 @@ Gets or sets the zoom increment. The current zoom increment, interpreted as a percentage. The default is 10.0 (zoom increment of 10%). - level is increased or decreased when the or commands are executed, respectively. - - Default user interface (UI) includes a zoom control that provides buttons for increasing or decreasing the zoom, as well as a slider for adjusting the zoom level. The following figure shows the zoom controls on a with default UI. - - ![FlowDocumentReader content zoom](~/add/media/flowdocrdr-zoom.png "FlowDocumentReader content zoom") - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: - - The following example shows how to set the property programmatically. - + level is increased or decreased when the or commands are executed, respectively. + + Default user interface (UI) includes a zoom control that provides buttons for increasing or decreasing the zoom, as well as a slider for adjusting the zoom level. The following figure shows the zoom controls on a with default UI. + + ![FlowDocumentReader content zoom](~/add/media/flowdocrdr-zoom.png "FlowDocumentReader content zoom") + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentreaderxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentreader"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentreader"::: + ]]> diff --git a/xml/System.Windows.Controls/FlowDocumentScrollViewer.xml b/xml/System.Windows.Controls/FlowDocumentScrollViewer.xml index e7b65fe218d..895bf69bcbf 100644 --- a/xml/System.Windows.Controls/FlowDocumentScrollViewer.xml +++ b/xml/System.Windows.Controls/FlowDocumentScrollViewer.xml @@ -49,26 +49,26 @@ Provides a control for viewing flow content in a continuous scrolling mode. - shows content in continuous scrolling mode. A similar control, , shows content in page-at-a-time viewing mode. Both and are fixed to a particular viewing mode. On the other hand, includes features that enable the user to dynamically choose between various viewing modes (as provided by the enumeration), at the cost of being heavier weight than or . - - The following figure shows a control with its default user interface (UI). - - ![Screenshot: Basic FlowDocumentScrollViewer](~/add/media/flowdocscrollviewer-main.png "Screenshot: Basic FlowDocumentScrollViewer") - - By default, a vertical scrollbar is always shown, and a horizontal scrollbar becomes visible if needed. The default UI for does not include a toolbar; however, the property can be used to enable a built-in toolbar. - - is the only allowable child element for a . A element may host no more than one . - - - -## Examples - The following example defines the pictured in the figure above. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - + shows content in continuous scrolling mode. A similar control, , shows content in page-at-a-time viewing mode. Both and are fixed to a particular viewing mode. On the other hand, includes features that enable the user to dynamically choose between various viewing modes (as provided by the enumeration), at the cost of being heavier weight than or . + + The following figure shows a control with its default user interface (UI). + + ![Screenshot: Basic FlowDocumentScrollViewer](~/add/media/flowdocscrollviewer-main.png "Screenshot: Basic FlowDocumentScrollViewer") + + By default, a vertical scrollbar is always shown, and a horizontal scrollbar becomes visible if needed. The default UI for does not include a toolbar; however, the property can be used to enable a built-in toolbar. + + is the only allowable child element for a . A element may host no more than one . + + + +## Examples + The following example defines the pictured in the figure above. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + ]]> @@ -156,19 +156,19 @@ if the level can be decreased; otherwise, . - method decreases the level by the amount specified by the property. The value of this property is subject to the value of the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + method decreases the level by the amount specified by the property. The value of this property is subject to the value of the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -231,19 +231,19 @@ if the level can be increased; otherwise, . - method increases the level by the amount specified by the property. The value of this property is subject to the value of the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + method increases the level by the amount specified by the property. The value of this property is subject to the value of the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -311,13 +311,13 @@ Executes the routed command. - method decreases the current level by the value specified by the property. - - Calling this method has no effect if the property returns `false`. - + method decreases the current level by the value specified by the property. + + Calling this method has no effect if the property returns `false`. + ]]> @@ -410,25 +410,25 @@ Toggles the **Find** dialog. - with default UI. - - ![Screenshot: FlowDocumentScrollViewer find dialog](~/add/media/flowdocscrollviewer-find.png "Screenshot: FlowDocumentScrollViewer find dialog") - - The default **Find** dialog includes a field for entering search text, as well as buttons for **Find Next**, **Find Previous**, and **Options**. The following **Find** options are provided by default: - -- Match whole word only - -- Match case - -- Match diacritic - -- Match kashida - -- Match alef hamza - + with default UI. + + ![Screenshot: FlowDocumentScrollViewer find dialog](~/add/media/flowdocscrollviewer-find.png "Screenshot: FlowDocumentScrollViewer find dialog") + + The default **Find** dialog includes a field for entering search text, as well as buttons for **Find Next**, **Find Previous**, and **Options**. The following **Find** options are provided by default: + +- Match whole word only + +- Match case + +- Match diacritic + +- Match kashida + +- Match alef hamza + ]]> @@ -458,30 +458,30 @@ Gets or sets a value that indicates whether a horizontal scroll bar is shown. One of the values. The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> @@ -544,13 +544,13 @@ Executes the routed command. - method increases the current level by the value specified by the property. - - Calling this method has no effect if the property - + method increases the current level by the value specified by the property. + + Calling this method has no effect if the property + ]]> @@ -582,22 +582,22 @@ Gets or sets a value that indicates whether displays selected text when the control does not have focus. - if the displays selected text when the does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the displays selected text when the does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -650,22 +650,22 @@ Gets a value that indicates whether the has focus and selected text. - if the displays selected text when the text box does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the displays selected text when the text box does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -721,30 +721,30 @@ to indicate that selection is enabled; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> @@ -801,35 +801,35 @@ to indicate that the toolbar is visible; otherwise, . The default is . - toolbar. - - ![Screenshot: FlowDocumentScrollViewer Toolbar](~/add/media/flowdocscrollviewer-toolbar.png "Screenshot: FlowDocumentScrollViewer Toolbar") - - By default, this toolbar is not shown. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + toolbar. + + ![Screenshot: FlowDocumentScrollViewer Toolbar](~/add/media/flowdocscrollviewer-toolbar.png "Screenshot: FlowDocumentScrollViewer Toolbar") + + By default, this toolbar is not shown. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> @@ -914,30 +914,30 @@ Gets or sets the maximum allowable level for the . The maximum allowable level for the , interpreted as a percentage. The default is 200.0 (a maximum zoom of 200%). - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> @@ -999,30 +999,30 @@ Gets or sets the minimum allowable level for the . The minimum allowable level for the , interpreted as a percentage. The default is 80.0 (a minimum zoom of 80%). - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> @@ -1084,13 +1084,13 @@ Builds the visual tree for the . - is called. - - This method overrides . - + is called. + + This method overrides . + ]]> @@ -1120,11 +1120,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1157,13 +1157,13 @@ Arguments of the event. Invoked whenever an unhandled routed event reaches this class in its route. Implement this method to add class handling for this event. - could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled. - + could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled. + ]]> @@ -1194,11 +1194,11 @@ Creates and returns an object for this . An object for this . - . - + . + ]]> @@ -1228,11 +1228,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1262,11 +1262,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1296,11 +1296,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1343,11 +1343,11 @@ A object containing the arguments associated with the routed event. Handles the routed event. - . - + . + ]]> @@ -1380,13 +1380,13 @@ A object containing arguments associated with the routed event. Handles the routed event. - routed event fires. - - This method overrides . - + routed event fires. + + This method overrides . + ]]> @@ -1416,11 +1416,11 @@ Handles the routed command. - command is invoked. - + command is invoked. + ]]> @@ -1489,15 +1489,15 @@ Invokes a standard **Print** dialog which can be used to print the contents of the and configure printing preferences. - user interface (UI) does not provide a **Print** button. - - The following figure shows an example of a standard **Print** dialog. Note that the specific appearance of the **Print** dialog may vary depending on the hosting computer's configuration. - - ![Screenshot: Print dialog box](~/add/media/flowdocrdr-print.png "Screenshot: Print dialog box") - + user interface (UI) does not provide a **Print** button. + + The following figure shows an example of a standard **Print** dialog. Note that the specific appearance of the **Print** dialog may vary depending on the hosting computer's configuration. + + ![Screenshot: Print dialog box](~/add/media/flowdocrdr-print.png "Screenshot: Print dialog box") + ]]> @@ -1528,20 +1528,20 @@ Gets the selected content of the . The selected content of the . - is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). - - - -## Examples - The following example shows how to get the text that a user has selected in the . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window2.xaml" id="Snippet3"::: + is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). + + + +## Examples + The following example shows how to get the text that a user has selected in the . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window2.xaml" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentPageViewer/Selection/Window2.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocSelection/VisualBasic/Window2.xaml.vb" id="Snippet4"::: - +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocSelection/VisualBasic/Window2.xaml.vb" id="Snippet4"::: + ]]> @@ -1570,18 +1570,18 @@ Gets or sets the brush that highlights the selected text. A brush that highlights the selected text. - by setting the and properties. - - - -## Examples - The following example creates a , sets the property to pink, and sets the property to 0.7. - + by setting the and properties. + + + +## Examples + The following example creates a , sets the property to pink, and sets the property to 0.7. + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentScrollViewer/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: - + ]]> @@ -1635,18 +1635,18 @@ Gets or sets the opacity of the . The opacity of the . The default is 0.4. - to 0, the is transparent and is not visible. If you set the to 1.0, the is opaque and the selected text is not visible. - - - -## Examples - The following example creates a , sets the property to pink, and sets the property to 0.7. - + to 0, the is transparent and is not visible. If you set the to 1.0, the is opaque and the selected text is not visible. + + + +## Examples + The following example creates a , sets the property to pink, and sets the property to 0.7. + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/FlowDocumentScrollViewer/SelectionBrush/window1.xaml" id="Snippetselectionbrush"::: - + ]]> @@ -1801,30 +1801,30 @@ Gets or sets a value that indicates whether a vertical scroll bar is shown. One of the values. The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> @@ -1881,31 +1881,31 @@ Gets or sets the current zoom level. The current zoom level, interpreted as a percentage. The default is 100.0 (a zoom level of 100%). - and properties. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + and properties. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> @@ -1939,31 +1939,31 @@ Gets or sets the zoom increment. The current zoom increment, interpreted as a percentage. The default is 10.0 (zoom increments by 10%). - level is increased or decreased when the or commands are executed, respectively. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: - - The following example shows how to set the property programmatically. - + level is increased or decreased when the or commands are executed, respectively. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml" id="Snippet_flowdocumentscrollviewerxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows/TextAlignment/Overview/Window1.xaml.cs" id="Snippet_flowdocumentscrollviewer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/FlowDocumentSnippets/visualbasic/window1.xaml.vb" id="Snippet_flowdocumentscrollviewer"::: + ]]> diff --git a/xml/System.Windows.Controls/KeyTipControl.xml b/xml/System.Windows.Controls/KeyTipControl.xml index bcca610e878..4c5e3113278 100644 --- a/xml/System.Windows.Controls/KeyTipControl.xml +++ b/xml/System.Windows.Controls/KeyTipControl.xml @@ -68,22 +68,22 @@ Gets or sets the text associated with this control. - The text associated with this control. - - The registered default is an empty string. For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The text associated with this control. + + The registered default is an empty string. For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|, | - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|, | + ]]> diff --git a/xml/System.Windows.Controls/MenuItem.xml b/xml/System.Windows.Controls/MenuItem.xml index a8b80dc2f0e..ba7769452fa 100644 --- a/xml/System.Windows.Controls/MenuItem.xml +++ b/xml/System.Windows.Controls/MenuItem.xml @@ -2868,7 +2868,7 @@ the menu selects different item containers; otherwise, . - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. Represents a control designed for entering and handling passwords. - [!IMPORTANT] -> has built-in handling for the bubbling and events. Consequently, custom event handlers that listen for `MouseUp` or `MouseDown` events from a `PasswordBox` will never be called. If you need to respond to these events, listen for the tunneling and events instead, or register the handlers with the argument (this latter option is only available through code). Do not mark the event handled unless you deliberately want to disable native handling of these events, and be aware that this has notable effects on the control's UI. - -## Customizing the PasswordBox Control - To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [PasswordBox Styles and Templates](/dotnet/framework/wpf/controls/passwordbox-styles-and-templates). - +> has built-in handling for the bubbling and events. Consequently, custom event handlers that listen for `MouseUp` or `MouseDown` events from a `PasswordBox` will never be called. If you need to respond to these events, listen for the tunneling and events instead, or register the handlers with the argument (this latter option is only available through code). Do not mark the event handled unless you deliberately want to disable native handling of these events, and be aware that this has notable effects on the control's UI. + +## Customizing the PasswordBox Control + To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [PasswordBox Styles and Templates](/dotnet/framework/wpf/controls/passwordbox-styles-and-templates). + Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. - -[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] - -## Examples - The following example shows how to specify the handler method for the event. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: - - The following example shows the corresponding event handler. In this case, the event handler simply increments a counter. - + +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] + +## Examples + The following example shows how to specify the handler method for the event. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: + + The following example shows the corresponding event handler. In this case, the event handler simply increments a counter. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml.cs" id="Snippet_pwbox_pwchanged"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwbox_pwchanged"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwbox_pwchanged"::: + ]]> WPF Controls Gallery Sample @@ -105,23 +105,23 @@ Gets or sets the brush that specifies the color of the password box's caret. A brush that describes the color of the password box's caret. - property of a to specify the color of its caret. For example, you can set to be the same value as the property. indicates the color of the characters in the . - - - -## Examples - The following example creates a and sets the and to red. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippetpasswordbox"::: - - The preceding example produces output that is similar to the following illustration. - - ![PasswordBox with CaretBrush set to red.](~/add/media/passwordboxcaretbrush.png "PasswordBox with CaretBrush set to red.") -PasswordBox with CaretBrush set to red - + property of a to specify the color of its caret. For example, you can set to be the same value as the property. indicates the color of the characters in the . + + + +## Examples + The following example creates a and sets the and to red. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippetpasswordbox"::: + + The preceding example produces output that is similar to the following illustration. + + ![PasswordBox with CaretBrush set to red.](~/add/media/passwordboxcaretbrush.png "PasswordBox with CaretBrush set to red.") +PasswordBox with CaretBrush set to red + ]]> @@ -176,19 +176,19 @@ PasswordBox with CaretBrush set to red Clears the value of the property. - property is after a call to this method. - - - -## Examples - The following example shows how to clear a with the method. - + property is after a call to this method. + + + +## Examples + The following example shows how to clear a with the method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml.cs" id="Snippet_pwdbox_clear"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_clear"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_clear"::: + ]]> @@ -216,22 +216,22 @@ PasswordBox with CaretBrush set to red Gets or sets a value that indicates whether the displays selected text when the does not have focus. - if the displays selected text when the does not have focus; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the displays selected text when the does not have focus; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -284,22 +284,22 @@ PasswordBox with CaretBrush set to red Gets a value that indicates whether the has focus and selected text. - if the has focus and selected text; otherwise, . - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the has focus and selected text; otherwise, . + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -358,37 +358,37 @@ PasswordBox with CaretBrush set to red Gets or sets the maximum length for passwords to be handled by this . - An integer specifying the maximum length, in characters, for passwords to be handled by this . - - A value of zero (**0**) means no limit. - + An integer specifying the maximum length, in characters, for passwords to be handled by this . + + A value of zero (**0**) means no limit. + The default value is **0** (no length limit). - property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute of a element. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: - - The following example shows how to set the property programmatically. - + property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute of a element. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml.cs" id="Snippet_pwdbox_maxlen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_maxlen"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_maxlen"::: + ]]> @@ -444,11 +444,11 @@ PasswordBox with CaretBrush set to red Called when an internal process or application calls , which is used to build the current template's visual tree. - . - + . + ]]> @@ -1100,25 +1100,25 @@ PasswordBox with CaretBrush set to red Gets or sets the password currently held by the . - A string representing the password currently held by the . - + A string representing the password currently held by the . + The default value is . - property value, you expose the password as plain text in memory. To avoid this potential security risk, use the property to get the password as a . - - Setting this property to `null` causes the underlying password to be set to . - - - -## Examples - The following example shows how to set the property programmatically. - + property value, you expose the password as plain text in memory. To avoid this potential security risk, use the property to get the password as a . + + Setting this property to `null` causes the underlying password to be set to . + + + +## Examples + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml.cs" id="Snippet_pwdbox_pwd"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_pwd"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_pwd"::: + ]]> @@ -1149,31 +1149,31 @@ PasswordBox with CaretBrush set to red Occurs when the value of the property changes. - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|| - - - -## Examples - The following example shows how to specify the handler method for the event. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: - - The following example shows the corresponding event handler. In this case, the event handler simply increments a counter. - + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|| + + + +## Examples + The following example shows how to specify the handler method for the event. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: + + The following example shows the corresponding event handler. In this case, the event handler simply increments a counter. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml.cs" id="Snippet_pwbox_pwchanged"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwbox_pwchanged"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwbox_pwchanged"::: + ]]> @@ -1229,31 +1229,31 @@ PasswordBox with CaretBrush set to red Gets or sets the masking character for the . A masking character to echo when the user enters text into the . The default value is a bullet character (●). - , the masking character specified by this property is echoed in the password input field, rather than the actual password itself. This helps prevent passwords from being exposed to casual observers when they are entered. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the attribute of a element. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: - - The following example shows how to set the property programmatically. - + , the masking character specified by this property is echoed in the password input field, rather than the actual password itself. This helps prevent passwords from being exposed to casual observers when they are entered. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the attribute of a element. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml" id="Snippet_pwbox_pwchangedxaml"::: + + The following example shows how to set the property programmatically. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml.cs" id="Snippet_pwdbox_pwdchar"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_pwdchar"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_pwdchar"::: + ]]> @@ -1309,19 +1309,19 @@ PasswordBox with CaretBrush set to red Replaces the current selection in the with the contents of the Clipboard. - before the paste; it will either replace the current selection with pasted content, or insert the pasted content at the current cursor position. - - - -## Examples - The following example shows how to paste content into a with the method. - + before the paste; it will either replace the current selection with pasted content, or insert the pasted content at the current cursor position. + + + +## Examples + The following example shows how to paste content into a with the method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/Overview/Window1.xaml.cs" id="Snippet_pwdbox_paste"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_paste"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/PasswordBoxSnippets/visualbasic/window1.xaml.vb" id="Snippet_pwdbox_paste"::: + ]]> @@ -1357,11 +1357,11 @@ PasswordBox with CaretBrush set to red Gets the password currently held by the as a . A secure string representing the password currently held by the . - property value, you expose the password as plain text in memory. To avoid this potential security risk, use the property to get the password as a . - + property value, you expose the password as plain text in memory. To avoid this potential security risk, use the property to get the password as a . + ]]> @@ -1419,23 +1419,23 @@ PasswordBox with CaretBrush set to red Gets or sets the brush that highlights selected text. A brush that highlights selected text. - and properties. - - - -## Examples - The following example creates a and sets the property to green and the property to 0.5. - + and properties. + + + +## Examples + The following example creates a and sets the property to green and the property to 0.5. + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippetpasswordbox"::: - - The preceding example produces output that is similar to the following illustration. - - ![PasswordBox with SelectionBrush set to green.](~/add/media/passwordboxselectionbrush.png "PasswordBox with SelectionBrush set to green.") -Selected text in a PasswordBox with SelectionBrush set to green - + + The preceding example produces output that is similar to the following illustration. + + ![PasswordBox with SelectionBrush set to green.](~/add/media/passwordboxselectionbrush.png "PasswordBox with SelectionBrush set to green.") +Selected text in a PasswordBox with SelectionBrush set to green + ]]> @@ -1489,23 +1489,23 @@ Selected text in a PasswordBox with SelectionBrush set to green Gets or sets the opacity of the . The opacity of the . The default is 0.4. - to 0, the is transparent and is not visible. If you set the to 1.0 or greater, the is opaque and the selected text is not visible. - - - -## Examples - The following example creates a and sets the property to green and the property to 0.5. - + to 0, the is transparent and is not visible. If you set the to 1.0 or greater, the is opaque and the selected text is not visible. + + + +## Examples + The following example creates a and sets the property to green and the property to 0.5. + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/PasswordBox/CaretBrush/window1.xaml" id="Snippetpasswordbox"::: - - The preceding example produces output that is similar to the following illustration. - - ![PasswordBox with SelectionBrush set to green.](~/add/media/passwordboxselectionbrush.png "PasswordBox with SelectionBrush set to green.") -Selected text in a PasswordBox with SelectionOpacity set to 0.5 - + + The preceding example produces output that is similar to the following illustration. + + ![PasswordBox with SelectionBrush set to green.](~/add/media/passwordboxselectionbrush.png "PasswordBox with SelectionBrush set to green.") +Selected text in a PasswordBox with SelectionOpacity set to 0.5 + ]]> @@ -1584,11 +1584,11 @@ Selected text in a PasswordBox with SelectionOpacity set to 0.5 Identifies the dependency property. - diff --git a/xml/System.Windows.Controls/ToolTip.xml b/xml/System.Windows.Controls/ToolTip.xml index ac2d1ec3484..a0292c3fb24 100644 --- a/xml/System.Windows.Controls/ToolTip.xml +++ b/xml/System.Windows.Controls/ToolTip.xml @@ -33,42 +33,42 @@ Represents a control that creates a pop-up window that displays information for an element in the interface. - is a , which means that it can contain a single object of any type (such as a string, an image, or a panel). For more information, see the class. - - You use a control to provide information to the user. For example, you can use a to provide the name of a or a in a . The content of a control can vary from a simple text string to more complex content such as a that has embedded text and images. The content of a cannot receive focus. - - A control cannot have a parent. For example, you cannot set the property of a to a Instead, assign a to the and properties. - - You can use a on multiple elements by defining a in a . - - The properties of the class are used to define the position and behavior of the tooltip. Many of these properties are also defined in the class. If the value of one of these properties is specified by both the property and the attached property, the value of the property is used. In addition, the class provides properties to set timing behavior. These attached properties are not included in the class but can be used by the control. - -## Customizing the ToolTip Control - To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [ToolTip Styles and Templates](/dotnet/framework/wpf/controls/tooltip-styles-and-templates). - + is a , which means that it can contain a single object of any type (such as a string, an image, or a panel). For more information, see the class. + + You use a control to provide information to the user. For example, you can use a to provide the name of a or a in a . The content of a control can vary from a simple text string to more complex content such as a that has embedded text and images. The content of a cannot receive focus. + + A control cannot have a parent. For example, you cannot set the property of a to a Instead, assign a to the and properties. + + You can use a on multiple elements by defining a in a . + + The properties of the class are used to define the position and behavior of the tooltip. Many of these properties are also defined in the class. If the value of one of these properties is specified by both the property and the attached property, the value of the property is used. In addition, the class provides properties to set timing behavior. These attached properties are not included in the class but can be used by the control. + +## Customizing the ToolTip Control + To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the , see [ToolTip Styles and Templates](/dotnet/framework/wpf/controls/tooltip-styles-and-templates). + Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. - -[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] - -## Examples - The following examples shows how to define a tooltip control for a element. - - The following example shows how to define a tooltip by assigning text to the property. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Overview/Pane1.xaml" id="Snippet1"::: - - The following example shows how to define a tooltip by assigning a object to the property. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Overview/Pane1.xaml" id="Snippettooltip"::: - - The following example uses code to generate a object. The example creates a (`tt`) and associates it with a . - + +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] + +## Examples + The following examples shows how to define a tooltip control for a element. + + The following example shows how to define a tooltip by assigning text to the property. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Overview/Pane1.xaml" id="Snippet1"::: + + The following example shows how to define a tooltip by assigning a object to the property. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Overview/Pane1.xaml" id="Snippettooltip"::: + + The following example uses code to generate a object. The example creates a (`tt`) and associates it with a . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Overview/Pane1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipSimple/VisualBasic/Window1.xaml.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipSimple/VisualBasic/Window1.xaml.vb" id="Snippet2"::: + ]]> @@ -130,31 +130,31 @@ Occurs when a is closed and is no longer visible. - event is also raised when the control is closed. - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|| - - - -## Examples - The following example shows how to set an event handler for the and events. - + event is also raised when the control is closed. + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|| + + + +## Examples + The following example shows how to set an event handler for the and events. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipeventhandlers"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipeventhandlers"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipeventhandlers"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipopenandclosehandler"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipopenandclosehandler"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipopenandclosehandler"::: + ]]> @@ -222,30 +222,30 @@ Gets or sets the delegate handler method to use to position the . The delegate method that provides placement information for the . The default is . - property must be set to for the callback delegate to be used. - - The delegate returns an array of possible points that are defined with respect to the . When the is displayed, a point is chosen that maximizes the amount of the window that is visible. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| + property must be set to for the callback delegate to be used. + + The delegate returns an array of possible points that are defined with respect to the . When the is displayed, a point is chosen that maximizes the amount of the window that is visible. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| |Metadata properties set to `true`|None| - -## Examples + +## Examples The following example shows how to set the property and create the corresponding delegate. The same technique is used to by the , which is demonstrated in the [Popup Placement Sample](https://github.com/dotnet/dotnet-api-docs/tree/main/snippets/csharp/System.Windows.Controls/ContextMenu/CustomPopupPlacementCallback). - + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/CustomPopupPlacementCallback/Pane1.xaml.cs" id="Snippetcustompopupplacementcallback"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipCustom/visualbasic/pane1.xaml.vb" id="Snippetcustompopupplacementcallback"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipCustom/visualbasic/pane1.xaml.vb" id="Snippetcustompopupplacementcallback"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/CustomPopupPlacementCallback/Pane1.xaml.cs" id="Snippetdelegateinstance"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipCustom/visualbasic/pane1.xaml.vb" id="Snippetdelegateinstance"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipCustom/visualbasic/pane1.xaml.vb" id="Snippetdelegateinstance"::: + ]]> @@ -303,26 +303,26 @@ if the control has a drop shadow; otherwise, . The default is . - opens, the value is set to the value of . Setting this property to `true` has no effect if the property is `false`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to set the property for a control. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: - + opens, the value is set to the value of . Setting this property to `true` has no effect if the property is `false`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to set the property for a control. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: + ]]> @@ -391,31 +391,31 @@ Get or sets the horizontal distance between the target origin and the popup alignment point. - The horizontal distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). The default is 0. + The horizontal distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see Popup Placement Behavior. The default is 0. - by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to create and position a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: - + by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to create and position a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipcode"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: + ]]> @@ -493,18 +493,18 @@ if the is visible; otherwise, . The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -713,31 +713,31 @@ Occurs when a becomes visible. - event is also raised when the control opens. - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|| - - - -## Examples - The following example shows how to set an event handler for the and events. - + event is also raised when the control opens. + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|| + + + +## Examples + The following example shows how to set an event handler for the and events. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipeventhandlers"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipeventhandlers"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipeventhandlers"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipopenandclosehandler"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipopenandclosehandler"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipopenandclosehandler"::: + ]]> @@ -805,29 +805,29 @@ Gets or sets the orientation of the control when it opens, and specifies how the control behaves when it overlaps screen boundaries. A enumeration value that determines the orientation of the control when it opens, and that specifies how the control interacts with screen boundaries. The default is . - by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to create and position a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: - + by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to create and position a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipcode"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: + ]]> @@ -897,29 +897,29 @@ Gets or sets the rectangular area relative to which the control is positioned when it opens. The structure that defines the rectangle that is used to position the control. The default is . - by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to create and position a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: - + by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to create and position a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipcode"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: + ]]> @@ -994,29 +994,29 @@ Gets or sets the relative to which the is positioned when it opens. The that is the logical parent of the control. The default is . - by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to create and position a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: - + by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to create and position a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipcode"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: + ]]> @@ -1146,19 +1146,19 @@ if the stays open until it is closed by the user clicking the mouse button outside the ; otherwise, . The default is . - property is not supported for a when it is not open. To create a tooltip that stays open until the mouse button is pressed when it is outside the tooltip, you must set both the property and the property to `true`. If is set to `false` when the tooltip is not open, a occurs. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property is not supported for a when it is not open. To create a tooltip that stays open until the mouse button is pressed when it is outside the tooltip, you must set both the property and the property to `true`. If is set to `false` when the tooltip is not open, a occurs. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Occurs when is set to when a tooltip is not open. @@ -1227,31 +1227,31 @@ Get or sets the vertical distance between the target origin and the popup alignment point. - The vertical distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). The default is 0. + The vertical distance between the target origin and the popup alignment point. For information about the target origin and popup alignment point, see Popup Placement Behavior. The default is 0. - by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to create and position a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: - + by setting the , , , , and properties. These properties behave the same as they do for a . For more information, see [Popup Placement Behavior](/dotnet/framework/wpf/controls/popup-placement-behavior). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to create and position a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml" id="Snippettooltip"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ToolTip/Closed/Pane1.xaml.cs" id="Snippettooltipcode"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ToolTipService/visualbasic/pane1.xaml.vb" id="Snippettooltipcode"::: + ]]> diff --git a/xml/System.Windows.Data/Binding.xml b/xml/System.Windows.Data/Binding.xml index 3db07cdb525..c8f14508725 100644 --- a/xml/System.Windows.Data/Binding.xml +++ b/xml/System.Windows.Data/Binding.xml @@ -22,37 +22,37 @@ Provides high-level access to the definition of a binding, which connects the properties of binding target objects (typically, WPF elements), and any data source (for example, a database, an XML file, or any object that contains data). - class or one of the other classes that inherit . Regardless of what object you are binding and the nature of your data source, each binding follows the model illustrated by the following figure. - - ![Basic data binding diagram](~/add/media/databindingmostbasic.png "Basic data binding diagram") - - The figure demonstrates the following fundamental WPF data binding concepts. - -- Each binding typically has these four components: a binding target object, a target property, a binding source, and a to the value in the binding source to use. For example, if you want to bind the content of a to the Name property of an Employee object, your target object is the , the target property is the property, the value to use is Name, and the source object is the Employee object. - -- The target property must be a dependency property. This also means that you cannot bind a field. Most properties of objects are dependency properties and most dependency properties, except read-only ones, support data binding by default. (Only types can define dependency properties and all objects derive from .) - -- Although not specified in the figure, it should be noted that the binding source object is not restricted to being a custom CLR object. WPF data binding supports data in the form of CLR objects and XML. To provide some examples, your binding source may be a , any list object, a CLR object that is associated with ADO.NET data or Web Services, or an XmlNode that contains your XML data. - - Use the property to specify the direction of the data flow. To detect source changes in one-way or two-way bindings, the source must implement a suitable property change notification mechanism such as . For an example, see [How to: Implement Property Change Notification](/dotnet/framework/wpf/data/how-to-implement-property-change-notification). The property specifies the timing of source updates. For more information, see "Basic Data Binding Concepts" in [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Values - *declaration* - Zero or more attribute-assignment clauses separated by commas (,). For more information, see [Binding Markup Extension](/dotnet/framework/wpf/advanced/binding-markup-extension) or [Binding Declarations Overview](/dotnet/framework/wpf/data/binding-declarations-overview). - + class or one of the other classes that inherit . Regardless of what object you are binding and the nature of your data source, each binding follows the model illustrated by the following figure. + + ![Basic data binding diagram](~/add/media/databindingmostbasic.png "Basic data binding diagram") + + The figure demonstrates the following fundamental WPF data binding concepts. + +- Each binding typically has these four components: a binding target object, a target property, a binding source, and a to the value in the binding source to use. For example, if you want to bind the content of a to the Name property of an Employee object, your target object is the , the target property is the property, the value to use is Name, and the source object is the Employee object. + +- The target property must be a dependency property. This also means that you cannot bind a field. Most properties of objects are dependency properties and most dependency properties, except read-only ones, support data binding by default. (Only types can define dependency properties and all objects derive from .) + +- Although not specified in the figure, it should be noted that the binding source object is not restricted to being a custom CLR object. WPF data binding supports data in the form of CLR objects and XML. To provide some examples, your binding source may be a , any list object, a CLR object that is associated with ADO.NET data or Web Services, or an XmlNode that contains your XML data. + + Use the property to specify the direction of the data flow. To detect source changes in one-way or two-way bindings, the source must implement a suitable property change notification mechanism such as . For an example, see [How to: Implement Property Change Notification](/dotnet/framework/wpf/data/how-to-implement-property-change-notification). The property specifies the timing of source updates. For more information, see "Basic Data Binding Concepts" in [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Values + *declaration* + Zero or more attribute-assignment clauses separated by commas (,). For more information, see [Binding Markup Extension](/dotnet/framework/wpf/advanced/binding-markup-extension) or [Binding Declarations Overview](/dotnet/framework/wpf/data/binding-declarations-overview). + ]]> @@ -148,11 +148,11 @@ The handler to add. Adds a handler for the attached event. - @@ -187,11 +187,11 @@ The handler to add. Adds a handler for the attached event. - @@ -272,11 +272,11 @@ to evaluate the path relative to the data item itself; otherwise, . The default is . - objects. In this case, the binding engine evaluates the relative to the object obtained from the property. In addition, the binding listens for the event and reacts accordingly. Setting this property to `true` overrides this behavior and gives the binding access to properties of the object itself. - + objects. In this case, the binding engine evaluates the relative to the object obtained from the property. In addition, the binding listens for the event and reacts accordingly. Setting this property to `true` overrides this behavior and gives the binding access to properties of the object itself. + ]]> @@ -318,25 +318,25 @@ Gets or sets the converter to use. A value of type . The default is . - interface and supply implementations for the and methods. Value converters can change data from one type to another, translate between cultural details such as character sets, or modify other aspects of their presentation. For examples of typical conversion scenarios, see "Data Conversion" in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Values - *myConverter* - A resource reference to a class that implements the interface, which includes implementations of the and methods. To refer to a value converter, use the [StaticResource Markup Extension](/dotnet/framework/wpf/advanced/staticresource-markup-extension). - + interface and supply implementations for the and methods. Value converters can change data from one type to another, translate between cultural details such as character sets, or modify other aspects of their presentation. For examples of typical conversion scenarios, see "Data Conversion" in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Values + *myConverter* + A resource reference to a class that implements the interface, which includes implementations of the and methods. To refer to a value converter, use the [StaticResource Markup Extension](/dotnet/framework/wpf/advanced/staticresource-markup-extension). + ]]> @@ -380,13 +380,13 @@ Gets or sets the culture in which to evaluate the converter. The default is . - @@ -426,13 +426,13 @@ Gets or sets the parameter to pass to the . The parameter to pass to the . The default is . - property to specify how an object is converted. This property passes additional information to a converter that you use on a binding. When you specify a , the value is passed to the and methods as the `parameter` parameter. - - For an example, see [How to: Produce a Value Based on a List of Bound Items](/dotnet/framework/wpf/data/how-to-produce-a-value-based-on-a-list-of-bound-items). That example shows an implementation of an but the usage still applies. - + property to specify how an object is converted. This property passes additional information to a converter that you use on a binding. When you specify a , the value is passed to the and methods as the `parameter` parameter. + + For an example, see [How to: Produce a Value Based on a List of Bound Items](/dotnet/framework/wpf/data/how-to-produce-a-value-based-on-a-list-of-bound-items). That example shows an implementation of an but the usage still applies. + ]]> @@ -461,11 +461,11 @@ Used as a returned value to instruct the binding engine to not perform any action. - to instruct the binding engine to not perform any action. For example, return this field to instruct the binding engine to not transfer a value to the binding target, not move to the next in a , or not use the `FallBackValue` or default value. - + to instruct the binding engine to not perform any action. For example, return this field to instruct the binding engine to not transfer a value to the binding target, not move to the next in a , or not use the `FallBackValue` or default value. + ]]> @@ -503,19 +503,19 @@ Gets or sets the name of the element to use as the binding source object. - The value of the property or [x:Name Directive](/dotnet/framework/xaml-services/x-name-directive) of the element of interest. You can refer to elements in code only if they are registered to the appropriate through . For more information, see [WPF XAML Namescopes](/dotnet/framework/wpf/advanced/wpf-xaml-namescopes). - + The value of the property or x:Name Directive of the element of interest. You can refer to elements in code only if they are registered to the appropriate through . For more information, see WPF XAML Namescopes. + The default is . - to control the height of another control in your application, or if you want to bind the of your control to the property of your control. - - By default, bindings inherit the data context specified by the `DataContext` property, if one has been set. However, the property is one of the ways you can explicitly set the source of a and override the inherited data context. For more information, see [How to: Specify the Binding Source](/dotnet/framework/wpf/data/how-to-specify-the-binding-source). - - The and properties of the class also enable you to set the source of the binding explicitly. However, only one of the three properties, , , and , should be set for each binding, or a conflict might occur. This property throws an exception if there is a binding source conflict. - + to control the height of another control in your application, or if you want to bind the of your control to the property of your control. + + By default, bindings inherit the data context specified by the `DataContext` property, if one has been set. However, the property is one of the ways you can explicitly set the source of a and override the inherited data context. For more information, see [How to: Specify the Binding Source](/dotnet/framework/wpf/data/how-to-specify-the-binding-source). + + The and properties of the class also enable you to set the source of the binding explicitly. However, only one of the three properties, , , and , should be set for each binding, or a conflict might occur. This property throws an exception if there is a binding source conflict. + ]]> @@ -549,17 +549,17 @@ Returns an XML namespace manager object used by the binding attached to the specified object. A returned object used for viewing XML namespaces that relate to the binding on the passed object element. This object should be cast as . - attached property. - - XML namespace managers are relevant only if the data in the binding came from an XML binding source ( object). - - If a namespace manager was not specifically applied either in the original data source creation or by subsequently calling on the binding, then this method will return `null`. - - This method will always return `null` if the data behind the binding is not XML. - + attached property. + + XML namespace managers are relevant only if the data in the binding came from an XML binding source ( object). + + If a namespace manager was not specifically applied either in the original data source creation or by subsequently calling on the binding, then this method will return `null`. + + This method will always return `null` if the data behind the binding is not XML. + ]]> The parameter cannot be . @@ -626,15 +626,15 @@ Gets or sets a value that indicates whether the should get and set values asynchronously. The default is . - property when the `get` accessor of your binding source property might take a long time. One example is an image property with a `get` accessor that downloads from the Web. Setting to `true` avoids blocking the UI while the download occurs. - - While waiting for the value to arrive, the binding reports the , if one is available, or the default value of the binding target property. - - However, there should not be many scenarios where you need to use the property. The .NET guidelines recommend against defining properties that are orders of magnitude slower than a field set would be. When you are creating your class, consider handling extremely slow operations outside of the `get` accessor and caching the result. - + property when the `get` accessor of your binding source property might take a long time. One example is an image property with a `get` accessor that downloads from the Web. Setting to `true` avoids blocking the UI while the download occurs. + + While waiting for the value to arrive, the binding reports the , if one is available, or the default value of the binding target property. + + However, there should not be many scenarios where you need to use the property. The .NET guidelines recommend against defining properties that are orders of magnitude slower than a field set would be. When you are creating your class, consider handling extremely slow operations outside of the `get` accessor and caching the result. + ]]> @@ -672,19 +672,19 @@ Gets or sets a value that indicates the direction of the data flow in the binding. - One of the values. The default is , which returns the default binding mode value of the target dependency property. However, the default value varies for each dependency property. In general, user-editable control properties, such as those of text boxes and check boxes, default to two-way bindings, whereas most other properties default to one-way bindings. - + One of the values. The default is , which returns the default binding mode value of the target dependency property. However, the default value varies for each dependency property. In general, user-editable control properties, such as those of text boxes and check boxes, default to two-way bindings, whereas most other properties default to one-way bindings. + A programmatic way to determine whether a dependency property binds one-way or two-way by default is to get the property metadata of the property using and then check the Boolean value of the property. - and bindings, the underlying data must implement . For details, see [How to: Implement Property Change Notification](/dotnet/framework/wpf/data/how-to-implement-property-change-notification). - - For or bindings, you can control the target-to-source updates by setting the property. For more information, see . - - For more information on the different binding modes, see [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). - + and bindings, the underlying data must implement . For details, see [How to: Implement Property Change Notification](/dotnet/framework/wpf/data/how-to-implement-property-change-notification). + + For or bindings, you can control the target-to-source updates by setting the property. For more information, see . + + For more information on the different binding modes, see [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). + ]]> @@ -791,13 +791,13 @@ if the attached event should be raised on the bound object when there is a validation error during source updates; otherwise, . The default is . - associated with it, the binding engine checks each rule each time it transfers the target property value to the source property. If a rule invalidates a value, the binding engine creates a object and adds it to the . collection of the bound object. When the property is not empty, the attached property of the object is set to `true`. If the property of the is set to `true`, then the binding engine raises the attached event on the object. - - For a detailed discussion of the validation process, see the Data Validation section in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). - + associated with it, the binding engine checks each rule each time it transfers the target property value to the source property. If a rule invalidates a value, the binding engine creates a object and adds it to the . collection of the bound object. When the property is not empty, the attached property of the object is set to `true`. If the property of the is set to `true`, then the binding engine raises the attached event on the object. + + For a detailed discussion of the validation process, see the Data Validation section in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). + ]]> @@ -833,44 +833,44 @@ Gets or sets the path to the binding source property. The path to the binding source. The default is . - property to specify the source value you want to bind to: - -- In the simplest case, the property value is the name of the property of the source object to use for the binding, such as `Path=PropertyName`. - -- Subproperties of a property can be specified by a syntax similar to that used in C#. For instance, the clause `Path=ShoppingCart.Order` sets the binding to the subproperty `Order` of the object or property `ShoppingCart`. - -- To bind to an attached property, place parentheses around the attached property. For example, to bind to the attached property , the syntax is `Path=(DockPanel.Dock)`. - -- Indexers of a property can be specified within square brackets following the property name where the indexer is applied. For instance, the clause `Path=ShoppingCart[0]` sets the binding to the index that corresponds to how your property's internal indexing handles the literal string "0". Multiple indexers are also supported. - -- Indexers and subproperties can be mixed in a `Path` clause; for example, `Path=ShoppingCart.ShippingInfo[MailingAddress,Street].` - -- Inside indexers you can have multiple indexer parameters separated by commas (,). The type of each parameter can be specified with parentheses. For example, you can have `Path="[(sys:Int32)42,(sys:Int32)24]"`, where `sys` is mapped to the `System` namespace. - -- When the source is a collection view, the current item can be specified with a slash (/). For example, the clause `Path=/` sets the binding to the current item in the view. When the source is a collection, this syntax specifies the current item of the default collection view. - -- Property names and slashes can be combined to traverse properties that are collections. For example, `Path=/Offices/ManagerName` specifies the current item of the source collection, which contains an `Offices` property that is also a collection. Its current item is an object that contains a `ManagerName` property. - -- Optionally, a period (.) path can be used to bind to the current source. For example, `Text="{Binding}"` is equivalent to `Text="{Binding Path=.}"`. - - For information about path syntax, see [Binding Declarations Overview](/dotnet/framework/wpf/data/binding-declarations-overview) or [PropertyPath XAML Syntax](/dotnet/framework/wpf/advanced/propertypath-xaml-syntax). - - For XML bindings, see the property. - - To bind to an entire object, you do not need to specify the property. For more information, see "Specifying the Path to the Value" in [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). - - - -## Examples - The following example shows a style trigger that creates a that reports a validation error message. The value of the setter binds to the error content of the current (the using the style) using the property. For more information on this example, see [How to: Implement Binding Validation](/dotnet/framework/wpf/data/how-to-implement-binding-validation). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml" id="Snippet5"::: - + property to specify the source value you want to bind to: + +- In the simplest case, the property value is the name of the property of the source object to use for the binding, such as `Path=PropertyName`. + +- Subproperties of a property can be specified by a syntax similar to that used in C#. For instance, the clause `Path=ShoppingCart.Order` sets the binding to the subproperty `Order` of the object or property `ShoppingCart`. + +- To bind to an attached property, place parentheses around the attached property. For example, to bind to the attached property , the syntax is `Path=(DockPanel.Dock)`. + +- Indexers of a property can be specified within square brackets following the property name where the indexer is applied. For instance, the clause `Path=ShoppingCart[0]` sets the binding to the index that corresponds to how your property's internal indexing handles the literal string "0". Multiple indexers are also supported. + +- Indexers and subproperties can be mixed in a `Path` clause; for example, `Path=ShoppingCart.ShippingInfo[MailingAddress,Street].` + +- Inside indexers you can have multiple indexer parameters separated by commas (,). The type of each parameter can be specified with parentheses. For example, you can have `Path="[(sys:Int32)42,(sys:Int32)24]"`, where `sys` is mapped to the `System` namespace. + +- When the source is a collection view, the current item can be specified with a slash (/). For example, the clause `Path=/` sets the binding to the current item in the view. When the source is a collection, this syntax specifies the current item of the default collection view. + +- Property names and slashes can be combined to traverse properties that are collections. For example, `Path=/Offices/ManagerName` specifies the current item of the source collection, which contains an `Offices` property that is also a collection. Its current item is an object that contains a `ManagerName` property. + +- Optionally, a period (.) path can be used to bind to the current source. For example, `Text="{Binding}"` is equivalent to `Text="{Binding Path=.}"`. + + For information about path syntax, see [Binding Declarations Overview](/dotnet/framework/wpf/data/binding-declarations-overview) or [PropertyPath XAML Syntax](/dotnet/framework/wpf/advanced/propertypath-xaml-syntax). + + For XML bindings, see the property. + + To bind to an entire object, you do not need to specify the property. For more information, see "Specifying the Path to the Value" in [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). + + + +## Examples + The following example shows a style trigger that creates a that reports a validation error message. The value of the setter binds to the error content of the current (the using the style) using the property. For more information on this example, see [How to: Implement Binding Validation](/dotnet/framework/wpf/data/how-to-implement-binding-validation). + + :::code language="xaml" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml" id="Snippet5"::: + ]]> @@ -910,24 +910,24 @@ Gets or sets the binding source by specifying its location relative to the position of the binding target. A object specifying the relative location of the binding source to use. The default is . - property is one of the ways you can explicitly set the source of a and override the inherited data context. For more information, see [How to: Specify the Binding Source](/dotnet/framework/wpf/data/how-to-specify-the-binding-source). - - The and properties also enable you to set the source of the binding explicitly. However, only one of the three properties, , , and , should be set for each binding, or a conflict can occur. This property throws an exception if there is a binding source conflict. - - For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). - -## Examples - The following example shows a style trigger that creates a that reports a validation error message. The value of the setter binds to the error content of the current (the using the style) using the property. For more information on this example, see [How to: Implement Binding Validation](/dotnet/framework/wpf/data/how-to-implement-binding-validation). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml" id="Snippet5"::: - - To see the full example, see [Binding Validation Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/BindValidation). - + property is one of the ways you can explicitly set the source of a and override the inherited data context. For more information, see [How to: Specify the Binding Source](/dotnet/framework/wpf/data/how-to-specify-the-binding-source). + + The and properties also enable you to set the source of the binding explicitly. However, only one of the three properties, , , and , should be set for each binding, or a conflict can occur. This property throws an exception if there is a binding source conflict. + + For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). + +## Examples + The following example shows a style trigger that creates a that reports a validation error message. The value of the setter binds to the error content of the current (the using the style) using the property. For more information on this example, see [How to: Implement Binding Validation](/dotnet/framework/wpf/data/how-to-implement-binding-validation). + + :::code language="xaml" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml" id="Snippet5"::: + + To see the full example, see [Binding Validation Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/BindValidation). + ]]> @@ -963,11 +963,11 @@ The handler to remove. Removes a handler for the attached event. - @@ -1002,11 +1002,11 @@ The handler to remove. Removes a handler for the attached event. - @@ -1041,11 +1041,11 @@ The to use for namespace evaluation in the passed element. Sets a namespace manager object used by the binding attached to the provided element. - attached property. - + attached property. + ]]> @@ -1085,11 +1085,11 @@ if the property value has changed from its default; otherwise, . - property does not have a simple default value. This method indicates whether the property has changed from its default value. You typically invoke this method if you are either developing a designer for the or developing your own control incorporating the . - + property does not have a simple default value. This method indicates whether the property has changed from its default value. You typically invoke this method if you are either developing a designer for the or developing your own control incorporating the . + ]]> @@ -1127,11 +1127,11 @@ if the property value has changed from its default; otherwise, . - property does not have a simple default value. This method indicates whether the property has changed from its default value. You typically invoke this method if you are either developing a designer for the or developing your own control incorporating the . - + property does not have a simple default value. This method indicates whether the property has changed from its default value. You typically invoke this method if you are either developing a designer for the or developing your own control incorporating the . + ]]> @@ -1169,11 +1169,11 @@ if the property value has changed from its default; otherwise, . - property does not have a simple default value. This method indicates whether the property has changed from its default value. You typically invoke this method if you are either developing a designer for the or developing your own control incorporating the . - + property does not have a simple default value. This method indicates whether the property has changed from its default value. You typically invoke this method if you are either developing a designer for the or developing your own control incorporating the . + ]]> @@ -1203,42 +1203,42 @@ Gets or sets the object to use as the binding source. The object to use as the binding source. - property is one of the ways you can explicitly set the source of a and override the inherited data context. If you do not need the functionality of establishing a scope in which several properties inherit the same data context, you can use the property instead of the `DataContext` property. - - The and properties also enable you to set the source of the binding explicitly. However, only one of the three properties, , , and , should be set for each binding, or a conflict can occur. This property throws an exception if there is a binding source conflict. - - To clear this property, set it to . - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Values - *object* - An existing object. To refer to an existing object, use the [StaticResource Markup Extension](/dotnet/framework/wpf/advanced/staticresource-markup-extension) - - - -## Examples - The following example uses a `Person` object with a string property named `PersonName` that is defined in the `SDKSample` namespace, as the first highlighted line shows. In the highlighted line that contains the `` element, it instantiates the `Person` object with a `PersonName` property value of `Joe`. This is done in the `Resources` section and assigned an `x:Key`. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Data/Binding/Source/Page1.xaml?highlight=4,9,37"::: - - The highlighted line that contains the `` elements shows how to bind to the `PersonName` property. As a result, the control appears with the value "Joe". - - In the following example, the values of the objects are set to the `static` property : - - :::code language="xaml" source="~/snippets/csharp/System.Windows/DataTemplate/Triggers/AddProductWindow.xaml" id="Snippetcomboboxmultibinding"::: - - For the full example, see [Data Binding Demo](https://go.microsoft.com/fwlink/?LinkID=163703). - + property is one of the ways you can explicitly set the source of a and override the inherited data context. If you do not need the functionality of establishing a scope in which several properties inherit the same data context, you can use the property instead of the `DataContext` property. + + The and properties also enable you to set the source of the binding explicitly. However, only one of the three properties, , , and , should be set for each binding, or a conflict can occur. This property throws an exception if there is a binding source conflict. + + To clear this property, set it to . + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Values + *object* + An existing object. To refer to an existing object, use the [StaticResource Markup Extension](/dotnet/framework/wpf/advanced/staticresource-markup-extension) + + + +## Examples + The following example uses a `Person` object with a string property named `PersonName` that is defined in the `SDKSample` namespace, as the first highlighted line shows. In the highlighted line that contains the `` element, it instantiates the `Person` object with a `PersonName` property value of `Joe`. This is done in the `Resources` section and assigned an `x:Key`. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Data/Binding/Source/Page1.xaml?highlight=4,9,37"::: + + The highlighted line that contains the `` elements shows how to bind to the `PersonName` property. As a result, the control appears with the value "Joe". + + In the following example, the values of the objects are set to the `static` property : + + :::code language="xaml" source="~/snippets/csharp/System.Windows/DataTemplate/Triggers/AddProductWindow.xaml" id="Snippetcomboboxmultibinding"::: + + For the full example, see [Data Binding Demo](https://go.microsoft.com/fwlink/?LinkID=163703). + ]]> @@ -1263,19 +1263,19 @@ Occurs when a value is transferred from the binding target to the binding source, but only for bindings with the value set to . - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|, constrained to .| - + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|, constrained to .| + ]]> @@ -1328,19 +1328,19 @@ Occurs when a value is transferred from the binding source to the binding target, but only for bindings with the value set to . - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|, constrained to .| - + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|, constrained to .| + ]]> @@ -1412,30 +1412,30 @@ Gets or sets a handler you can use to provide custom logic for handling exceptions that the binding engine encounters during the update of the binding source value. This is only applicable if you have associated an with your binding. A method that provides custom logic for handling exceptions that the binding engine encounters during the update of the binding source value. - is a built-in validation rule that checks for exceptions thrown during the update of the binding source property. If you have associated the with your object, you can use this property to set a handler to provide custom logic for handling these exceptions. If an is not specified on the , the binding engine creates a with the exception and adds it to the collection of the bound element. - - - -## Examples - The property of the following is data-bound to a source property `Age3` that is of type `int`. The checks for exceptions that are thrown during the update of the source property (such as when the user enters a value that cannot be converted to an integer). - - :::code language="xaml" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml" id="Snippettbexceptionfilter"::: - - You can provide custom logic to handle those exceptions. The following example shows how to use the property to set an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml.cs" id="Snippetfiltercallback"::: - - The following is an example implementation of an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml.cs" id="Snippethandler"::: - - The can also return `null`, the exception itself, or a . For more information, see . - - For the complete sample, see [Binding Validation Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/BindValidation). - + is a built-in validation rule that checks for exceptions thrown during the update of the binding source property. If you have associated the with your object, you can use this property to set a handler to provide custom logic for handling these exceptions. If an is not specified on the , the binding engine creates a with the exception and adds it to the collection of the bound element. + + + +## Examples + The property of the following is data-bound to a source property `Age3` that is of type `int`. The checks for exceptions that are thrown during the update of the source property (such as when the user enters a value that cannot be converted to an integer). + + :::code language="xaml" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml" id="Snippettbexceptionfilter"::: + + You can provide custom logic to handle those exceptions. The following example shows how to use the property to set an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml.cs" id="Snippetfiltercallback"::: + + The following is an example implementation of an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows/Setter/Value/Window1.xaml.cs" id="Snippethandler"::: + + The can also return `null`, the exception itself, or a . For more information, see . + + For the complete sample, see [Binding Validation Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/BindValidation). + ]]> @@ -1469,17 +1469,17 @@ Gets or sets a value that determines the timing of binding source updates. - One of the values. The default is , which returns the default value of the target dependency property. However, the default value for most dependency properties is , while the property has a default value of . - + One of the values. The default is , which returns the default value of the target dependency property. However, the default value for most dependency properties is , while the property has a default value of . + A programmatic way to determine the default value of a dependency property is to get the property metadata of the property using and then check the value of the property. - or listen for changes in the target property and propagate them back to the source. This is known as updating the source. Usually, these updates happen whenever the target property changes. This is fine for check boxes and other simple controls, but it is usually not appropriate for text fields. Updating after every keystroke can diminish performance and it denies the user the usual opportunity to backspace and fix typing errors before committing to the new value. Therefore, the default value of the property is and not . - - If you set the value to , you must call the method or the changes will not propagate back to the source. - + or listen for changes in the target property and propagate them back to the source. This is known as updating the source. Usually, these updates happen whenever the target property changes. This is fine for check boxes and other simple controls, but it is usually not appropriate for text fields. Updating after every keystroke can diminish performance and it denies the user the usual opportunity to backspace and fix typing errors before committing to the new value. Therefore, the default value of the property is and not . + + If you set the value to , you must call the method or the changes will not propagate back to the source. + ]]> @@ -1517,25 +1517,25 @@ to include the ; otherwise, . - element explicitly. The is a built-in validation rule that checks for errors that are raised by the implementation of the source object. If an error is raised, the binding engine creates a with the error and adds it to the collection of the bound element. The lack of an error clears this validation feedback, unless another rule raises a validation issue. - - is introduced in the .NET Framework version 3.5. For more information, see [.NET Framework Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). - - - -## Examples - The following examples uses and to validate user input in a . The first example creates a data type that implements to report validation errors. - + element explicitly. The is a built-in validation rule that checks for errors that are raised by the implementation of the source object. If an error is raised, the binding engine creates a with the error and adds it to the collection of the bound element. The lack of an error clears this validation feedback, unless another rule raises a validation issue. + + is introduced in the .NET Framework version 3.5. For more information, see [.NET Framework Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). + + + +## Examples + The following examples uses and to validate user input in a . The first example creates a data type that implements to report validation errors. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Data/Binding/ValidatesOnDataErrors/data.cs" id="Snippetidataerrorinfodata"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/bindingvalidationattributessnippets/visualbasic/window1.xaml.vb" id="Snippetidataerrorinfodata"::: - - The following example binds the `Age` property to the and sets to `true` on the . When the user enters an invalid value, a red border appears in the and the reports the error message. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Data/Binding/ValidatesOnDataErrors/window1.xaml" id="Snippetidataerrorinfoxaml"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/bindingvalidationattributessnippets/visualbasic/window1.xaml.vb" id="Snippetidataerrorinfodata"::: + + The following example binds the `Age` property to the and sets to `true` on the . When the user enters an invalid value, a red border appears in the and the reports the error message. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Data/Binding/ValidatesOnDataErrors/window1.xaml" id="Snippetidataerrorinfoxaml"::: + ]]> @@ -1573,25 +1573,25 @@ to include the ; otherwise, . - element explicitly. The is a built-in validation rule that checks for exceptions that are thrown during the update of the source property. If an exception is thrown, the binding engine creates a with the exception and adds it to the collection of the bound element. The lack of an error clears this validation feedback, unless another rule raises a validation issue. - - is introduced in the .NET Framework version 3.5. For more information, see [.NET Framework Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). - - - -## Examples - The following examples use to validate user input in a . The first example creates a data type that throws an exception when the `Age` property is set to an invalid property. - + element explicitly. The is a built-in validation rule that checks for exceptions that are thrown during the update of the source property. If an exception is thrown, the binding engine creates a with the exception and adds it to the collection of the bound element. The lack of an error clears this validation feedback, unless another rule raises a validation issue. + + is introduced in the .NET Framework version 3.5. For more information, see [.NET Framework Versions and Dependencies](/dotnet/framework/migration-guide/versions-and-dependencies). + + + +## Examples + The following examples use to validate user input in a . The first example creates a data type that throws an exception when the `Age` property is set to an invalid property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Data/Binding/ValidatesOnDataErrors/data.cs" id="Snippetthrowexceptiondata"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/bindingvalidationattributessnippets/visualbasic/window1.xaml.vb" id="Snippetthrowexceptiondata"::: - - The following example binds the `Age` property to the and sets to `true` on the . When the user enters an invalid value, a red border appears in the and the reports the error message. - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Data/Binding/ValidatesOnDataErrors/window1.xaml" id="Snippetthrowexceptionxaml"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/bindingvalidationattributessnippets/visualbasic/window1.xaml.vb" id="Snippetthrowexceptiondata"::: + + The following example binds the `Age` property to the and sets to `true` on the . When the user enters an invalid value, a red border appears in the and the reports the error message. + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Data/Binding/ValidatesOnDataErrors/window1.xaml" id="Snippetthrowexceptionxaml"::: + ]]> @@ -1628,11 +1628,11 @@ to include the ; otherwise, . The default is . - is `true`, the binding checks for and reports errors that are raised by a data source that implements . - + is `true`, the binding checks for and reports errors that are raised by a data source that implements . + ]]> @@ -1662,33 +1662,33 @@ Gets a collection of rules that check the validity of the user input. A collection of objects. - with your or object. You can create custom rules by deriving from the class and implementing the method, or you can use the built-in , which invalidates a value if there are exceptions during source updates. - - The binding engine checks each associated with a binding each time an input value (the binding target property value) is transferred to the binding source property. For a detailed discussion of the validation process, see the Data Validation section in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). - + with your or object. You can create custom rules by deriving from the class and implementing the method, or you can use the built-in , which invalidates a value if there are exceptions during source updates. + + The binding engine checks each associated with a binding each time an input value (the binding target property value) is transferred to the binding source property. For a detailed discussion of the validation process, see the Data Validation section in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). + > [!NOTE] -> This property can be set in Extensible Application Markup Language (XAML) only by using the collection syntax shown, or by accessing the collection object and using its various methods, such as `Add`. The property to access the collection object is read-only, whereas the collection itself is read-write. - - -## XAML Property Element Usage - -``` - - - oneOrMoreValidationRules - - - -``` - - -## XAML Values - *oneOrMoreValidationRules* - One or more objects. You can use the class or create custom rules by subclassing the class. - +> This property can be set in Extensible Application Markup Language (XAML) only by using the collection syntax shown, or by accessing the collection object and using its various methods, such as `Add`. The property to access the collection object is read-only, whereas the collection itself is read-write. + + +## XAML Property Element Usage + +``` + + + oneOrMoreValidationRules + + + +``` + + +## XAML Values + *oneOrMoreValidationRules* + One or more objects. You can use the class or create custom rules by subclassing the class. + ]]> @@ -1714,19 +1714,19 @@ Gets or sets the used to perform namespace-aware queries in XML bindings. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1792,17 +1792,17 @@ Gets or sets an query that returns the value on the XML binding source to use. The query. The default is . - property is used instead of the property to indicate the path to the value on the binding source to use. - - By setting the property, you are creating an `XPath` query to select a node or a collection of nodes ( and both derive from ). is a common language runtime (CLR) object, which means you can bind to its properties using the property. - - The method handles the `XPath` expressions from the property. `XPath` functions are not supported. For `XPath` expression information, see the documentation and some examples provided in the Example section. - - LINQ to XML objects and do not use `XPath`. For details, see [How to: Bind to XDocument, XElement, or LINQ for XML Query Results](/dotnet/framework/wpf/data/how-to-bind-to-xdocument-xelement-or-linq-for-xml-query-results). - + property is used instead of the property to indicate the path to the value on the binding source to use. + + By setting the property, you are creating an `XPath` query to select a node or a collection of nodes ( and both derive from ). is a common language runtime (CLR) object, which means you can bind to its properties using the property. + + The method handles the `XPath` expressions from the property. `XPath` functions are not supported. For `XPath` expression information, see the documentation and some examples provided in the Example section. + + LINQ to XML objects and do not use `XPath`. For details, see [How to: Bind to XDocument, XElement, or LINQ for XML Query Results](/dotnet/framework/wpf/data/how-to-bind-to-xdocument-xelement-or-linq-for-xml-query-results). + ]]> diff --git a/xml/System.Windows.Data/CollectionViewSource.xml b/xml/System.Windows.Data/CollectionViewSource.xml index 6285752bc09..e478be3b01d 100644 --- a/xml/System.Windows.Data/CollectionViewSource.xml +++ b/xml/System.Windows.Data/CollectionViewSource.xml @@ -29,17 +29,17 @@ The Extensible Application Markup Language (XAML) proxy of a class. - is a proxy for a class, or a class derived from . enables XAML code to set the commonly used properties, passing these settings to the underlying view. has a property that holds the actual view and a property that holds the source collection. - - You can think of a collection view as the layer on top of the binding source collection that allows you to navigate and display the collection based on sort, filter, and group queries, all without having to manipulate the underlying source collection itself. If the source collection implements the interface, the changes raised by the event are propagated to the views. - - Because views do not change the underlying source collections, each source collection can have multiple views associated with it. For example, you may have a collection of `Task` objects. With the use of views, you can display that same data in different ways. For example, on the left side of your page you may want to show tasks sorted by priority, and on the right side, grouped by area. - - For more information, see the Binding to Collections section in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). - + is a proxy for a class, or a class derived from . enables XAML code to set the commonly used properties, passing these settings to the underlying view. has a property that holds the actual view and a property that holds the source collection. + + You can think of a collection view as the layer on top of the binding source collection that allows you to navigate and display the collection based on sort, filter, and group queries, all without having to manipulate the underlying source collection itself. If the source collection implements the interface, the changes raised by the event are propagated to the views. + + Because views do not change the underlying source collections, each source collection can have multiple views associated with it. For example, you may have a collection of `Task` objects. With the use of views, you can display that same data in different ways. For example, on the left side of your page you may want to show tasks sorted by priority, and on the right side, grouped by area. + + For more information, see the Binding to Collections section in the [Data Binding Overview](/dotnet/framework/wpf/data/data-binding-overview). + ]]> @@ -96,20 +96,20 @@ Gets a value that indicates whether the collection view supports turning filtering data in real time on or off. - if the collection view supports turning live filtering on or off; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the collection view supports turning live filtering on or off; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -168,20 +168,20 @@ Gets a value that indicates whether the collection view supports turning grouping data in real time on or off. - if the collection view supports turning live grouping on or off; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the collection view supports turning live grouping on or off; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -240,20 +240,20 @@ Gets a value that indicates whether the collection view supports turning sorting data in real time on or off. - if the collection view supports turning live sorting on or off; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if the collection view supports turning live sorting on or off; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -308,33 +308,33 @@ Gets or sets the desired view type. The desired view type. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Values - *typeName* - The name of the that is contained by this view. Note the use of the [x:Type Markup Extension](/dotnet/framework/xaml-services/x-type-markup-extension) to specify a type in XAML. - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Values + *typeName* + The name of the that is contained by this view. Note the use of the [x:Type Markup Extension](/dotnet/framework/xaml-services/x-type-markup-extension) to specify a type in XAML. + ]]> @@ -400,23 +400,23 @@ Gets or sets the culture that is used for operations such as sorting and comparisons. The culture that is used for operations such as sorting and comparisons. - collection. - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Values - *ietfLanguageTag* - A string used to set the . This string is used to internally call. . For details on the string format, see . - + collection. + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Values + *ietfLanguageTag* + A string used to set the . This string is used to internally call. . For details on the string format, see . + ]]> @@ -447,11 +447,11 @@ Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh. An object that you can use to dispose of the calling object. - @@ -480,28 +480,28 @@ Provides filtering logic. - event. In this example, `listingDataView` is an instance of . - + event. In this example, `listingDataView` is an instance of . + :::code language="csharp" source="~/snippets/csharp/System.Windows/DataTemplate/Triggers/MainWindow.xaml.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DataBindingLab/VisualBasic/MainWindow.xaml.vb" id="Snippet10"::: - - The following shows the implementation of the example `ShowOnlyBargainsFilter` filter event handler. This event handler uses the property to filter out `AuctionItem` objects that have a `CurrentPrice` of $25 or greater. - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DataBindingLab/VisualBasic/MainWindow.xaml.vb" id="Snippet10"::: + + The following shows the implementation of the example `ShowOnlyBargainsFilter` filter event handler. This event handler uses the property to filter out `AuctionItem` objects that have a `CurrentPrice` of $25 or greater. + :::code language="csharp" source="~/snippets/csharp/System.Windows/DataTemplate/Triggers/MainWindow.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DataBindingLab/VisualBasic/MainWindow.xaml.vb" id="Snippet5"::: - - For the complete example, see [Data Binding Demo](https://go.microsoft.com/fwlink/?LinkID=163703). - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DataBindingLab/VisualBasic/MainWindow.xaml.vb" id="Snippet5"::: + + For the complete example, see [Data Binding Demo](https://go.microsoft.com/fwlink/?LinkID=163703). + ]]> @@ -535,13 +535,13 @@ Returns the default view for the given source. Returns an object that is the default view for the given source collection. - objects. - - All collections have a default . WPF always binds to a view rather than a collection. If you bind directly to a collection, WPF actually binds to the default view for that collection. This default view is shared by all bindings to the collection, which causes all direct bindings to the collection to share the sort, filter, group, and current item characteristics of the one default view. Alternatively, you can create a view of your collection in Extensible Application Markup Language (XAML) or code using the class, and binding your control to that view. For an example, see [How to: Sort and Group Data Using a View in XAML](/dotnet/framework/wpf/data/how-to-sort-and-group-data-using-a-view-in-xaml). - + objects. + + All collections have a default . WPF always binds to a view rather than a collection. If you bind directly to a collection, WPF actually binds to the default view for that collection. This default view is shared by all bindings to the collection, which causes all direct bindings to the collection to share the sort, filter, group, and current item characteristics of the one default view. Alternatively, you can create a view of your collection in Extensible Application Markup Language (XAML) or code using the class, and binding your control to that view. For an example, see [How to: Sort and Group Data Using a View in XAML](/dotnet/framework/wpf/data/how-to-sort-and-group-data-using-a-view-in-xaml). + ]]> @@ -577,27 +577,27 @@ Gets or sets a collection of objects that describes how the items in the collection are grouped in the view. An of objects that describes how the items in the collection are grouped in the view. - . - - -## XAML Property Element Usage - -``` - - - oneOrMorePropertyDescriptions - - -``` - - -## XAML Values - *oneOrMorePropertyDescriptions* - One or more elements that derive from the s abstract class. Typically this is a . - + . + + +## XAML Property Element Usage + +``` + + + oneOrMorePropertyDescriptions + + +``` + + +## XAML Values + *oneOrMorePropertyDescriptions* + One or more elements that derive from the s abstract class. Typically this is a . + ]]> @@ -632,11 +632,11 @@ if the given view is the default view for the collection or if the given view is ; otherwise, . - . For all collections implementing , the object is the default view object. The is the collection view class used for collections that implement and . To get the default view, you use the method. - + . For all collections implementing , the object is the default view object. The is the collection view class used for collections that implement and . To get the default view, you use the method. + ]]> @@ -670,20 +670,20 @@ Gets a value that indicates whether the is filtering data in real time. - if filtering data in real time is enabled; if live filtering is not enabled; if it cannot be determined whether the collection view implements live filtering. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if filtering data in real time is enabled; if live filtering is not enabled; if it cannot be determined whether the collection view implements live filtering. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -736,20 +736,20 @@ Gets or sets a value that indicates whether should filter the data in real time if it can. - if live filtering has been requested; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if live filtering has been requested; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -808,20 +808,20 @@ Gets a value that indicates whether the groups data in real time. - if grouping data in real time is enable; if live grouping is not enabled; if it cannot be determined whether the collection view implements live grouping. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if grouping data in real time is enable; if live grouping is not enabled; if it cannot be determined whether the collection view implements live grouping. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -874,20 +874,20 @@ Gets or sets a value that indicates whether should group the data in real time if it can. - if live grouping has been requested; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if live grouping has been requested; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -946,20 +946,20 @@ Gets a value that indicates whether the sorts data in real time. - if sorting data in real time is enable; if live sorting is not enabled; if it cannot be determined whether the collection view implements live sorting. The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if sorting data in real time is enable; if live sorting is not enabled; if it cannot be determined whether the collection view implements live sorting. The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1012,20 +1012,20 @@ Gets or sets a value that indicates whether should sort the data in real time if it can. - if live sorting has been requested; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if live sorting has been requested; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1265,27 +1265,27 @@ Gets or sets a collection of objects that describes how the items in the collection are sorted in the view. A collection of objects that describes how the items in the collection are sorted in the view. - -## XAML Property Element Usage - -``` - - - oneOrMoreSortDescriptions - - -``` - - -## XAML Values - *oneOrMoreSortDescriptions* - One or more elements. - + +## XAML Property Element Usage + +``` + + + oneOrMoreSortDescriptions + + +``` + + +## XAML Values + *oneOrMoreSortDescriptions* + One or more elements. + ]]> @@ -1315,30 +1315,30 @@ Gets or sets the collection object from which to create this view. The default value is . - -## Dependency Property Information - -||| -|-|-| -|Identifier Field|| -|Metadata properties set to `true`|None| - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Values - *myCollection* - An existing collection. To refer to an existing collection, use the [StaticResource Markup Extension](/dotnet/framework/wpf/advanced/staticresource-markup-extension). - + +## Dependency Property Information + +||| +|-|-| +|Identifier Field|| +|Metadata properties set to `true`|None| + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Values + *myCollection* + An existing collection. To refer to an existing collection, use the [StaticResource Markup Extension](/dotnet/framework/wpf/advanced/staticresource-markup-extension). + ]]> @@ -1505,18 +1505,18 @@ Gets the view object that is currently associated with this instance of . The view object that is currently associated with this instance of . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Forms.Design/ComponentDocumentDesigner.xml b/xml/System.Windows.Forms.Design/ComponentDocumentDesigner.xml index 0ecf4085310..97ce6a1b83e 100644 --- a/xml/System.Windows.Forms.Design/ComponentDocumentDesigner.xml +++ b/xml/System.Windows.Forms.Design/ComponentDocumentDesigner.xml @@ -51,16 +51,16 @@ Base designer class for extending the design mode behavior of a root design document that supports nested components. - provides a base class for designers of root design documents that support nested components. In addition to the methods and functionality inherited from the class, implements the interface to provide a root-level design mode view for the associated component, and any nested components. - + provides a base class for designers of root design documents that support nested components. In addition to the methods and functionality inherited from the class, implements the interface to provide a root-level design mode view for the associated component, and any nested components. + > [!NOTE] -> The root-level design mode view for a or is typically provided by a built-in root designer. A custom implementation is required to provide a view for other types of root components in design mode. - - You can associate a designer with a type using a . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). - +> The root-level design mode view for a or is typically provided by a built-in root designer. A custom implementation is required to provide a view for other types of root components in design mode. + + You can associate a designer with a type using a . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). + ]]> @@ -170,20 +170,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -228,11 +228,11 @@ if the tool should be enabled on the toolbox; if the document designer doesn't know how to use the tool. - @@ -313,11 +313,11 @@ An that contains the properties for the class of the component. Adjusts the set of properties the component will expose through a . - interface method override adds a non-browsable, design-time only `boolean` property named "TrayLargeIcon" to this designer's component at design time. This property is used by the component tray. - + interface method override adds a non-browsable, design-time only `boolean` property named "TrayLargeIcon" to this designer's component at design time. This property is used by the component tray. + ]]> @@ -360,11 +360,11 @@ For a description of this member, see . An object that represents the view for this designer. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -401,11 +401,11 @@ For a description of this member, see . An array of supported values. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -450,11 +450,11 @@ if the set of filtered attributes is to be cached; if the filter service must query again. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -499,11 +499,11 @@ if the set of filtered events is to be cached; if the filter service must query again. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -548,11 +548,11 @@ if the set of filtered properties is to be cached; if the filter service must query again. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -595,11 +595,11 @@ if the tool is supported by the toolbox and can be enabled; if the document designer does not know how to use the tool. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -640,11 +640,11 @@ The to select. For a description of this member, see . - instance is cast to an interface. - + instance is cast to an interface. + ]]> diff --git a/xml/System.Windows.Forms.Design/ComponentTray.xml b/xml/System.Windows.Forms.Design/ComponentTray.xml index f329d09d7b7..c752601fe92 100644 --- a/xml/System.Windows.Forms.Design/ComponentTray.xml +++ b/xml/System.Windows.Forms.Design/ComponentTray.xml @@ -57,15 +57,15 @@ Provides behavior for the component tray of a designer. - , may not have a user interface that can be viewed at design time. These components are usually represented by icons that are shown in the component tray. - - The component tray is a rectangular region displayed at the bottom of the design view window while in design view mode, once it is active. The component tray becomes active in design view after a component that is displayed in the component tray has been added to or is part of the current document. - + , may not have a user interface that can be viewed at design time. These components are usually represented by icons that are shown in the component tray. + + The component tray is a rectangular region displayed at the bottom of the design view window while in design view mode, once it is active. The component tray becomes active in design view after a component that is displayed in the component tray has been added to or is part of the current document. + ]]> @@ -102,11 +102,11 @@ An that can be used to obtain design-time services. Initializes a new instance of the class using the specified designer and service provider. - @@ -264,11 +264,11 @@ if the component can be displayed; otherwise, . - , which indicates whether the component has a user interface that can be displayed. - + , which indicates whether the component has a user interface that can be displayed. + ]]> @@ -344,11 +344,11 @@ The to create a component from. Creates a component from the specified toolbox item, adds the component to the current document, and displays a representation for the component in the component tray. - before attempting to create the component and add it to the component tray. - + before attempting to create the component and add it to the component tray. + ]]> @@ -422,20 +422,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -495,11 +495,11 @@ Gets the location of the specified component, relative to the upper-left corner of the component tray. A indicating the coordinates of the specified component, or an empty if the specified component could not be found in the component tray. An empty has an property equal to and typically has and properties that are each equal to zero. - is an accessor method for the location extender property that is added to each component in the component tray. - + is an accessor method for the location extender property that is added to each component in the component tray. + ]]> @@ -629,11 +629,11 @@ Gets the value of the extender property. A representing the location of . - . If `receiver` does not have a component view, the returned value is an empty . - + . If `receiver` does not have a component view, the returned value is an empty . + ]]> @@ -1274,11 +1274,11 @@ A representing the location of . Sets the value of the extender property. - . - + . + ]]> @@ -1370,11 +1370,11 @@ if this object can provide extender properties to the specified object; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> diff --git a/xml/System.Windows.Forms.Design/ControlDesigner.xml b/xml/System.Windows.Forms.Design/ControlDesigner.xml index 8822823b66f..17e725f159d 100644 --- a/xml/System.Windows.Forms.Design/ControlDesigner.xml +++ b/xml/System.Windows.Forms.Design/ControlDesigner.xml @@ -45,24 +45,24 @@ Extends the design mode behavior of a . - provides a base class for designers of components that derive from . In addition to the methods and functionality inherited from the class, provides additional methods to support extending and altering the behavior of an associated at design time. - - You can associate a designer with a type using a . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). - - - -## Examples - The following example implementation demonstrates handling `MouseEnter` and `MouseLeave` events, drawing on a control from designer code, and using part of the interface to add a property for the control at design time. The following sample code contains a designer and a sample user control associated with the designer. To build this sample, compile the sample into a class library, add a reference to the library to a Windows Forms project, add the control to the Toolbox, and add an instance of the control to your form. When you point to the control, the inner outline of the perimeter of the control is highlighted, and the color used to draw the outline corresponds to the `OutlineColor` property that the designer has added to the properties listed for the control. - - Add a reference to the System.Design assembly to compile the code example. - + provides a base class for designers of components that derive from . In addition to the methods and functionality inherited from the class, provides additional methods to support extending and altering the behavior of an associated at design time. + + You can associate a designer with a type using a . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). + + + +## Examples + The following example implementation demonstrates handling `MouseEnter` and `MouseLeave` events, drawing on a control from designer code, and using part of the interface to add a property for the control at design time. The following sample code contains a designer and a sample user control associated with the designer. To build this sample, compile the sample into a class library, add a reference to the library to a Windows Forms project, add the control to the Toolbox, and add an instance of the control to your form. When you point to the control, the inner outline of the perimeter of the control is highlighted, and the color used to draw the outline corresponds to the `OutlineColor` property that the designer has added to the properties listed for the control. + + Add a reference to the System.Design assembly to compile the code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ControlDesignerExample/CPP/controldesignerexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/IDesignerFilter/Overview/controldesignerexample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ControlDesignerExample/VB/controldesignerexample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ControlDesignerExample/VB/controldesignerexample.vb" id="Snippet1"::: + ]]> @@ -135,11 +135,11 @@ Specifies the accessibility object for the designer. - @@ -175,11 +175,11 @@ Gets the assigned to the control. The assigned to the control. - @@ -215,15 +215,15 @@ Gets the collection of components associated with the component managed by the designer. The components that are associated with the component managed by the designer. - @@ -303,11 +303,11 @@ The to process. Processes Windows messages. - @@ -389,14 +389,14 @@ if the control managed by the specified designer can parent the control managed by this designer; otherwise, . - controls can only be parented by controls. - + controls can only be parented by controls. + > [!NOTE] -> This method is not called when an item is dragged from the **Toolbox** onto the design surface. - +> This method is not called when an item is dragged from the **Toolbox** onto the design surface. + ]]> @@ -466,11 +466,11 @@ The to process. Provides default processing for Windows messages. - @@ -547,20 +547,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -601,15 +601,15 @@ if the child control could be enabled for design time; if the hosting infrastructure does not support it. - : it has two panels, `Panel1` and `Panel2`. These panels are exposed through read only and properties on the control. The control's designer calls for each panel, which allows other components to be dropped on them. But, in order for the contents of and to be saved, the control itself must expose the panels as public properties. - - Control names must be unique within a control designer, but they are not required to be unique with respect to the children of other control designers. - - To support this feature, the hosting infrastructure must expose the class as a service through the site. - + : it has two panels, `Panel1` and `Panel2`. These panels are exposed through read only and properties on the control. The control's designer calls for each panel, which allows other components to be dropped on them. But, in order for the contents of and to be saved, the control itself must expose the panels as public properties. + + Control names must be unique within a control designer, but they are not required to be unique with respect to the children of other control designers. + + To support this feature, the hosting infrastructure must expose the class as a service through the site. + ]]> @@ -650,11 +650,11 @@ to enable drag-and-drop support for the control; if the control should not have drag-and-drop support. The default is . Enables or disables drag-and-drop support for the control being designed. - . - + . + ]]> @@ -760,17 +760,17 @@ Gets a collection of objects representing the selection borders and grab handles for a standard control. A collection of objects. - objects returned will represent one of these selection states: - -- A fully resizable selection border with grab handles; - -- A locked selection border; - -- A single 'hidden' selection . - + objects returned will represent one of these selection states: + +- A fully resizable selection border with grab handles; + +- A locked selection border; + +- A single 'hidden' selection . + ]]> @@ -810,16 +810,16 @@ if a click at the specified point is to be handled by the control; otherwise, . - method determines whether a click at the specified point should be passed to the control, while the control is in design mode. You can override and implement this method to enable your control to receive clicks in the design-time environment. - + method determines whether a click at the specified point should be passed to the control, while the control is in design mode. You can override and implement this method to enable your control to receive clicks in the design-time environment. + > [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. - - The method is called in response to the WM_NCHITTEST message, so it is called on each mouse move. - +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. + + The method is called in response to the WM_NCHITTEST message, so it is called on each mouse move. + ]]> @@ -935,11 +935,11 @@ The to associate the designer with. This component must always be an instance of, or derive from, . Initializes the designer with the specified component. - @@ -984,11 +984,11 @@ A name/value dictionary of default values to apply to properties. May be if no default values are specified. Re-initializes an existing component. - class overrides this method to handle after-drop cases. - + class overrides this method to handle after-drop cases. + ]]> @@ -1033,11 +1033,11 @@ A name/value dictionary of default values to apply to properties. May be if no default values are specified. Initializes a newly created component. - class overrides this method. It will look at the default property for the control and, if it is of type `string`, it will set this property's value to the name of the component. It only does this if the designer has been configured with this option in the options service. This method also connects the control to its parent and positions it. If you override this method, you should always call base. - + class overrides this method. It will look at the default property for the control and, if it is of type `string`, it will set this property's value to the name of the component. It only does this if the designer has been configured with this option in the options service. This method also connects the control to its parent and positions it. If you override this method, you should always call base. + ]]> @@ -1107,11 +1107,11 @@ Returns the internal control designer with the specified index in the . A at the specified index. - collection of the . is an example of one such control. - + collection of the . is an example of one such control. + ]]> @@ -1145,11 +1145,11 @@ Defines a local that represents the values of an invalid . - has an and property set to the minimum value for the integer data type. - + has an and property set to the minimum value for the integer data type. + ]]> @@ -1184,11 +1184,11 @@ Returns the number of internal control designers in the . The number of internal control designers in the . - collection of the . is an example of one such control. - + collection of the . is an example of one such control. + ]]> @@ -1469,11 +1469,11 @@ A that provides data for the event. Receives a call when a drag-and-drop operation is in progress to provide visual cues based on the location of the mouse while a drag operation is in progress. - @@ -1513,14 +1513,14 @@ The y position of the mouse in screen coordinates. Receives a call in response to the left mouse button being pressed and held while over the component. - [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. - +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. + ]]> @@ -1596,13 +1596,13 @@ The y position of the mouse in screen coordinates. Receives a call for each movement of the mouse during a drag-and-drop operation. - [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. - +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. + ]]> @@ -1810,11 +1810,11 @@ Receives a call each time the cursor needs to be set. - @@ -1859,11 +1859,11 @@ Gets the parent component for the . The parent component for the ; otherwise, if there is no parent component. - returns its parent. - + returns its parent. + ]]> @@ -1936,11 +1936,11 @@ An containing the properties for the class of the component. Adjusts the set of properties the component exposes through a . - interface method override adds a set of properties to this designer's component at design time. This method adds the following browsable properties: `Visible`, `Enabled`, `ContextMenu`, `AllowDrop`, `Location`, `Name`, `Controls`, and `Locked`. - + interface method override adds a set of properties to this designer's component at design time. This method adds the following browsable properties: `Visible`, `Enabled`, `ContextMenu`, `AllowDrop`, `Location`, `Name`, `Controls`, and `Locked`. + ]]> @@ -1976,11 +1976,11 @@ Gets the selection rules that indicate the movement capabilities of a component. A bitwise combination of values. - @@ -2021,11 +2021,11 @@ Gets a list of objects representing significant alignment points for this control. A list of objects representing significant alignment points for this control. - objects to assist in positioning the control on a design surface. - + objects to assist in positioning the control on a design surface. + ]]> @@ -2098,26 +2098,26 @@ The to process. Processes Windows messages and optionally routes them to the control. - method, call on the control's designer. - + method, call on the control's designer. + > [!NOTE] -> The designer filters messages, so some messages will not be sent to the control. For example, mouse messages are intercepted by the designer. If this is not the behavior you want, call instead. - - Pass `m` as a parameter. Optionally, you can alter or create a new to pass to the control's method. - - The following table shows the flow of messages. - -|Without a designer|With a designer| -|------------------------|---------------------| -|USER32





USER32|USER32

`Control.Designer.`







USER32| - - The designer intercepts messages by replacing the property on the control. Usually, points to the contained within the control. During design time, the designer replaces this with its own window target, and caches the original value. - +> The designer filters messages, so some messages will not be sent to the control. For example, mouse messages are intercepted by the designer. If this is not the behavior you want, call instead. + + Pass `m` as a parameter. Optionally, you can alter or create a new to pass to the control's method. + + The following table shows the flow of messages. + +|Without a designer|With a designer| +|------------------------|---------------------| +|USER32





USER32|USER32

`Control.Designer.`







USER32| + + The designer intercepts messages by replacing the property on the control. Usually, points to the contained within the control. During design time, the designer replaces this with its own window target, and caches the original value. + ]]>
diff --git a/xml/System.Windows.Forms.Design/DocumentDesigner.xml b/xml/System.Windows.Forms.Design/DocumentDesigner.xml index c2c78db8646..441e6ebcef3 100644 --- a/xml/System.Windows.Forms.Design/DocumentDesigner.xml +++ b/xml/System.Windows.Forms.Design/DocumentDesigner.xml @@ -54,13 +54,13 @@ Base designer class for extending the design mode behavior of, and providing a root-level design mode view for, a that supports nested controls and should receive scroll messages. - . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). - + . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). + ]]> @@ -134,20 +134,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -259,11 +259,11 @@ if the tool should be enabled on the toolbox; if the document designer doesn't know how to use the tool. - @@ -373,11 +373,11 @@ The vertical screen coordinate to display the context menu at. Called when the context menu should be displayed. - @@ -447,11 +447,11 @@ An that contains the properties for the class of the component. Adjusts the set of properties the component exposes through a . - interface method override adds a set of properties to this designer's component at design time. This method adds the following browsable properties: "Location", and "BackColor". - + interface method override adds a set of properties to this designer's component at design time. This method adds the following browsable properties: "Location", and "BackColor". + ]]> @@ -487,11 +487,11 @@ Gets the for the designer. A bitwise combination of values. - that prevents the document from being resized. - + that prevents the document from being resized. + ]]> @@ -534,11 +534,11 @@ For a description of this member, see . An object that represents the view for this designer. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -575,11 +575,11 @@ For a description of this member, see . An array of supported values. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -628,11 +628,11 @@ if the tool is supported by the toolbox and can be enabled; if the document designer does not know how to use the tool. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -679,11 +679,11 @@ The to select. For a description of this member, see . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -727,11 +727,11 @@ The to create a component for. Selects the specified tool. - is called when the user double-clicks on a toolbox item. The document designer should create a component for the specified tool. Only tools that are enabled in the toolbox will be passed to this method. - + is called when the user double-clicks on a toolbox item. The document designer should create a component for the specified tool. Only tools that are enabled in the toolbox will be passed to this method. + ]]> diff --git a/xml/System.Windows.Forms.Design/ParentControlDesigner.xml b/xml/System.Windows.Forms.Design/ParentControlDesigner.xml index 8105dc5eaec..a8163acba8a 100644 --- a/xml/System.Windows.Forms.Design/ParentControlDesigner.xml +++ b/xml/System.Windows.Forms.Design/ParentControlDesigner.xml @@ -35,22 +35,22 @@ Extends the design mode behavior of a that supports nested controls. - provides a base class for designers of controls that can contain child controls. In addition to the methods and functionality inherited from the and classes, enables child controls to be added to, removed from, selected within, and arranged within the control whose behavior it extends at design time. - - You can associate a designer with a type using a . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). - - - -## Examples - The following example demonstrates how to implement a custom . This code example is part of a larger example provided for the interface. - + provides a base class for designers of controls that can contain child controls. In addition to the methods and functionality inherited from the and classes, enables child controls to be added to, removed from, selected within, and arranged within the control whose behavior it extends at design time. + + You can associate a designer with a type using a . For an overview of customizing design time behavior, see [Extending Design-Time Support](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/37899azc(v=vs.100)). + + + +## Examples + The following example demonstrates how to implement a custom . This code example is part of a larger example provided for the interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IToolboxUserExample/CPP/samplecontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/ToolboxItemFilterAttribute/Overview/samplecontrol.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/IToolboxUserExample/VB/samplecontrol.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/IToolboxUserExample/VB/samplecontrol.vb" id="Snippet1"::: + ]]> @@ -165,11 +165,11 @@ if the controls that were selected by lassoing on the designer's surface will be re-parented to this designer's control. - method is called after the user selects a toolbox item that has a associated with it. It draws a reversible rectangle on a designer's surface. - + method is called after the user selects a toolbox item that has a associated with it. It draws a reversible rectangle on a designer's surface. + ]]> @@ -248,11 +248,11 @@ if the z-order of dragged controls should be maintained when dropped on a ; otherwise, . - . - + . + ]]> @@ -296,11 +296,11 @@ if can be added; otherwise, . - @@ -349,11 +349,11 @@ if the specified control can be a child of the control managed by this designer; otherwise, . - . - + . + ]]> @@ -399,11 +399,11 @@ if the control managed by the specified designer can be a child of the control managed by this designer; otherwise, . - . - + . + ]]> @@ -462,13 +462,13 @@ The to create a component from. Creates a component or control from the specified tool and adds it to the current design document. - methods. - + methods. + ]]> @@ -520,13 +520,13 @@ The , in design-time view screen coordinates, at which to center the component. Creates a component or control from the specified tool and adds it to the current design document at the specified location. - method. - + method. + ]]> @@ -578,11 +578,11 @@ A indicating the location and size for the component created from the tool. The and values of the indicate the design-time view screen coordinates of the upper-left corner of the component. Creates a component or control from the specified tool and adds it to the current design document within the bounds of the specified rectangle. - and values of the `bounds` parameter. The size of the new component or control will be set to the values specified by the and properties of the `bounds` parameter. - + and values of the `bounds` parameter. The size of the new component or control will be set to the values specified by the and properties of the `bounds` parameter. + ]]> @@ -647,11 +647,11 @@ Provides core functionality for all the methods. An array of components created from the tool. - method that can be overridden. - + method that can be overridden. + ]]> @@ -692,11 +692,11 @@ Gets the default location for a control added to the designer. A that indicates the default location for a control added to the designer. - @@ -741,20 +741,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the , and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -918,11 +918,11 @@ Gets a body glyph that represents the bounds of the control. A body glyph that represents the bounds of the control. - @@ -966,11 +966,11 @@ Gets a collection of objects representing the selection borders and grab handles for a standard control. A collection of objects. - method adds a container selector to the selection glyphs collection. - + method adds a container selector to the selection glyphs collection. + ]]> @@ -1061,11 +1061,11 @@ Updates the position of the specified rectangle, adjusting it for grid alignment if grid alignment mode is enabled. A rectangle indicating the position of the component in design-time view screen coordinates. If no changes have been made, this method returns the original rectangle. - @@ -1149,11 +1149,11 @@ The to associate with the designer. Initializes the designer with the specified component. - @@ -1340,11 +1340,11 @@ A that provides data for the event. Called in order to clean up a drag-and-drop operation. - is used to clean up any operations that were performed at the beginning of a drag-and-drop operation. - + is used to clean up any operations that were performed at the beginning of a drag-and-drop operation. + ]]> @@ -1388,11 +1388,11 @@ A that provides data for the event. Called when a drag-and-drop object is dropped onto the control designer view. - to the method and returns. If no parent drag-and-drop handler exists, this method attempts to create a tool if a toolbox item has been dropped on the designer control. - + to the method and returns. If no parent drag-and-drop handler exists, this method attempts to create a tool if a toolbox item has been dropped on the designer control. + ]]> @@ -1588,14 +1588,14 @@ The y-coordinate of the mouse in screen coordinates. Called in response to the left mouse button being pressed and held while over the component. - [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. - +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. + ]]> @@ -1640,11 +1640,11 @@ to cancel the drag operation; to commit it. Called at the end of a drag-and-drop operation to complete or cancel the operation. - @@ -1690,14 +1690,14 @@ The y-coordinate of the mouse in screen coordinates. Called for each movement of the mouse during a drag-and-drop operation. - [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. - +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. + ]]> @@ -1851,11 +1851,11 @@ Provides an opportunity to change the current mouse cursor. - @@ -1899,11 +1899,11 @@ An that contains the properties for the class of the component. Adjusts the set of properties the component will expose through a . - interface method override adds a set of properties to this designer's control that allow a user to set options related to the grid display and child control alignment. This method adds the following browsable properties: `DrawGrid`, `SnapToGrid`, and `GridSize`. - + interface method override adds a set of properties to this designer's control that allow a user to set options related to the grid display and child control alignment. This method adds the following browsable properties: `DrawGrid`, `SnapToGrid`, and `GridSize`. + ]]> diff --git a/xml/System.Windows.Forms.Design/PropertyTab.xml b/xml/System.Windows.Forms.Design/PropertyTab.xml index d366a297f9d..8bd2aa4756c 100644 --- a/xml/System.Windows.Forms.Design/PropertyTab.xml +++ b/xml/System.Windows.Forms.Design/PropertyTab.xml @@ -37,23 +37,23 @@ Provides a base class for property tabs. - class provides the base class behavior for a property tab. Property tabs are displayed on the toolbar of the control of the Properties window, and allow a component to display different views of its properties or other data. - - User code will usually not create an instance of a directly. Instead, a that indicates the type of the property tab or property tabs to display for a component can be associated with the properties or types that the should be displayed for. - - The will instantiate a of the type specified by a associated with the type or property field of the component that is being browsed. - - - -## Examples - The following code example provides an example that lists any properties on a component, arranged by type name. - + class provides the base class behavior for a property tab. Property tabs are displayed on the toolbar of the control of the Properties window, and allow a component to display different views of its properties or other data. + + User code will usually not create an instance of a directly. Instead, a that indicates the type of the property tab or property tabs to display for a component can be associated with the properties or types that the should be displayed for. + + The will instantiate a of the type specified by a associated with the type or property field of the component that is being browsed. + + + +## Examples + The following code example provides an example that lists any properties on a component, arranged by type name. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/PropertyTabExample/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/PropertyTabAttribute/Overview/class1.cs" id="Snippet1"::: - + ]]> @@ -238,14 +238,14 @@ Releases all the resources used by the . - when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -280,20 +280,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -556,11 +556,11 @@ Gets the Help keyword that is to be associated with this tab. The Help keyword to be associated with this tab. - diff --git a/xml/System.Windows.Forms.Integration/ElementHost.xml b/xml/System.Windows.Forms.Integration/ElementHost.xml index 4c79973f7cf..f76c947c69f 100644 --- a/xml/System.Windows.Forms.Integration/ElementHost.xml +++ b/xml/System.Windows.Forms.Integration/ElementHost.xml @@ -634,9 +634,9 @@
- can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. diff --git a/xml/System.Windows.Forms/Application.xml b/xml/System.Windows.Forms/Application.xml index d2fb165ce28..ac113d7f4ce 100644 --- a/xml/System.Windows.Forms/Application.xml +++ b/xml/System.Windows.Forms/Application.xml @@ -33,39 +33,39 @@ Provides methods and properties to manage an application, such as methods to start and stop an application, to process Windows messages, and properties to get information about an application. This class cannot be inherited. - class has methods to start and stop applications and threads, and to process Windows messages, as follows: - -- starts an application message loop on the current thread and, optionally, makes a form visible. - -- or stops a message loop. - -- processes messages while your program is in a loop. - -- adds a message filter to the application message pump to monitor Windows messages. - -- lets you stop an event from being raised or perform special operations before invoking an event handler. - - This class has and properties to get or set culture information for the current thread. - - You cannot create an instance of this class. - - - -## Examples - The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. - - The `Main` method calls to start the application, which creates the form, `listBox1` and `button1`. When the user clicks `button1`, the `button1_Click` method displays a . If the user clicks `No` on the , the `button1_Click` method adds a number to the list. If the user clicks `Yes`, the application calls to process all remaining messages in the queue and then to quit. - + class has methods to start and stop applications and threads, and to process Windows messages, as follows: + +- starts an application message loop on the current thread and, optionally, makes a form visible. + +- or stops a message loop. + +- processes messages while your program is in a loop. + +- adds a message filter to the application message pump to monitor Windows messages. + +- lets you stop an event from being raised or perform special operations before invoking an event handler. + + This class has and properties to get or set culture information for the current thread. + + You cannot create an instance of this class. + + + +## Examples + The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. + + The `Main` method calls to start the application, which creates the form, `listBox1` and `button1`. When the user clicks `button1`, the `button1_Click` method displays a . If the user clicks `No` on the , the `button1_Click` method adds a number to the list. If the user clicks `Yes`, the application calls to process all remaining messages in the queue and then to quit. + > [!NOTE] -> The call to will fail in partial trust. - +> The call to will fail in partial trust. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -106,25 +106,25 @@ The implementation of the interface you want to install. Adds a message filter to monitor Windows messages as they are routed to their destinations. - method with the code to handle the message. The method must return `false`. - + method with the code to handle the message. The method must return `false`. + > [!CAUTION] -> Adding message filters to the message pump for an application can degrade performance. - - - -## Examples - The following code example creates a message filter called `TestMessageFilter`. This filter blocks all messages relating to the left mouse button. Before you can use a message filter, you must provide an implementation for the interface. - +> Adding message filters to the message pump for an application can degrade performance. + + + +## Examples + The following code example creates a message filter called `TestMessageFilter`. This filter blocks all messages relating to the left mouse button. Before you can use a message filter, you must provide an implementation for the interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.RemoveMessageFilter Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/AddMessageFilter/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.RemoveMessageFilter Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.RemoveMessageFilter Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -156,11 +156,11 @@ if the caller can quit this application; otherwise, . - being hosted within a Web browser. Thus, the cannot quit the . - + being hosted within a Web browser. Thus, the cannot quit the . + ]]> @@ -205,26 +205,26 @@ Occurs when the application is about to shut down. - and keeps track of when each form is closed, and exits the current thread when they both are. The class remembers the position of each form when it is closed. When the `ApplicationExit` event occurs, the class writes the positions of each for the user to the file. The form position data is stored in a file titled `appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . - - This code is an excerpt from the example shown in the class overview. See for the whole code listing. - + and keeps track of when each form is closed, and exits the current thread when they both are. The class remembers the position of each form when it is closed. When the `ApplicationExit` event occurs, the class writes the positions of each for the user to the file. The form position data is stored in a file titled `appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + + This code is an excerpt from the example shown in the class overview. See for the whole code listing. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Application/CPP/source.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ApplicationExit/source.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet5"::: + ]]> @@ -256,17 +256,17 @@ Gets the path for the application data that is shared among all users. The path for the application data that is shared among all users. - \\\\ - - first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. - - The path will be different depending on whether the Windows Forms application is deployed using ClickOnce. ClickOnce applications are stored in a per-user application cache in the C:\Documents and Settings\\*username* directory. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). - + \\\\ + + first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. + + The path will be different depending on whether the Windows Forms application is deployed using ClickOnce. ClickOnce applications are stored in a per-user application cache in the C:\Documents and Settings\\*username* directory. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). + ]]> @@ -298,13 +298,13 @@ Gets the registry key for the application data that is shared among all users. A representing the registry key of the application data that is shared among all users. - \\\\ - + ]]> @@ -346,15 +346,15 @@ Gets the company name associated with the application. The company name. - @@ -388,15 +388,15 @@ Gets or sets the culture information for the current thread. A representing the culture information for the current thread. - @@ -428,15 +428,15 @@ Gets or sets the current input language for the current thread. An representing the current input language for the current thread. - @@ -469,34 +469,34 @@ Processes all Windows messages currently in the message queue. - in your code, your application can handle the other events. For example, if you have a form that adds data to a and add to your code, your form repaints when another window is dragged over it. If you remove from your code, your form will not repaint until the click event handler of the button is finished executing. For more information on messaging, see [User Input in Windows Forms](/dotnet/framework/winforms/user-input-in-windows-forms). - - Unlike Visual Basic 6.0, the method does not call the method. - - Typically, you use this method in a loop to process messages. - + in your code, your application can handle the other events. For example, if you have a form that adds data to a and add to your code, your form repaints when another window is dragged over it. If you remove from your code, your form will not repaint until the click event handler of the button is finished executing. For more information on messaging, see [User Input in Windows Forms](/dotnet/framework/winforms/user-input-in-windows-forms). + + Unlike Visual Basic 6.0, the method does not call the method. + + Typically, you use this method in a loop to process messages. + > [!CAUTION] -> Calling this method causes the current thread to be suspended while all waiting window messages are processed. If a message causes an event to be triggered, then other areas of your application code may execute. This can cause your application to exhibit unexpected behaviors that are difficult to debug. If you perform operations or computations that take a long time, it is often preferable to perform those operations on a new thread. For more information about asynchronous programming, see [Asynchronous Programming Model (APM)](/dotnet/standard/asynchronous-programming-patterns/asynchronous-programming-model-apm). - - - -## Examples - The following code example demonstrates using the method. When the example runs, a user can select graphics files from an . The selected files are displayed in the form. The method forces a repaint of the form for each graphics file opened. To run this example, paste the following code in a form containing a named `PictureBox1`, an named `OpenFileDialog1`, and a button named `fileButton`. Call the `InitializePictureBox` and `InitializeOpenFileDialog` methods from the form's constructor or `Load` method. - +> Calling this method causes the current thread to be suspended while all waiting window messages are processed. If a message causes an event to be triggered, then other areas of your application code may execute. This can cause your application to exhibit unexpected behaviors that are difficult to debug. If you perform operations or computations that take a long time, it is often preferable to perform those operations on a new thread. For more information about asynchronous programming, see [Asynchronous Programming Model (APM)](/dotnet/standard/asynchronous-programming-patterns/asynchronous-programming-model-apm). + + + +## Examples + The following code example demonstrates using the method. When the example runs, a user can select graphics files from an . The selected files are displayed in the form. The method forces a repaint of the form for each graphics file opened. To run this example, paste the following code in a form containing a named `PictureBox1`, an named `OpenFileDialog1`, and a button named `fileButton`. Call the `InitializePictureBox` and `InitializeOpenFileDialog` methods from the form's constructor or `Load` method. + > [!NOTE] -> In Visual Studio, if you add an to your form by using a drag operation, you will have to modify the following `InitializeOpenFileDialog` method by removing the line that creates a new instance of . - - The example also requires that the event of the control and the event of the are connected to the event handlers defined in the example. When the example is running, display the dialog box by clicking the button. - +> In Visual Studio, if you add an to your form by using a drag operation, you will have to modify the following `InitializeOpenFileDialog` method by removing the line that creates a new instance of . + + The example also requires that the event of the control and the event of the are connected to the event handlers defined in the example. When the example is running, display the dialog box by clicking the button. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FileDialog/CPP/filedialogform.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/DoEvents/filedialogform.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FileDialog/VB/filedialogform.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FileDialog/VB/filedialogform.vb" id="Snippet1"::: + ]]> @@ -536,21 +536,21 @@ Enables visual styles for the application. - must be called before creating any controls in the application; typically, is the first line in the `Main` function. A separate manifest is not required to enable visual styles when calling . - + > [!NOTE] -> This method has no effect for controls hosted in Internet Explorer. - -## Examples - The following code example demonstrates calling in the `Main` function to enable visual styles for the application. - +> This method has no effect for controls hosted in Internet Explorer. + +## Examples + The following code example demonstrates calling in the `Main` function to enable visual styles for the application. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Application.EnableVisualStyles/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/EnableVisualStyles/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Application.EnableVisualStyles/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Application.EnableVisualStyles/VB/form1.vb" id="Snippet1"::: + ]]> @@ -601,23 +601,23 @@ Occurs when the application is about to enter a modal state. - [!CAUTION] -> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. - +> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet3"::: + ]]> @@ -646,9 +646,9 @@ Gets the path for the executable file that started the application, including the executable name. - The path and executable name for the executable file that started the application. - - This path will be different depending on whether the Windows Forms application is deployed using ClickOnce. ClickOnce applications are stored in a per-user application cache in the C:\Documents and Settings\\*username* directory. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). + The path and executable name for the executable file that started the application. + + This path will be different depending on whether the Windows Forms application is deployed using ClickOnce. ClickOnce applications are stored in a per-user application cache in the C:\Documents and Settings\\*username* directory. For more information, see Accessing Local and Remote Data in ClickOnce Applications. To be added. @@ -693,33 +693,33 @@ Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed. - method stops all running message loops on all threads and closes all windows of the application. This method does not necessarily force the application to exit. The method is typically called from within a message loop, and forces to return. To exit a message loop for the current thread only, call . - - raises the following events and performs the associated conditional actions: - -- A event is raised for every form represented by the property. This event can be canceled by setting the property of their parameter to `true`. - -- If one of more of the handlers cancels the event, then returns without further action. Otherwise, a event is raised for every open form, then all running message loops and forms are closed. - + method stops all running message loops on all threads and closes all windows of the application. This method does not necessarily force the application to exit. The method is typically called from within a message loop, and forces to return. To exit a message loop for the current thread only, call . + + raises the following events and performs the associated conditional actions: + +- A event is raised for every form represented by the property. This event can be canceled by setting the property of their parameter to `true`. + +- If one of more of the handlers cancels the event, then returns without further action. Otherwise, a event is raised for every open form, then all running message loops and forms are closed. + > [!NOTE] -> The method does not raise the and events, which are obsolete as of .NET Framework 2.0. - - - -## Examples - The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. - - The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls , to process all remaining messages in the queue and then to quit. - - The example requires that `listBox1` and `button1` have been instantiated and placed on a form. - +> The method does not raise the and events, which are obsolete as of .NET Framework 2.0. + + + +## Examples + The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. + + The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls , to process all remaining messages in the queue and then to quit. + + The example requires that `listBox1` and `button1` have been instantiated and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.Exit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/Exit/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.Exit Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.Exit Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -797,11 +797,11 @@ Exits the message loop on the current thread and closes all windows on the thread. - for the current thread to return. To exit the entire application, call . - + for the current thread to return. To exit the entire application, call . + ]]> @@ -911,24 +911,24 @@ Occurs when the application finishes processing and is about to enter the idle state. - [!CAUTION] -> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a Windows Form and make sure that the event handler is associated with the event. - +> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a Windows Form and make sure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet2"::: + ]]> @@ -976,23 +976,23 @@ Occurs when the application is about to leave a modal state. - [!CAUTION] -> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. - +> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet4"::: + ]]> @@ -1023,28 +1023,28 @@ Gets the path for the application data of a local, non-roaming user. The path for the application data of a local, non-roaming user. - \\\\ - - A typical base path is C:\Documents and Settings\\*username*\Local Settings\Application Data. This path will be different, however, if the Windows Forms application is deployed by using ClickOnce. ClickOnce creates its own application data directory that is isolated from all other applications. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). - - - -## Examples - The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. Although this example demonstrates using the property to store application data for the user, the can be used instead. - - The `MyApplicationContext` class inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . - - This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. - + \\\\ + + A typical base path is C:\Documents and Settings\\*username*\Local Settings\Application Data. This path will be different, however, if the Windows Forms application is deployed by using ClickOnce. ClickOnce creates its own application data directory that is isolated from all other applications. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). + + + +## Examples + The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. Although this example demonstrates using the property to store application data for the user, the can be used instead. + + The `MyApplicationContext` class inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + + This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Application/CPP/source.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ApplicationExit/source.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet5"::: + ]]> @@ -1076,11 +1076,11 @@ if a message loop exists; otherwise, . - to instruct Windows Forms if the hosting environment still has an active message loop. - + to instruct Windows Forms if the hosting environment still has an active message loop. + ]]> @@ -1112,14 +1112,14 @@ Initializes OLE on the current thread. One of the values. - first checks to see if OLE has been initialized on the current thread. If not, it initializes the thread for OLE. - + first checks to see if OLE has been initialized on the current thread. If not, it initializes the thread for OLE. + > [!NOTE] -> Unless a thread calls OLE methods directly, you do not need to call this method. - +> Unless a thread calls OLE methods directly, you do not need to call this method. + ]]> @@ -1153,15 +1153,15 @@ An that represents the exception that was thrown. Raises the event. - to raise an exception that will halt processing of the application. - - The class has a event. You can attach an event handler to this event to do whatever custom processing you need for unhandled exceptions. If you do not attach an event handler, will execute the default behavior, which involves displaying a dialog box to inform the user that there has been an error. - - only implements default exception behavior for unhandled exceptions that occur on threads owned by Windows Forms. Unhandled exceptions on other threads are handled by the event. - + to raise an exception that will halt processing of the application. + + The class has a event. You can attach an event handler to this event to do whatever custom processing you need for unhandled exceptions. If you do not attach an event handler, will execute the default behavior, which involves displaying a dialog box to inform the user that there has been an error. + + only implements default exception behavior for unhandled exceptions that occur on threads owned by Windows Forms. Unhandled exceptions on other threads are handled by the event. + ]]> @@ -1197,11 +1197,11 @@ Gets a collection of open forms owned by the application. A containing all the currently open forms owned by this application. - property represents a read-only collection of forms owned by the application. This collection can be searched by index position or by the of the . - + property represents a read-only collection of forms owned by the application. This collection can be searched by index position or by the of the . + ]]> @@ -1245,20 +1245,20 @@ Gets the product name associated with this application. The product name. - inside of your assembly manifest. For more information, see [Assembly Manifest](/dotnet/standard/assembly/manifest). - - - -## Examples - The following code example gets this property and displays its value in a text box. The example requires that `textBox1` has been placed on a form. - + inside of your assembly manifest. For more information, see [Assembly Manifest](/dotnet/standard/assembly/manifest). + + + +## Examples + The following code example gets this property and displays its value in a text box. The example requires that `textBox1` has been placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.ProductName Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ProductName/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ProductName Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ProductName Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1292,22 +1292,22 @@ Gets the product version associated with this application. The product version. - first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. - - - -## Examples - The following code example gets this property and displays its value in a text box. The example requires that `textBox1` has been placed on a form. - + first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. + + + +## Examples + The following code example gets this property and displays its value in a text box. The example requires that `textBox1` has been placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.ProductVersion Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ProductVersion/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ProductVersion Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ProductVersion Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1349,11 +1349,11 @@ The objects to pass to the event. Raises the event in hosted scenarios. - when the hosting application enters an idle state. This enables some Windows Forms controls and components to do important background work while the user is not interacting with the application. - + when the hosting application enters an idle state. This enables some Windows Forms controls and components to do important background work while the user is not interacting with the application. + ]]> @@ -1398,11 +1398,11 @@ The method to call when Windows Forms needs to check if the hosting environment is still sending messages. Registers a callback for checking whether the message loop is running in hosted environments. - property will always return false if Windows Forms is not processing messages. Use this callback to tell Windows Forms if the hosting environment is still processing messages. - + property will always return false if Windows Forms is not processing messages. Use this callback to tell Windows Forms if the hosting environment is still processing messages. + ]]> @@ -1437,20 +1437,20 @@ The implementation of the to remove from the application. Removes a message filter from the message pump of the application. - interface. The following class creates a message filter called `TestMessageFilter`. This filter blocks all messages relating to the left mouse button. - + interface. The following class creates a message filter called `TestMessageFilter`. This filter blocks all messages relating to the left mouse button. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.RemoveMessageFilter Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/AddMessageFilter/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.RemoveMessageFilter Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.RemoveMessageFilter Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1482,20 +1482,20 @@ if visual styles are enabled for controls in the client area of application windows; otherwise, . - to return `true`. - -|Condition|Description| -|---------------|-----------------| -|The operating system supports visual styles|To verify this condition separately, use the property of the class.| -|The user has enabled visual styles in the operating system|To verify this condition separately, use the property of the class.| -|Visual styles are enabled in the application|Visual styles can be enabled in an application by calling the method or by using an application manifest that specifies that ComCtl32.dll version 6 or later will be used to draw controls.| -|Visual styles are being used to draw the client area of application windows|To verify this condition separately, use the property of the class and verify that it has the value or .| - + to return `true`. + +|Condition|Description| +|---------------|-----------------| +|The operating system supports visual styles|To verify this condition separately, use the property of the class.| +|The user has enabled visual styles in the operating system|To verify this condition separately, use the property of the class.| +|Visual styles are enabled in the application|Visual styles can be enabled in an application by calling the method or by using an application manifest that specifies that ComCtl32.dll version 6 or later will be used to draw controls.| +|Visual styles are being used to draw the client area of application windows|To verify this condition separately, use the property of the class and verify that it has the value or .| + ]]> @@ -1525,15 +1525,15 @@ Shuts down the application and starts a new instance immediately. - will launch the application again with the same options. - + will launch the application again with the same options. + ]]> Your code is not a Windows Forms application. You cannot call this method in this context. @@ -1574,13 +1574,13 @@ Begins running a standard application message loop on the current thread, without a form. - method is called, or when the method is called on the thread that is running the main message loop. - - Most Windows Forms developers will not need to use this version of the method. You should use the overload to start an application with a main form, so that the application terminates when the main form is closed. For all other situations, use the overload, which supports supplying an object for better control over the lifetime of the application. - + method is called, or when the method is called on the thread that is running the main message loop. + + Most Windows Forms developers will not need to use this version of the method. You should use the overload to start an application with a main form, so that the application terminates when the main form is closed. For all other situations, use the overload, which supports supplying an object for better control over the lifetime of the application. + ]]> A main message loop is already running on this thread. @@ -1618,24 +1618,24 @@ An in which the application is run. Begins running a standard application message loop on the current thread, with an . - or is called or the event is raised on the context object. - - - -## Examples - The example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates how to use an , along with the `Application.Run(context)` method, to display multiple forms when the application starts. - - The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . - - The code for the `AppForm1` and `AppForm2` forms is not shown for the purpose of brevity. See the class overview for the whole code listing. - + or is called or the event is raised on the context object. + + + +## Examples + The example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates how to use an , along with the `Application.Run(context)` method, to display multiple forms when the application starts. + + The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + + The code for the `AppForm1` and `AppForm2` forms is not shown for the purpose of brevity. See the class overview for the whole code listing. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Application/CPP/source.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ApplicationExit/source.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet2"::: + ]]> A main message loop is already running on this thread. @@ -1673,29 +1673,29 @@ A that represents the form to make visible. Begins running a standard application message loop on the current thread, and makes the specified form visible. - event. The event handler calls to clean up the application. - + event. The event handler calls to clean up the application. + > [!NOTE] -> The method of the class will be called prior to the return of this method. - - - -## Examples - The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. - - The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls to process all remaining messages in the queue and then to quit. - - The example requires that `listBox1` and `button1` have been created and placed on a form. - +> The method of the class will be called prior to the return of this method. + + + +## Examples + The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. + + The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls to process all remaining messages in the queue and then to quit. + + The example requires that `listBox1` and `button1` have been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.Exit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/Exit/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.Exit Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.Exit Example/VB/source.vb" id="Snippet1"::: + ]]> A main message loop is already running on the current thread. @@ -1760,40 +1760,40 @@ The default value to use for new controls. If , new controls that support UseCompatibleTextRendering use the GDI+ based class for text rendering; if , new controls use the GDI based class. Sets the application-wide default for the UseCompatibleTextRendering property defined on certain controls. - class, which is based on the GDI graphics library, or the class, which is based on the GDI+ graphics library. This change was made in .NET Framework 2.0 because of performance and localization issues with GDI+. Use to set the default value of the `UseCompatibleTextRendering` property for controls that support that property. - - The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the class and apps that perform custom text rendering using the class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. - - The GDI-based class was introduced in .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true`. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with an argument of `true`. - - You should never call this method if your Windows Forms code is hosted in another application, such as Internet Explorer. Only call this method in stand-alone Windows Forms applications. - -## Examples - + class, which is based on the GDI graphics library, or the class, which is based on the GDI+ graphics library. This change was made in .NET Framework 2.0 because of performance and localization issues with GDI+. Use to set the default value of the `UseCompatibleTextRendering` property for controls that support that property. + + The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the class and apps that perform custom text rendering using the class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. + + The GDI-based class was introduced in .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true`. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with an argument of `true`. + + You should never call this method if your Windows Forms code is hosted in another application, such as Internet Explorer. Only call this method in stand-alone Windows Forms applications. + +## Examples + > [!IMPORTANT] -> To set the default value for `UseCompatibleTextRendering` in Visual Basic 2005 or later, see . - -For C# apps, Visual Studio automatically adds a call to in the *Program.cs* file. To change the text rendering default, modify the generated code. - -```csharp -static class Program -{ - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); - } -} -``` - +> To set the default value for `UseCompatibleTextRendering` in Visual Basic 2005 or later, see . + +For C# apps, Visual Studio automatically adds a call to in the *Program.cs* file. To change the text rendering default, modify the generated code. + +```csharp +static class Program +{ + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } +} +``` + ]]> You can only call this method before the first window is created by your Windows Forms application. @@ -1877,14 +1877,14 @@ You can adjust text scale with the **Make text bigger** slider on the **Settings if the high DPI mode was set; otherwise, . - @@ -1925,11 +1925,11 @@ The high DPI mode is set once per process. For more information about setting th if the system is being suspended, otherwise, . - @@ -1943,17 +1943,17 @@ The high DPI mode is set once per process. For more information about setting th Instructs the application how to respond to unhandled exceptions. - so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. - - This example assumes that you have defined two controls, `button1` and `button2`, on your class. - + so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + + This example assumes that you have defined two controls, `button1` and `button2`, on your class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.ThreadException Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/SetUnhandledExceptionMode/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1992,26 +1992,26 @@ The high DPI mode is set once per process. For more information about setting th An value describing how the application should behave if an exception is thrown without being caught. Instructs the application how to respond to unhandled exceptions. - before you instantiate the main form of your application using the method. - - To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. - - - -## Examples - The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. - - This example assumes that you have defined two controls, `button1` and `button2`, on your class. - + before you instantiate the main form of your application using the method. + + To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. + + + +## Examples + The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + + This example assumes that you have defined two controls, `button1` and `button2`, on your class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.ThreadException Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/SetUnhandledExceptionMode/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: + ]]> You cannot set the exception mode after the application has created its first window. @@ -2049,30 +2049,30 @@ The high DPI mode is set once per process. For more information about setting th to set the thread exception mode; otherwise, . Instructs the application how to respond to unhandled exceptions, optionally applying thread-specific behavior. - before you instantiate the main form of your application using the method. - - When `threadScope` is `true`, the thread exception mode is set. The thread exception mode overrides the application exception mode if `mode` is not set to . - - When `threadScope` is `false`, the application exception mode is set. The application exception mode is used for all threads that have the mode. Setting the application exception mode does not affect the setting of the current thread. - - To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. - - - -## Examples - The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. - - This example assumes that you have defined two controls, `button1` and `button2`, on your class. - + before you instantiate the main form of your application using the method. + + When `threadScope` is `true`, the thread exception mode is set. The thread exception mode overrides the application exception mode if `mode` is not set to . + + When `threadScope` is `false`, the application exception mode is set. The application exception mode is used for all threads that have the mode. Setting the application exception mode does not affect the setting of the current thread. + + To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. + + + +## Examples + The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + + This example assumes that you have defined two controls, `button1` and `button2`, on your class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.ThreadException Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/SetUnhandledExceptionMode/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: + ]]> You cannot set the exception mode after the application has created its first window. @@ -2102,19 +2102,19 @@ The high DPI mode is set once per process. For more information about setting th Gets the path for the executable file that started the application, not including the executable name. - The path for the executable file that started the application. - - This path will be different depending on whether the Windows Forms application is deployed using ClickOnce. ClickOnce applications are stored in a per-user application cache in the C:\Documents and Settings\\*username* directory. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). + The path for the executable file that started the application. + + This path will be different depending on whether the Windows Forms application is deployed using ClickOnce. ClickOnce applications are stored in a per-user application cache in the C:\Documents and Settings\\*username* directory. For more information, see Accessing Local and Remote Data in ClickOnce Applications. - @@ -2159,33 +2159,33 @@ The high DPI mode is set once per process. For more information about setting th Occurs when an untrapped thread exception is thrown. - event to deal with these exceptions, which will leave your application in an unknown state. Where possible, exceptions should be handled by a structured exception handling block. - - You can change whether this callback is used for unhandled Windows Forms thread exceptions by setting . To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. - + event to deal with these exceptions, which will leave your application in an unknown state. Where possible, exceptions should be handled by a structured exception handling block. + + You can change whether this callback is used for unhandled Windows Forms thread exceptions by setting . To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. + > [!NOTE] -> To guarantee that no activations of this event are missed, you must attach a handler before you call . - +> To guarantee that no activations of this event are missed, you must attach a handler before you call . + > [!NOTE] > Only one handler can be attached to this event. If multiple handlers are added, only the most recently added handler will be called on an unhandled exception. - + > [!CAUTION] -> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. - - - -## Examples - The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. - - This example assumes that you have defined two controls, `button1` and `button2`, on your class. - +> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. + + + +## Examples + The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + + This example assumes that you have defined two controls, `button1` and `button2`, on your class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.ThreadException Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/SetUnhandledExceptionMode/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Application.ThreadException Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -2230,24 +2230,24 @@ The high DPI mode is set once per process. For more information about setting th Occurs when a thread is about to shut down. When the main thread for an application is about to be shut down, this event is raised first, followed by an event. - event to perform any unhandled, required tasks before the thread stops running. Close files opened by this thread, or dispose of objects that the garbage collector did not reclaim. - + event to perform any unhandled, required tasks before the thread stops running. Close files opened by this thread, or dispose of objects that the garbage collector did not reclaim. + > [!CAUTION] -> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. - +> Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet6"::: + ]]> @@ -2312,30 +2312,30 @@ The high DPI mode is set once per process. For more information about setting th Gets the path for the application data of a user. The path for the application data of a user. - \\\\ - - Data stored in this path is part of user profile that is enabled for roaming. A roaming user works on more than one computer in a network. The user profile for a roaming user is kept on a server on the network and is loaded onto a system when the user logs on. For a user profile to be considered for roaming, the operating system must support roaming profiles and it must be enabled. - - A typical base path is C:\Documents and Settings\\*username*\Application Data. This path will be different, however, if the Windows Forms application is deployed by using ClickOnce. ClickOnce creates its own application data directory that is isolated from all other applications. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). - - - -## Examples - The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates using the property to store application data for the user. - - The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . - - This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. - + \\\\ + + Data stored in this path is part of user profile that is enabled for roaming. A roaming user works on more than one computer in a network. The user profile for a roaming user is kept on a server on the network and is loaded onto a system when the user logs on. For a user profile to be considered for roaming, the operating system must support roaming profiles and it must be enabled. + + A typical base path is C:\Documents and Settings\\*username*\Application Data. This path will be different, however, if the Windows Forms application is deployed by using ClickOnce. ClickOnce creates its own application data directory that is isolated from all other applications. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). + + + +## Examples + The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates using the property to store application data for the user. + + The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + + This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Application/CPP/source.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ApplicationExit/source.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet5"::: + ]]> @@ -2367,15 +2367,15 @@ The high DPI mode is set once per process. For more information about setting th Gets the registry key for the application data of a user. A representing the registry key for the application data specific to the user. - \\\\ - - Data stored in this key is part of user profile that is enabled for roaming. A roaming user works on more than one computer in a network. The user profile for a roaming user is kept on a server on the network and is loaded onto a system when the user logs on. For a user profile to be considered for roaming, the operating system must support roaming profiles and it must be enabled. - + \\\\ + + Data stored in this key is part of user profile that is enabled for roaming. A roaming user works on more than one computer in a network. The user profile for a roaming user is kept on a server on the network and is loaded onto a system when the user logs on. For a user profile to be considered for roaming, the operating system must support roaming profiles and it must be enabled. + ]]> @@ -2450,11 +2450,11 @@ The visual styles will not be enabled if the OS does not support them, or themin is the wait cursor is used for all open forms; otherwise, . - property of all open forms in the application will be set to `true`. This call will not return until this property has been set on all forms. Use this property when you have a long-running operation, and want to indicate in all application forms that the operation is still processing. - + property of all open forms in the application will be set to `true`. This call will not return until this property has been set on all forms. Use this property when you have a long-running operation, and want to indicate in all application forms that the operation is still processing. + ]]> @@ -2484,20 +2484,20 @@ The visual styles will not be enabled if the OS does not support them, or themin Gets a value that specifies how visual styles are applied to application windows. A bitwise combination of the values. - property determines whether visual styles are enabled in client areas or nonclient areas of application windows. Generally, this property should be set within the main form's constructor or event handler. - - - -## Examples - The following code example sets the property to one of the values within the event handler for a control. This code example is part of a larger example provided for the enumeration. - + property determines whether visual styles are enabled in client areas or nonclient areas of application windows. Generally, this property should be set within the main form's constructor or event handler. + + + +## Examples + The following code example sets the property to one of the values within the event handler for a control. This code example is part of a larger example provided for the enumeration. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleState/cpp/visualstylestate.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/VisualStyleState/visualstylestate.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleState/VB/visualstylestate.vb" id="Snippet10"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleState/VB/visualstylestate.vb" id="Snippet10"::: + ]]> diff --git a/xml/System.Windows.Forms/ApplicationContext.xml b/xml/System.Windows.Forms/ApplicationContext.xml index 68bc3851c82..dbed52f9ebb 100644 --- a/xml/System.Windows.Forms/ApplicationContext.xml +++ b/xml/System.Windows.Forms/ApplicationContext.xml @@ -42,24 +42,24 @@ Specifies the contextual information about an application thread. - class to redefine the circumstances that cause a message loop to exit. By default, the listens to the event on the application's main , then exits the thread's message loop. - - - -## Examples - The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates how to use an , along with the `Application.Run(context)` method, to display multiple forms when the application starts. - - The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . - - The `Main` method calls `Application.Run(context)` to start the application, given the . - + class to redefine the circumstances that cause a message loop to exit. By default, the listens to the event on the application's main , then exits the thread's message loop. + + + +## Examples + The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates how to use an , along with the `Application.Run(context)` method, to display multiple forms when the application starts. + + The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . + + The `Main` method calls `Application.Run(context)` to start the application, given the . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Application/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ApplicationExit/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet1"::: + ]]> @@ -130,11 +130,11 @@ The main of the application to use for context. Initializes a new instance of the class with the specified . - is not overridden, the message loop of the thread terminates when is closed. - + is not overridden, the message loop of the thread terminates when is closed. + ]]> @@ -180,14 +180,14 @@ Releases all resources used by the . - when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -222,20 +222,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -271,25 +271,25 @@ Terminates the message loop of the thread. - . - + . + > [!NOTE] -> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. - - - -## Examples - The following code example is an excerpt from the example in the class overview. This example keeps track of open forms and exits the current thread when all forms are closed. The `OnFormClosed` method is an event handler for the event. When the number of open forms is equal to 0, then current thread is exited by calling the method. The number of forms is tracked by incrementing the `formCount` variable when a form is shown, and decrementing it when a form is closed. - - Some code is not shown for the purpose of brevity. See for the whole code listing. - +> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. + + + +## Examples + The following code example is an excerpt from the example in the class overview. This example keeps track of open forms and exits the current thread when all forms are closed. The `OnFormClosed` method is an event handler for the event. When the number of open forms is equal to 0, then current thread is exited by calling the method. The number of forms is tracked by incrementing the `formCount` variable when a form is shown, and decrementing it when a form is closed. + + Some code is not shown for the purpose of brevity. See for the whole code listing. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Application/CPP/source.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/ApplicationExit/source.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Application/VB/source.vb" id="Snippet3"::: + ]]> @@ -320,14 +320,14 @@ Terminates the message loop of the thread. - . - + . + > [!NOTE] -> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. - +> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. + ]]> @@ -358,15 +358,15 @@ Attempts to free resources and perform other cleanup operations before the application context is reclaimed by garbage collection. - and cleans up resources by calling `Dispose(false)`. Override `Dispose(Boolean)` to customize the cleanup. - - Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. - - For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). - + and cleans up resources by calling `Dispose(false)`. Override `Dispose(Boolean)` to customize the cleanup. + + Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. + + For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + ]]> @@ -404,11 +404,11 @@ Gets or sets the to use as context. The to use as context. - for this context. This property can change at any time. If is not overridden, the message loop of the thread terminates when the `mainForm` parameter closes. - + for this context. This property can change at any time. If is not overridden, the message loop of the thread terminates when the `mainForm` parameter closes. + ]]> @@ -462,11 +462,11 @@ The that contains the event data. Calls , which raises the event. - . - + . + ]]> @@ -523,13 +523,13 @@ Gets or sets an object that contains data about the control. An that contains data about the control. The default is . - class can be assigned to this property. If the property is set through the Windows Forms designer, only text can be assigned. - - A common use for the property is to store data that is closely associated with the control. For example, if you have a control that displays information about a customer, you might store a that contains the customer's order history in that control's property so the data can be accessed quickly. - + class can be assigned to this property. If the property is set through the Windows Forms designer, only text can be assigned. + + A common use for the property is to store data that is closely associated with the control. For example, if you have a control that displays information about a customer, you might store a that contains the customer's order history in that control's property so the data can be accessed quickly. + ]]> @@ -561,16 +561,16 @@ Occurs when the message loop of the thread should be terminated, by calling . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ApplicationContext1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ApplicationContext1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet75"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet75"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet75"::: + ]]> diff --git a/xml/System.Windows.Forms/AxHost.xml b/xml/System.Windows.Forms/AxHost.xml index ee6fd9b5561..fa5f298483b 100644 --- a/xml/System.Windows.Forms/AxHost.xml +++ b/xml/System.Windows.Forms/AxHost.xml @@ -72,24 +72,24 @@ Wraps ActiveX controls and exposes them as fully featured Windows Forms controls. - class directly. You can use the [Aximp.exe (Windows Forms ActiveX Control Importer)](/dotnet/framework/tools/aximp-exe-windows-forms-activex-control-importer) to generate the wrappers that extend . - - The ActiveX Control Importer generates a class that is derived from the class, and compiles it into a library file (DLL) that can be added as a reference to your application. Alternatively, you can use the `/source` switch with the ActiveX Control Importer and a C# file is generated for your derived class. You can then make changes to the code and recompile it into a library file. - + class directly. You can use the [Aximp.exe (Windows Forms ActiveX Control Importer)](/dotnet/framework/tools/aximp-exe-windows-forms-activex-control-importer) to generate the wrappers that extend . + + The ActiveX Control Importer generates a class that is derived from the class, and compiles it into a library file (DLL) that can be added as a reference to your application. Alternatively, you can use the `/source` switch with the ActiveX Control Importer and a C# file is generated for your derived class. You can then make changes to the code and recompile it into a library file. + > [!NOTE] -> If the name of a member of the ActiveX control matches a name defined in the .NET Framework, then the ActiveX Control Importer will prefix the member name with "Ctl" when it creates the derived class. For example, if your ActiveX control has a member named "Layout", it is renamed "CtlLayout" in the derived class because the `Layout` event is defined within the .NET Framework. - - Most of the common properties of the class are only valid and used if the underlying ActiveX control exposes those properties. A few examples of the common properties are , , , and . - +> If the name of a member of the ActiveX control matches a name defined in the .NET Framework, then the ActiveX Control Importer will prefix the member name with "Ctl" when it creates the derived class. For example, if your ActiveX control has a member named "Layout", it is renamed "CtlLayout" in the derived class because the `Layout` event is defined within the .NET Framework. + + Most of the common properties of the class are only valid and used if the underlying ActiveX control exposes those properties. A few examples of the common properties are , , , and . + > [!NOTE] > If you're using Visual Studio as your Windows Forms design environment, you can make an ActiveX control available to your application by adding the ActiveX control to your Toolbox. To accomplish this, right-click the **Toolbox**, select **Customize Toolbox**, then browse to the ActiveX control's *.ocx* file. For more information, see [How to: Add ActiveX Controls to Windows Forms](/dotnet/desktop/winforms/controls/how-to-add-activex-controls-to-windows-forms). - -## Examples + +## Examples The following code example overrides the constructor and the and methods of an -derived class that wraps the Microsoft Masked Edit ActiveX Control. This code requires that you've generated the source code by running the AxImp.exe tool on the *MSMask32.ocx* file with the `/source` switch. This code is only shown in C# syntax because that's the only language output by the AxImp.exe tool. - + ```csharp public AxMaskEdBox() : @@ -128,7 +128,7 @@ } } ``` - + ]]> @@ -216,13 +216,13 @@ An that modifies the shortcut-menu behavior for the control. Initializes a new instance of the class, wrapping the ActiveX control indicated by the specified CLSID, and using the shortcut-menu behavior indicated by the specified value. - @@ -333,11 +333,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -421,11 +421,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -543,11 +543,11 @@ Begins the initialization of the ActiveX control. - method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. - + method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. + ]]> @@ -589,11 +589,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -634,11 +634,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -679,11 +679,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -733,11 +733,11 @@ Gets or sets the control containing the ActiveX control. A that represents the control containing the ActiveX control. - property value can be different from the property. The represented by this property is the ActiveX control's logical container. For example, if an ActiveX control is hosted in a control, and the is contained on a , then the property value of the ActiveX control is the , and the property value is the control. - + property value can be different from the property. The represented by this property is the ActiveX control's logical container. For example, if an ActiveX control is hosted in a control, and the is contained on a , then the property value of the ActiveX control is the , and the property value is the control. + ]]> @@ -806,11 +806,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -947,11 +947,11 @@ Called by the control to prepare it for listening to events. - @@ -1042,11 +1042,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1141,11 +1141,11 @@ Called by the control when it stops listening to events. - @@ -1219,11 +1219,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1257,11 +1257,11 @@ One of the actions enumerated for the object in IOleObject::EnumVerbs. Requests that an object perform an action in response to an end-user's action. - IOleObject::DoVerb @@ -1304,11 +1304,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1349,11 +1349,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1394,11 +1394,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1439,11 +1439,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1608,11 +1608,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1652,11 +1652,11 @@ Ends the initialization of an ActiveX control. - method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. - + method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. + ]]> @@ -1748,11 +1748,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1831,11 +1831,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -1921,7 +1921,7 @@ The IFont to create a from. - Returns a created from the specified OLE [IFont](https://go.microsoft.com/fwlink/?LinkId=166075) object. + Returns a created from the specified OLE IFont object. The created from the specified IFont, if the font could not be created, or if is . To be added. @@ -2013,7 +2013,7 @@ The font to create an IFontDisp object from. - Returns an OLE [IFontDisp](https://go.microsoft.com/fwlink/?LinkId=166073) object created from the specified object. + Returns an OLE IFontDisp object created from the specified object. The IFontDisp object created from the specified font or if is . To be added. The property value is not . @@ -2059,8 +2059,8 @@ The font to create an IFont object from. - Returns an OLE [IFont](https://go.microsoft.com/fwlink/?LinkId=166075) object created from the specified object. - The IFont object created from the specified font, or if is or the [IFont](https://go.microsoft.com/fwlink/?LinkId=166075) could not be created. + Returns an OLE IFont object created from the specified object. + The IFont object created from the specified font, or if is or the IFont could not be created. To be added. The property value is not . @@ -2232,15 +2232,15 @@ Returns an OLE Automation date that corresponds to the specified structure. A double-precision floating-point number that contains an OLE Automation date equivalent to specified value. - , the last moment of 31 December 9999. - + , the last moment of 31 December 9999. + For more information, see [Automation](/cpp/mfc/automation). - + ]]> The value of this instance cannot be represented as an OLE Automation Date. @@ -2371,11 +2371,11 @@ Returns an corresponding to the specified OLE object. An representing the . - does not work correctly at this time. - + does not work correctly at this time. + ]]> @@ -2421,11 +2421,11 @@ Returns an corresponding to the specified OLE object. An representing the . - method to convert an `IPictureDisp` object into an , however, because the `IPictureDisp` OLE interface is a subset of the `IPicture` interface. - + method to convert an `IPictureDisp` object into an , however, because the `IPictureDisp` OLE interface is a subset of the `IPicture` interface. + ]]> @@ -2470,11 +2470,11 @@ Called by the system to retrieve the current bounds of the ActiveX control. The unmodified value. - @@ -2515,15 +2515,15 @@ Returns a structure that corresponds to the specified OLE Automation date. A that represents the same date and time as . - The date is not a valid OLE Automation Date value. @@ -2565,11 +2565,11 @@ The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -2615,8 +2615,8 @@ if the ActiveX control has an **About** dialog box; otherwise, . - if the ActiveX control has a property page; otherwise, . - @@ -2702,11 +2702,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -2788,11 +2788,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -2862,13 +2862,13 @@ The **About** dialog box typically displays version and copyright information ab if the character should be sent directly to the ActiveX control and not preprocessed; otherwise, . - method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the ActiveX control. The preprocessing of a character includes checking whether the character is a mnemonic of another control. - - As implemented in the class, the method always returns `true`, so the specified character is sent directly to the ActiveX control. - + method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the ActiveX control. The preprocessing of a character includes checking whether the character is a mnemonic of another control. + + As implemented in the class, the method always returns `true`, so the specified character is sent directly to the ActiveX control. + ]]> @@ -2910,11 +2910,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -2955,11 +2955,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3000,11 +3000,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3045,11 +3045,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3198,11 +3198,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3243,11 +3243,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3288,11 +3288,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3333,11 +3333,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3378,11 +3378,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3423,11 +3423,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3468,11 +3468,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3522,11 +3522,11 @@ The **About** dialog box typically displays version and copyright information ab Gets or sets the persisted state of the ActiveX control. A that represents the persisted state of the ActiveX control. - property is used after the control is created but before it is shown. The persisted state of the underlying ActiveX control is returned in the . - + property is used after the control is created but before it is shown. The persisted state of the underlying ActiveX control is returned in the . + ]]> The ActiveX control is already loaded. @@ -3716,11 +3716,11 @@ The **About** dialog box typically displays version and copyright information ab Called when the control transitions to the in-place active state. - @@ -3803,11 +3803,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -3989,11 +3989,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -4034,11 +4034,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -4559,11 +4559,11 @@ The **About** dialog box typically displays version and copyright information ab The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -4603,13 +4603,13 @@ The **About** dialog box typically displays version and copyright information ab The to call. Calls the method to display the ActiveX control's About dialog box. - method also allows derived classes to handle the method without attaching a delegate. This is the preferred technique for handling the method in a derived class. For an example, see . - + ]]> @@ -4719,11 +4719,11 @@ For an example, see . Displays the ActiveX control's **About** dialog box. - is `false`, no **About** dialog box is displayed. - + is `false`, no **About** dialog box is displayed. + ]]> @@ -4766,13 +4766,13 @@ For an example, see . Displays the property pages associated with the ActiveX control. - is `false`, no property pages are displayed. - - Property pages allow an ActiveX control user to view and change ActiveX control properties. These properties are accessed by invoking a control properties dialog box, which contains one or more property pages that provide a customized, graphical interface for viewing and editing the control properties. - + is `false`, no property pages are displayed. + + Property pages allow an ActiveX control user to view and change ActiveX control properties. These properties are accessed by invoking a control properties dialog box, which contains one or more property pages that provide a customized, graphical interface for viewing and editing the control properties. + ]]> @@ -4814,13 +4814,13 @@ For an example, see . The parent of the ActiveX control. Displays the property pages associated with the ActiveX control assigned to the specified parent control. - is `false`, no property pages are displayed. - - Property pages allow an ActiveX control user to view and change ActiveX control properties. These properties are accessed by invoking a control properties dialog box, which contains one or more property pages that provide a customized, graphical interface for viewing and editing the control properties. - + is `false`, no property pages are displayed. + + Property pages allow an ActiveX control user to view and change ActiveX control properties. These properties are accessed by invoking a control properties dialog box, which contains one or more property pages that provide a customized, graphical interface for viewing and editing the control properties. + ]]> @@ -4892,11 +4892,11 @@ For an example, see . The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> @@ -4996,11 +4996,11 @@ This member is an explicit interface member implementation. It can be used only Returns the class name of the current object. Returns in all cases. - method returns. - + method returns. + ]]> @@ -5046,11 +5046,11 @@ This member is an explicit interface member implementation. It can be used only Returns the name of the current object. Returns in all cases. - method returns. - + method returns. + ]]> @@ -5100,11 +5100,11 @@ This member is an explicit interface member implementation. It can be used only Returns a type converter for the current object. Returns in all cases. - method returns. - + method returns. + ]]> @@ -5717,11 +5717,11 @@ This member is an explicit interface member implementation. It can be used only The event is not supported by the class. - event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. - + event, a is thrown. The events derived from the class are not supported by the class. The events exposed by the ActiveX control when the wrapper is created are the events that should be used. + ]]> diff --git a/xml/System.Windows.Forms/BindingNavigator.xml b/xml/System.Windows.Forms/BindingNavigator.xml index e5586da90d7..5ecb2145529 100644 --- a/xml/System.Windows.Forms/BindingNavigator.xml +++ b/xml/System.Windows.Forms/BindingNavigator.xml @@ -60,40 +60,40 @@ Represents the navigation and manipulation user interface (UI) for controls on a form that are bound to data. - control represents a standardized way to navigate and manipulate data on a form. In most cases, a is paired with a control to move through data records on a form and interact with them. In these cases, the property is set to the associated component that acts as a data source. - - By default, the control's user interface (UI) is composed of a series of buttons, text boxes, and static text elements for most common data-related actions, such as adding data, deleting data, and navigating through data. Each of these controls can be retrieved or set through an associated member of the control. Likewise, there is also a one-to-one correspondence to members within the class that programmatically perform the same functionality, as shown in the following table. - -|UI Control| member| member| -|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| -|**Move First**||| -|**Move Previous**||| -|**Current Position**||| -|**Count**||| -|**Move Next**||| -|**Move Last**||| -|**Add New**||| -|**Delete**||| - - Adding a control to a form and binding it to a data source, such as a , will automatically establish the relationships in this table. - - You can use one of the following techniques to customize this toolbar: - -- Create the with the constructor, which accepts a Boolean `addStandardItems` parameter, and set this parameter to `false`. Then add the desired objects to the collection. - -- If a great deal of customization is desired, or the custom design will be reused, derive a class from and override the method to define additional or alternate standard items. - - - -## Examples - The following code example demonstrates how to use a control to move through a data set. The set is contained in a , which is bound to a control with a component. - + control represents a standardized way to navigate and manipulate data on a form. In most cases, a is paired with a control to move through data records on a form and interact with them. In these cases, the property is set to the associated component that acts as a data source. + + By default, the control's user interface (UI) is composed of a series of buttons, text boxes, and static text elements for most common data-related actions, such as adding data, deleting data, and navigating through data. Each of these controls can be retrieved or set through an associated member of the control. Likewise, there is also a one-to-one correspondence to members within the class that programmatically perform the same functionality, as shown in the following table. + +|UI Control| member| member| +|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| +|**Move First**||| +|**Move Previous**||| +|**Current Position**||| +|**Count**||| +|**Move Next**||| +|**Move Last**||| +|**Add New**||| +|**Delete**||| + + Adding a control to a form and binding it to a data source, such as a , will automatically establish the relationships in this table. + + You can use one of the following techniques to customize this toolbar: + +- Create the with the constructor, which accepts a Boolean `addStandardItems` parameter, and set this parameter to `false`. Then add the desired objects to the collection. + +- If a great deal of customization is desired, or the custom design will be reused, derive a class from and override the method to define additional or alternate standard items. + + + +## Examples + The following code example demonstrates how to use a control to move through a data set. The set is contained in a , which is bound to a control with a component. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingNavigator/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataNavigator/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataNavigator/VB/form1.vb" id="Snippet1"::: + ]]> @@ -140,11 +140,11 @@ Initializes a new instance of the class. - property to `null`. This constructor is equivalent to calling the constructor with a parameter value of `false`. You can add the standard items by making a separate call to . - + property to `null`. This constructor is equivalent to calling the constructor with a parameter value of `false`. You can add the standard items by making a separate call to . + ]]> @@ -177,11 +177,11 @@ to show the standard navigational UI; otherwise, . Initializes a new instance of the class, indicating whether to display the standard navigation user interface (UI). - property to `null`. If is `false`, , , , , , , and will also be `null`. - + property to `null`. If is `false`, , , , , , , and will also be `null`. + ]]> @@ -223,11 +223,11 @@ The to add the new control to. Initializes a new instance of the class and adds this new instance to the specified container. - control and adding it to a parent . Like the parameterless constructor, it sets the property to `null` and does not show the standard user interface. - + control and adding it to a parent . Like the parameterless constructor, it sets the property to `null` and does not show the standard user interface. + ]]> @@ -260,11 +260,11 @@ The used as a data source. Initializes a new instance of the class with the specified as the data source. - property. It also adds the standard set of navigational buttons and sets their corresponding properties, such as and . - + property. It also adds the standard set of navigational buttons and sets their corresponding properties, such as and . + ]]> @@ -303,17 +303,17 @@ Gets or sets the that represents the **Add New** button. A that represents the **Add New** button for the . The default is . - property generates the event handler for the **Add New** button. This event handler calls the method when the **Add New** button is clicked at run time. - - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The control will disable the **Add New** button if the property is `null` or the property is `false`. - - In the default implementation, this property represents a control of type . - + property generates the event handler for the **Add New** button. This event handler calls the method when the **Add New** button is clicked at run time. + + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The control will disable the **Add New** button if the property is `null` or the property is `false`. + + In the default implementation, this property represents a control of type . + ]]> @@ -348,16 +348,16 @@ Adds the standard set of navigation items to the control. - method adds the standard set of user interface objects to the tool strip for basic navigation operations, such as **Move First**, **Move Last**, and **Add New**. - - Override in derived classes to define additional or alternative tool strip items. To ensure optimal design-time support for your derived class, make sure each item has a meaningful value in its property. At design time, this will be used to generate a unique name for the corresponding member variable. The item's property will then be updated to match the name given to the member variable. - + method adds the standard set of user interface objects to the tool strip for basic navigation operations, such as **Move First**, **Move Last**, and **Add New**. + + Override in derived classes to define additional or alternative tool strip items. To ensure optimal design-time support for your derived class, make sure each item has a meaningful value in its property. At design time, this will be used to generate a unique name for the corresponding member variable. The item's property will then be updated to match the name given to the member variable. + > [!NOTE] -> This method does not explicitly remove any previously existing items from the , but does set new values for the , , , , , , and properties. Also does not suspend layout while items are being added. - +> This method does not explicitly remove any previously existing items from the , but does set new values for the , , , , , , and properties. Also does not suspend layout while items are being added. + ]]> @@ -393,11 +393,11 @@ Disables updates to the controls of the during the component's initialization. - and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. - + and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. + ]]> @@ -448,21 +448,21 @@ Gets or sets the component that is the source of data. The component associated with this . The default is . - property represents the data source that the navigates through. More specifically, the property of the represents the actual data list. - - This is the default property for the class. - - - -## Examples - The following code example demonstrates how to use a control to move through a data set. The set is contained in a , which is bound to a control with a component. This code example is part of a larger example provided in [How to: Move Through a DataSet with the Windows Forms BindingNavigator Control](/dotnet/framework/winforms/controls/move-through-a-dataset-with-wf-bindingnavigator-control). - + property represents the data source that the navigates through. More specifically, the property of the represents the actual data list. + + This is the default property for the class. + + + +## Examples + The following code example demonstrates how to use a control to move through a data set. The set is contained in a , which is bound to a control with a component. This code example is part of a larger example provided in [How to: Move Through a DataSet with the Windows Forms BindingNavigator Control](/dotnet/framework/winforms/controls/move-through-a-dataset-with-wf-bindingnavigator-control). + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingNavigator/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataNavigator/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataNavigator/VB/form1.vb" id="Snippet1"::: + ]]> @@ -501,15 +501,15 @@ Gets or sets the that displays the total number of items in the associated . A that displays the total number of items in the associated . - property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The count of items is accessed through the property of the . - - In the default implementation, this property represents a control of type . - + property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The count of items is accessed through the property of the . + + In the default implementation, this property represents a control of type . + ]]> @@ -561,13 +561,13 @@ Gets or sets a string used to format the information displayed in the control. The format used to format the item count. The default is the string "of {0}". - control is a that displays the total number of items in the . The property is the format string used to format the count. - - For more information about format strings, see the method. - + control is a that displays the total number of items in the . The property is the format string used to format the count. + + For more information about format strings, see the method. + ]]> @@ -607,17 +607,17 @@ Gets or sets the that is associated with the **Delete** functionality. A that represents the **Delete** button for the . - event handler for the **Delete** button. This event handler calls the method when the **Delete** button is clicked at run time. - - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The control will disable the **Delete** button under the following run-time circumstances: the property is `null`, the property is 0, or the property is `false`. - - In the default implementation, this property represents a control of type . - + event handler for the **Delete** button. This event handler calls the method when the **Delete** button is clicked at run time. + + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The control will disable the **Delete** button under the following run-time circumstances: the property is `null`, the property is 0, or the property is `false`. + + In the default implementation, this property represents a control of type . + ]]> @@ -656,20 +656,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -701,11 +701,11 @@ Enables updates to the controls of the after the component's initialization has concluded. - and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. - + and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. + ]]> @@ -748,17 +748,17 @@ Gets or sets the that is associated with the **Move First** functionality. A that represents the **Move First** button for the . - event handler for the **Move First** button. This event handler calls the method when the **Move First** button is clicked at run time. - - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The control will disable the **Move First** button under the following run-time circumstances: the property is `null`, the property is zero, or for the related is `false`. - - In the default implementation, this property represents a control of type . - + event handler for the **Move First** button. This event handler calls the method when the **Move First** button is clicked at run time. + + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The control will disable the **Move First** button under the following run-time circumstances: the property is `null`, the property is zero, or for the related is `false`. + + In the default implementation, this property represents a control of type . + ]]> @@ -801,17 +801,17 @@ Gets or sets the that is associated with the **Move Last** functionality. A that represents the **Move Last** button for the . - event handler for the **Move Last** button. This event handler calls the method when the **Move Last** button is clicked at run time. - - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The control will disable the **Move Last** button under the following run-time circumstances: the property is `null` or the property is greater than or equal to the property. - - In the default implementation, this property represents a control of type . - + event handler for the **Move Last** button. This event handler calls the method when the **Move Last** button is clicked at run time. + + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The control will disable the **Move Last** button under the following run-time circumstances: the property is `null` or the property is greater than or equal to the property. + + In the default implementation, this property represents a control of type . + ]]> @@ -854,17 +854,17 @@ Gets or sets the that is associated with the **Move Next** functionality. A that represents the **Move Next** button for the . - event handler for the **Move Next** button. This event handler calls the method when the **Move Next** button is clicked at run time. - - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The control will disable the **Move Next** button under the following run-time circumstances: the property is `null` or the property is greater than or equal to the property. - - In the default implementation, this property represents a control of type . - + event handler for the **Move Next** button. This event handler calls the method when the **Move Next** button is clicked at run time. + + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The control will disable the **Move Next** button under the following run-time circumstances: the property is `null` or the property is greater than or equal to the property. + + In the default implementation, this property represents a control of type . + ]]> @@ -907,17 +907,17 @@ Gets or sets the that is associated with the **Move Previous** functionality. A that represents the **Move Previous** button for the . - property generates the event handler for the **Move Previous** button. This event handler calls the method when the **Move Previous** button is clicked at run time. - - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The control will disable the **Move Previous** button under the following run-time circumstances: the property is `null` or the property is less than or equal to 0. - - In the default implementation, this property represents a control of type . - + property generates the event handler for the **Move Previous** button. This event handler calls the method when the **Move Previous** button is clicked at run time. + + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The control will disable the **Move Previous** button under the following run-time circumstances: the property is `null` or the property is less than or equal to 0. + + In the default implementation, this property represents a control of type . + ]]> @@ -953,21 +953,21 @@ Raises the event. - event, the method performs the following operations against the state of the associated . - -- Sets the internal members using the current state. - -- Enables or disables user interface (UI) items appropriately for the current state. - -- Updates the and controls. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + event, the method performs the following operations against the state of the associated . + +- Sets the internal members using the current state. + +- Enables or disables user interface (UI) items appropriately for the current state. + +- Updates the and controls. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1009,17 +1009,17 @@ Gets or sets the that displays the current position within the . The that displays the current position. - property is of type . - - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - - The current position calculated by obtaining the property of the , and adding 1 to transform the position into a 1-based count. - - In the default implementation, this property represents a control of type . - + property is of type . + + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + + The current position calculated by obtaining the property of the , and adding 1 to transform the position into a 1-based count. + + In the default implementation, this property represents a control of type . + ]]> @@ -1052,23 +1052,23 @@ Occurs when the state of the navigational user interface (UI) needs to be refreshed to reflect the current state of the underlying data. - event signals that the navigational UI of the needs to be updated to reflect the current state of the associated . - - This is the default event for the class. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `BindingNavigator1`. Then ensure that the event handler is associated with the event. - + event signals that the navigational UI of the needs to be updated to reflect the current state of the associated . + + This is the default event for the class. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `BindingNavigator1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet124"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet124"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet124"::: + ]]> @@ -1105,11 +1105,11 @@ Refreshes the state of the standard items to reflect the current state of the data. - in a derived class, you should also override to refresh any custom standard items you have added to the control. - + in a derived class, you should also override to refresh any custom standard items you have added to the control. + ]]> @@ -1141,11 +1141,11 @@ if validation was successful and focus can shift to the ; otherwise, . - control. - + control. + ]]> diff --git a/xml/System.Windows.Forms/BindingSource.xml b/xml/System.Windows.Forms/BindingSource.xml index 6098c09d718..bd0f697fd33 100644 --- a/xml/System.Windows.Forms/BindingSource.xml +++ b/xml/System.Windows.Forms/BindingSource.xml @@ -1510,9 +1510,9 @@ - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. diff --git a/xml/System.Windows.Forms/ButtonBase.xml b/xml/System.Windows.Forms/ButtonBase.xml index 1c0880a5715..a880a64241a 100644 --- a/xml/System.Windows.Forms/ButtonBase.xml +++ b/xml/System.Windows.Forms/ButtonBase.xml @@ -49,15 +49,15 @@ Implements the basic functionality common to button controls. - . To create your own button class, inherit from the , , or class. - - To have the derived button control display an image, set the property or the and properties. The image can be aligned on the button control by setting the property. Likewise, to align the displayed on the button control, set the property. - - The property determines the style and appearance of the control. If the property is set to , the user's operating system determines the appearance of the control. - + . To create your own button class, inherit from the , , or class. + + To have the derived button control display an image, set the property or the and properties. The image can be aligned on the button control by setting the property. Likewise, to align the displayed on the button control, set the property. + + The property determines the style and appearance of the control. If the property is set to , the user's operating system determines the appearance of the control. + ]]> @@ -134,11 +134,11 @@ if the additional label text is to be indicated by an ellipsis; otherwise, . The default is . - to `true` to display text that extends beyond the width of the control as a tooltip when the user passes over the control with the mouse. You must set the control's `AutoSize` property to `false` if you want to be `true`. If `AutoSize` is `true`, the control will grow to fit the text and an ellipsis will not appear. - + to `true` to display text that extends beyond the width of the control as a tooltip when the user passes over the control with the mouse. You must set the control's `AutoSize` property to `false` if you want to be `true`. If `AutoSize` is `true`, the control will grow to fit the text and an ellipsis will not appear. + ]]> @@ -232,21 +232,21 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ButtonBase1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ButtonBase1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet136"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet136"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet136"::: + ]]> @@ -605,11 +605,11 @@ Gets the default Input Method Editor (IME) mode supported by this control. One of the values. - class, this property always returns the `Disable` value of . - + class, this property always returns the `Disable` value of . + ]]> @@ -674,20 +674,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -726,11 +726,11 @@ Gets the appearance of the border and the colors used to indicate check state and mouse state. One of the values. - property only with controls whose is . - + property only with controls whose is . + ]]> @@ -775,23 +775,23 @@ Gets or sets the flat style appearance of the button control. One of the values. The default value is . - property of the and classes is set to `System`, the control is drawn by the user's operating system and the check alignment is based upon the `CheckAlign` and property values. The `CheckAlign` property value is not changed, but the appearance of the control can be affected. The check box is horizontally aligned with either the left or right edge of the control (a left or center alignment appears left aligned, right remains unchanged), and vertically aligned the same as the descriptive text. For example, if you have a control with a `CheckAlign` property value of `ContentAlignment`. `MiddleCenter`, a property value of `ContentAlignment.TopRight`, and the property value is set to `System`, the check box alignment will appear to be `ContentAlignment.TopLeft` while the text alignment remains unchanged. - + property of the and classes is set to `System`, the control is drawn by the user's operating system and the check alignment is based upon the `CheckAlign` and property values. The `CheckAlign` property value is not changed, but the appearance of the control can be affected. The check box is horizontally aligned with either the left or right edge of the control (a left or center alignment appears left aligned, right remains unchanged), and vertically aligned the same as the descriptive text. For example, if you have a control with a `CheckAlign` property value of `ContentAlignment`. `MiddleCenter`, a property value of `ContentAlignment.TopRight`, and the property value is set to `System`, the check box alignment will appear to be `ContentAlignment.TopLeft` while the text alignment remains unchanged. + > [!NOTE] -> If the property is set to `FlatStyle.System`, any images assigned to the property are not displayed. - - - -## Examples - The following code example uses the derived class, and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. - +> If the property is set to `FlatStyle.System`, any images assigned to the property are not displayed. + + + +## Examples + The following code example uses the derived class, and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/FlatStyle/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: + ]]> The value assigned is not one of the values. @@ -827,11 +827,11 @@ Retrieves the size of a rectangular area into which a control can be fitted. An ordered pair of type representing the width and height of a rectangle. - differs by control. The might be unable to assign the returned size to the control. You can return a size larger than the constraints indicated in the `proposedSize` parameter, but `proposedSize` should decrease as the constraint decreases. For example, `GetPreferredSize(new Size(100, 0))` should not be wider than `GetPreferredSize(new Size(200, 0))`. The exception is a `proposedSize` of 0 or `Size.Empty`, which are defined as unconstrained. - + differs by control. The might be unable to assign the returned size to the control. You can return a size larger than the constraints indicated in the `proposedSize` parameter, but `proposedSize` should decrease as the constraint decreases. For example, `GetPreferredSize(new Size(100, 0))` should not be wider than `GetPreferredSize(new Size(200, 0))`. The exception is a `proposedSize` of 0 or `Size.Empty`, which are defined as unconstrained. + ]]> @@ -881,23 +881,23 @@ Gets or sets the image that is displayed on a button control. The displayed on the button control. The default value is . - property is set, the property will be set to `null`, and the property will be set to its default, -1. - + property is set, the property will be set to `null`, and the property will be set to its default, -1. + > [!NOTE] -> If the property is set to `FlatStyle.System`, any images assigned to the property are not displayed. - - - -## Examples - The following code example uses the derived class, and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. - +> If the property is set to `FlatStyle.System`, any images assigned to the property are not displayed. + + + +## Examples + The following code example uses the derived class, and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/FlatStyle/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -944,15 +944,15 @@ Gets or sets the alignment of the image on the button control. One of the values. The default value is . - and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. - + and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/FlatStyle/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: + ]]> The value assigned is not one of the values. @@ -1015,26 +1015,26 @@ Gets or sets the image list index value of the image displayed on the button control. A zero-based index, which represents the image position in an . The default is -1. - or properties are set, the property is set to its default value, `null`. - + or properties are set, the property is set to its default value, `null`. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. - - - -## Examples - The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. - +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. + + + +## Examples + The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/ImageIndex/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1093,14 +1093,14 @@ For example, consider a button control whose Gets or sets the key accessor for the image in the . A string representing the key of the image. - property specifies the image from the image list to display on the control. - + property specifies the image from the image list to display on the control. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + ]]> @@ -1158,23 +1158,23 @@ If you set the property, the Gets or sets the that contains the displayed on a button control. An . The default value is . - or property is set, the property is set `null`, which is its default value. - + or property is set, the property is set `null`, which is its default value. + > [!NOTE] -> If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (because the collection is a zero-based index), the property value is adjusted to one less than the property value. For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. - - - -## Examples - The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. - +> If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (because the collection is a zero-based index), the property value is adjusted to one less than the property value. For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. + + + +## Examples + The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/ImageIndex/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1217,11 +1217,11 @@ If you set the property, the Gets or sets the Input Method Editor (IME) mode supported by this control. This property is not relevant for this class. One of the values. - @@ -1276,11 +1276,11 @@ If you set the property, the Occurs when the property is changed. This event is not relevant for this class. - @@ -1321,13 +1321,13 @@ If you set the property, the if the button control is the default button; otherwise, . - property is set to `true`, the button is the default button for the . This means that the button is clicked when the ENTER key is pressed if no other button or any other control that captures the ENTER key has focus. - - To specify the default button of a form, set the property of the form to the desired button. - + property is set to `true`, the button is the default button for the . This means that the button is clicked when the ENTER key is pressed if no other button or any other control that captures the ENTER key has focus. + + To specify the default button of a form, set the property of the form to the desired button. + ]]> @@ -1528,13 +1528,13 @@ If you set the property, the An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1572,16 +1572,16 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + > [!NOTE] -> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. - +> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. + ]]> @@ -1619,13 +1619,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1663,13 +1663,13 @@ If you set the property, the An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1707,16 +1707,16 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + > [!NOTE] -> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. - +> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. + ]]> @@ -1754,16 +1754,16 @@ If you set the property, the An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + > [!NOTE] -> Do not call if the button is disabled (this includes call to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. - +> Do not call if the button is disabled (this includes call to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. + ]]> @@ -1801,13 +1801,13 @@ If you set the property, the An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1845,16 +1845,16 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + > [!NOTE] -> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. - +> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. + ]]> @@ -1891,13 +1891,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1935,13 +1935,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2187,15 +2187,15 @@ If you set the property, the Gets or sets the alignment of the text on the button control. One of the values. The default is . - and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. - + and sets some of its common properties. The result will be a flat button with text on the left and an image on the right. This code requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory, and that a reference to the namespace is included. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/FlatStyle/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ButtonBase.FlatStyle Example/VB/source.vb" id="Snippet1"::: + ]]> The value assigned is not one of the values. @@ -2276,13 +2276,13 @@ If you set the property, the if the class should be used to perform text rendering for compatibility with versions 1.0 and 1.1. of the .NET Framework; otherwise, . The default is . - class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. - - The GDI based class was introduced in the .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of the .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. - + class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. + + The GDI based class was introduced in the .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of the .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. + ]]> @@ -2353,11 +2353,11 @@ If you set the property, the if the background is drawn using visual styles; otherwise, . - diff --git a/xml/System.Windows.Forms/ComboBox.xml b/xml/System.Windows.Forms/ComboBox.xml index fa7ab53121c..cee1f53a122 100644 --- a/xml/System.Windows.Forms/ComboBox.xml +++ b/xml/System.Windows.Forms/ComboBox.xml @@ -65,33 +65,33 @@ Represents a Windows combo box control. - displays a text box combined with a , which enables the user to select items from the list or enter a new value. - - The property specifies whether the list is always displayed or whether the list is displayed in a drop-down. The property also specifies whether the text portion can be edited. See for the available settings and their effects. There is no setting to always display the list and disallow entering a new value. To display a list to which no new values can be added, use a control. - - To add or remove objects in the list at run time, use methods of the class (through the property of the ). You can assign an array of object references with the method. The list then displays the default string value for each object. You can add individual objects with the method. You can delete items with the method or clear the entire list with the method. - - In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. With the and methods, you can add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. - - You can use these properties to manage the currently selected item in the list, the property to specify the string displayed in the editing field, the property to get or set the current item, and the property to get or set a reference to the object. - + displays a text box combined with a , which enables the user to select items from the list or enter a new value. + + The property specifies whether the list is always displayed or whether the list is displayed in a drop-down. The property also specifies whether the text portion can be edited. See for the available settings and their effects. There is no setting to always display the list and disallow entering a new value. To display a list to which no new values can be added, use a control. + + To add or remove objects in the list at run time, use methods of the class (through the property of the ). You can assign an array of object references with the method. The list then displays the default string value for each object. You can add individual objects with the method. You can delete items with the method or clear the entire list with the method. + + In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. With the and methods, you can add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. + + You can use these properties to manage the currently selected item in the list, the property to specify the string displayed in the editing field, the property to get or set the current item, and the property to get or set a reference to the object. + > [!NOTE] -> If you have a , , or on a base Windows Forms page and want to modify the string collections of those controls in a derived form, the string collections of those controls in the base form must be empty. If the string collections are not empty, they become read-only when you derive another form. - - - -## Examples - The following code example is a complete application showing how you can use the method to add items to a , the method to find items in a , and the and methods to efficiently add a large number items to a . The ability to store values that are different from displayed text is inherited from . For an example of how to use this feature, see the class. - - You must add references to the `System.Drawing` and `System.Windows.Forms` namespaces to run this example. - +> If you have a , , or on a base Windows Forms page and want to modify the string collections of those controls in a derived form, the string collections of those controls in the base form must be empty. If the string collections are not empty, they become read-only when you derive another form. + + + +## Examples + The following code example is a complete application showing how you can use the method to add items to a , the method to find items in a , and the and methods to efficiently add a large number items to a . The ability to store values that are different from displayed text is inherited from . For an example of how to use this feature, see the class. + + You must add references to the `System.Drawing` and `System.Windows.Forms` namespaces to run this example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxtype.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxtype.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxtype.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxtype.vb" id="Snippet1"::: + ]]> @@ -220,18 +220,18 @@ Gets or sets a custom to use when the property is set to . A to use with . - , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. - - The use of the property is optional, but you must set the property to `CustomSource` in order to use . - - You must use the and properties together. - + , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. + + The use of the property is optional, but you must set the property to `CustomSource` in order to use . + + You must use the and properties together. + > [!NOTE] -> The operating system might limit the number of custom strings that it can display at once. For strings that contain a forward slash (/) or backward slash (\\), automatic completion appends all characters only up to and including the slash. - +> The operating system might limit the number of custom strings that it can display at once. For strings that contain a forward slash (/) or backward slash (\\), automatic completion appends all characters only up to and including the slash. + ]]> @@ -281,30 +281,30 @@ Gets or sets an option that controls how automatic completion works for the . One of the values of . The values are , , , and . The default is . - , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. - - If you set to , the list displays only if is or . - - The use of the property is optional, but you must set the property to in order to use . - - You must use the and properties together. - - With set to and set to , the behavior is as follows: - -- If the list of strings is empty, pressing the BACKSPACE or DELETE key does nothing. - -- If the BACKSPACE key is pressed in less than one second, the previous item is selected, or nothing is selected if the list of string is empty. - -- If the BACKSPACE key is pressed in more than one second, the first item is selected. - -- If the DELETE key is pressed, the first item is selected. - + , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. + + If you set to , the list displays only if is or . + + The use of the property is optional, but you must set the property to in order to use . + + You must use the and properties together. + + With set to and set to , the behavior is as follows: + +- If the list of strings is empty, pressing the BACKSPACE or DELETE key does nothing. + +- If the BACKSPACE key is pressed in less than one second, the previous item is selected, or nothing is selected if the list of string is empty. + +- If the BACKSPACE key is pressed in more than one second, the first item is selected. + +- If the DELETE key is pressed, the first item is selected. + > [!NOTE] -> The operating system might limit the number of custom strings that it can display at once. For strings that contain a forward slash (/) or backward slash (\\), automatic completion appends all characters only up to and including the slash. - +> The operating system might limit the number of custom strings that it can display at once. For strings that contain a forward slash (/) or backward slash (\\), automatic completion appends all characters only up to and including the slash. + ]]> The specified value is not one of the values of . @@ -355,28 +355,28 @@ Gets or sets a value specifying the source of complete strings used for automatic completion. One of the values of . The options are , , , , , , and . The default is . - , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - - The use of the property is optional, but you must set the property to in order to use . - - You must use the and properties together. - - With set to and set to , the behavior is as follows: - -- If the list of strings is empty, pressing the BACKSPACE or DELETE key does nothing. - -- If the BACKSPACE key is pressed in less than one second, the previous item is selected, or nothing is selected if the list of string is empty. - -- If the BACKSPACE key is pressed in more than one second, the first item is selected. - -- If the DELETE key is pressed, the first item is selected. - + , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + + The use of the property is optional, but you must set the property to in order to use . + + You must use the and properties together. + + With set to and set to , the behavior is as follows: + +- If the list of strings is empty, pressing the BACKSPACE or DELETE key does nothing. + +- If the BACKSPACE key is pressed in less than one second, the previous item is selected, or nothing is selected if the list of string is empty. + +- If the BACKSPACE key is pressed in more than one second, the first item is selected. + +- If the DELETE key is pressed, the first item is selected. + > [!NOTE] -> The operating system might limit the number of custom strings that it can display at once. For strings that contain a forward slash (/) or backward slash (\\), automatic completion appends all characters only up to and including the slash. - +> The operating system might limit the number of custom strings that it can display at once. For strings that contain a forward slash (/) or backward slash (\\), automatic completion appends all characters only up to and including the slash. + ]]> The specified value is not one of the values of . @@ -461,11 +461,11 @@ This property is not relevant to this class. The background image displayed in the control. - @@ -518,11 +518,11 @@ Occurs when the value of the property changes. - @@ -562,11 +562,11 @@ Gets or sets the background image layout as defined in the enumeration. One of the values of (, , , , or ). - The specified value is not one of the values of . @@ -619,11 +619,11 @@ Occurs when the property changes. - @@ -654,22 +654,22 @@ Maintains performance when items are added to the one at a time. - method is called. - - The preferred way to add items to the is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. - - - -## Examples - The following code example shows the usage of the and methods. The example is part of a complete code example in the class overview. - + method is called. + + The preferred way to add items to the is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. + + + +## Examples + The following code example shows the usage of the and methods. The example is part of a complete code example in the class overview. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet3"::: + ]]> @@ -727,11 +727,11 @@ Creates a handle for the control. - to avoid multiple layouts during handle creation due to size change. - + to avoid multiple layouts during handle creation due to size change. + ]]> @@ -817,19 +817,19 @@ Gets or sets the data source for this . An object that implements the interface or an . The default is . - property is set, the items collection cannot be modified. - - - -## Examples - The following example uses the property to display an array of weekdays in a . - + property is set, the items collection cannot be modified. + + + +## Examples + The following example uses the property to display an array of weekdays in a . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DataSource/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.combobox.datasource/vb/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.combobox.datasource/vb/form1.vb" id="Snippet1"::: + ]]> @@ -892,20 +892,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -956,11 +956,11 @@ This event is not relevant for this class. - @@ -1005,22 +1005,22 @@ Occurs when a visual aspect of an owner-drawn changes. - . You can use this event to perform the tasks needed to draw items in the . If you have a variable sized item (when the property is set to the `OwnerDrawVariable` value of ), before drawing an item, the event is raised. You can create an event handler for the event to specify the size for the item that you are going to draw in your event handler for the event. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. - + . You can use this event to perform the tasks needed to draw items in the . If you have a variable sized item (when the property is set to the `OwnerDrawVariable` value of ), before drawing an item, the event is raised. You can create an event handler for the event to specify the size for the item that you are going to draw in your event handler for the event. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1061,15 +1061,15 @@ Gets or sets a value indicating whether your code or the operating system will handle drawing of elements in the list. One of the enumeration values. The default is . - property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. - + property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: + ]]> The value is not a valid enumeration value. @@ -1118,20 +1118,20 @@ Occurs when the drop-down portion of a is shown. - control by setting the text property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. - + control by setting the text property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/VB/form1.vb" id="Snippet2"::: + ]]> @@ -1176,23 +1176,23 @@ Occurs when the drop-down portion of the is no longer visible. - event to restore the state of the from changes you made in response to the event. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. - + event to restore the state of the from changes you made in response to the event. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet168"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet168"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet168"::: + ]]> @@ -1237,11 +1237,11 @@ Gets or sets the height in pixels of the drop-down portion of the . The height, in pixels, of the drop-down box. - property resets the property to `false`. - + property resets the property to `false`. + ]]> The specified value is less than one. @@ -1283,20 +1283,20 @@ Gets or sets a value specifying the style of the combo box. One of the values. The default is . - property specifies whether the list is always displayed or whether the list is displayed in a drop-down. The property also specifies whether the text portion can be edited. See for the available settings and their effects. There is no setting to always display the list and disallow entering a new value. To display a list to which no new values can be added, use a control. - - - -## Examples - The following code example demonstrates setting the property. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. - + property specifies whether the list is always displayed or whether the list is displayed in a drop-down. The property also specifies whether the text portion can be edited. See for the available settings and their effects. There is no setting to always display the list and disallow entering a new value. To display a list to which no new values can be added, use a control. + + + +## Examples + The following code example demonstrates setting the property. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: + ]]> The assigned value is not one of the values. @@ -1343,21 +1343,21 @@ Occurs when the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet166"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet166"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet166"::: + ]]> @@ -1388,23 +1388,23 @@ Gets or sets the width of the of the drop-down portion of a combo box. The width, in pixels, of the drop-down box. - , this property returns the of the combo box. - + , this property returns the of the combo box. + > [!NOTE] -> The width of the drop-down cannot be smaller than the width. - - - -## Examples - The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. - +> The width of the drop-down cannot be smaller than the width. + + + +## Examples + The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: + ]]> The specified value is less than one. @@ -1475,20 +1475,20 @@ Resumes painting the control after painting is suspended by the method. - is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. - - - -## Examples - The following code example shows the usage of the and methods. The example is part of a code example in the class overview. - + is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. + + + +## Examples + The following code example shows the usage of the and methods. The example is part of a code example in the class overview. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet3"::: + ]]> @@ -1543,20 +1543,20 @@ Returns the index of the first item in the that starts with the specified string. The zero-based index of the first item found; returns -1 if no match is found. - method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. - - - -## Examples - The following code example shows the usage of the method and property. The example is part of a complete code example in the class overview. - + method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. + + + +## Examples + The following code example shows the usage of the method and property. The example is part of a complete code example in the class overview. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet4"::: + ]]> @@ -1600,17 +1600,17 @@ Returns the index of the first item in the beyond the specified index that contains the specified string. The search is not case sensitive. The zero-based index of the first item found; returns -1 if no match is found, or 0 if the parameter specifies . - method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a search for an exact word match instead of a partial match, use the method. - + method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a search for an exact word match instead of a partial match, use the method. + ]]> - The is less than -1. - - -or- - + The is less than -1. + + -or- + The is greater than the last index in the collection. @@ -1664,20 +1664,20 @@ Finds the first item in the combo box that matches the specified string. The zero-based index of the first item found; returns -1 if no match is found, or 0 if the parameter specifies . - method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform partial word search instead of an exact word match, use the method. - - - -## Examples - The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. - + method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform partial word search instead of an exact word match, use the method. + + + +## Examples + The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: + ]]> @@ -1725,28 +1725,28 @@ Finds the first item after the specified index that matches the specified string. The zero-based index of the first item found; returns -1 if no match is found, or 0 if the parameter specifies . - method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform partial word search instead of an exact word match, use the method. - - The search performed by this method is circular. Although the search starts at the next index after the `startIndex` parameter, the search restarts at 0 when the end of the collection is reached. However, note that if the `startIndex` parameter itself is equal to the last index in the collection, an exception is thrown. - - - -## Examples - The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. - + method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform partial word search instead of an exact word match, use the method. + + The search performed by this method is circular. Although the search starts at the next index after the `startIndex` parameter, the search restarts at 0 when the end of the collection is reached. However, note that if the `startIndex` parameter itself is equal to the last index in the collection, an exception is thrown. + + + +## Examples + The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: + ]]> - The is less than -1. - - -or- - + The is less than -1. + + -or- + The is equal to the last index in the collection. @@ -1789,17 +1789,17 @@ Gets or sets the appearance of the . One of the enumeration values that specifies the appearance of the control. The options are , , , and . The default is . - property is set to or , the drop-down arrow may be resized. Resizing is determined by the system DPI setting when the app.config file contains the following entry: - -``` - - -``` - + property is set to or , the drop-down arrow may be resized. Resizing is determined by the system DPI setting when the app.config file contains the following entry: + +``` + + +``` + ]]> The specified value is not one of the values of . @@ -1892,19 +1892,19 @@ Returns the height of an item in the . The height, in pixels, of the item at the specified index. - is not set to `OwnerDrawVariable`, the value of the `index` parameter is ignored because all items in a standard are the same size. You can use this property when you are using an owner-drawn to determine the size of any item within the . - - For more information about specifying the height for items in an owner-drawn list, see event. - + is not set to `OwnerDrawVariable`, the value of the `index` parameter is ignored because all items in a standard are the same size. You can use this property when you are using an owner-drawn to determine the size of any item within the . + + For more information about specifying the height for items in an owner-drawn list, see event. + ]]> - The is less than zero. - - -or- - + The is less than zero. + + -or- + The is greater than count of items in the list. @@ -1949,16 +1949,16 @@ if the list portion can contain only complete items; otherwise, . The default is . - based on the space requirements of your form, set this property to `false`. If the does not contain any items, this property has no effect. - - Setting the property resets the property to `false`. - + based on the space requirements of your form, set this property to `false`. If the does not contain any items, this property has no effect. + + Setting the property resets the property to `false`. + > [!NOTE] -> If the property is set to `OwnerDrawVariable`, this property has no effect. - +> If the property is set to `OwnerDrawVariable`, this property has no effect. + ]]> @@ -1994,11 +1994,11 @@ if the specified key is a regular input key; otherwise, . - method returns `true` when the `keyData` parameter includes the or value and the property is `true`. - + method returns `true` when the `keyData` parameter includes the or value and the property is `true`. + ]]> @@ -2035,13 +2035,13 @@ Gets or sets the height of an item in the combo box. The height, in pixels, of an item in the combo box. - property is set to `OwnerDrawFixed`, all items have the same height. When the property is set to `OwnerDrawVariable`, the property specifies the height of each item added to the . Because each item in an owner-drawn list can have a different height, you can use the method to get the height of a specific item in the . If you use the property on a with items of variable height, this property returns the height of the first item in the control. - - For more information about specifying the height for items in an owner-drawn list, see event. - + property is set to `OwnerDrawFixed`, all items have the same height. When the property is set to `OwnerDrawVariable`, the property specifies the height of each item added to the . Because each item in an owner-drawn list can have a different height, you can use the method to get the height of a specific item in the . If you use the property on a with items of variable height, this property returns the height of the first item in the control. + + For more information about specifying the height for items in an owner-drawn list, see event. + ]]> The item height value is less than zero. @@ -2099,24 +2099,24 @@ Gets an object representing the collection of the items contained in this . A representing the items in the . - . With this reference, you can add items, remove items, and obtain a count of the items in the collection. - - Although the is typically used to display text items, you can add any object to the . Typically, the representation of an object in the is the string returned by that object's method. If you want to have a member of the object displayed instead, choose the member that will be displayed by setting the property to the name of the appropriate member. You can also choose a member of the object that will represent the value returned by the object by setting the property. For more information, see . - - For more information about the tasks that can be performed with the item collection, see the class reference topics. - - - -## Examples - The following code example demonstrates how to add a small number of items. If you need to add a large number of items, see the example at . Both examples are part of a larger example available in the class overview. - + . With this reference, you can add items, remove items, and obtain a count of the items in the collection. + + Although the is typically used to display text items, you can add any object to the . Typically, the representation of an object in the is the string returned by that object's method. If you want to have a member of the object displayed instead, choose the member that will be displayed by setting the property to the name of the appropriate member. You can also choose a member of the object that will represent the value returned by the object by setting the property. For more information, see . + + For more information about the tasks that can be performed with the item collection, see the class reference topics. + + + +## Examples + The following code example demonstrates how to add a small number of items. If you need to add a large number of items, see the example at . Both examples are part of a larger example available in the class overview. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet2"::: + ]]> @@ -2161,15 +2161,15 @@ Gets or sets the maximum number of items to be shown in the drop-down portion of the . The maximum number of items of in the drop-down portion. The minimum for this property is 1 and the maximum is 100. - control by setting the and properties and using the methods to search the . It also shows handling the event. - + control by setting the and properties and using the methods to search the . It also shows handling the event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: + ]]> The maximum number is set less than one or greater than 100. @@ -2280,22 +2280,22 @@ Occurs each time an owner-drawn item needs to be drawn and when the sizes of the list items are determined. - event. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. - + event. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/VB/form1.vb" id="Snippet1"::: + ]]> @@ -2449,15 +2449,15 @@ A that contains the event data. Raises the event. - item needs to be drawn and after is called. For more information, see . - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + item needs to be drawn and after is called. For more information, see . + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2496,15 +2496,15 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2540,13 +2540,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2584,15 +2584,15 @@ An that contains the event data. Raises the event. - to a new value. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + to a new value. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2697,13 +2697,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2740,13 +2740,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2783,13 +2783,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2831,13 +2831,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2874,11 +2874,11 @@ A that contains the event data. Raises the event. - property of `e` is or and the property is `true`, the method sets to `false`. - + property of `e` is or and the property is `true`, the method sets to `false`. + ]]> @@ -2945,13 +2945,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2988,15 +2988,15 @@ The that was raised. Raises the event. - item needs to be drawn and before is called. For more information, see . - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + item needs to be drawn and before is called. For more information, see . + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3061,13 +3061,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3103,13 +3103,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3146,13 +3146,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3189,13 +3189,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3232,15 +3232,15 @@ An that contains the event data. Raises the event. - property. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + property. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3277,15 +3277,15 @@ An that contains the event data. Raises the event. - property. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + property. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3322,13 +3322,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3365,24 +3365,24 @@ An that contains the event data. Raises the event. - is raised only when the user changes the combo box selection, or when you set the . However, depending on how the is configured, and how the user changes the selected item, the event may not be raised. Alternatively, you can handle the , but note that this event occurs whether the index is changed programmatically or by the user. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example uses the event and the property to change the length of the text box depending on what the user has selected and committed. - + is raised only when the user changes the combo box selection, or when you set the . However, depending on how the is configured, and how the user changes the selected item, the event may not be raised. Alternatively, you can handle the , but note that this event occurs whether the index is changed programmatically or by the user. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example uses the event and the property to change the length of the text box depending on what the user has selected and committed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxSelectedText/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/OnSelectionChangeCommitted/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxSelectedText/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxSelectedText/VB/form1.vb" id="Snippet1"::: + ]]> @@ -3424,13 +3424,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3466,13 +3466,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3515,13 +3515,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3568,11 +3568,11 @@ This property is not relevant for this class. A value. - @@ -3624,11 +3624,11 @@ This event is not relevant to this class. - @@ -3681,11 +3681,11 @@ Occurs when the control is redrawn. - @@ -3726,11 +3726,11 @@ Gets the preferred height of the . The preferred height, in pixels, of the item area of the combo box. - @@ -3766,13 +3766,13 @@ if the character was processed by the control; otherwise, . - method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. - + method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. + ]]> @@ -3957,20 +3957,20 @@ The number of characters to select. Selects a range of text in the editable portion of the . - [!NOTE] -> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. - +> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. + ]]> - The is less than zero. - - -or- - + The is less than zero. + + -or- + plus is less than zero. @@ -4045,35 +4045,35 @@ Gets or sets the index specifying the currently selected item. A zero-based index of the currently selected item. A value of negative one (-1) is returned if no item is selected. - event. - - , , and are related as follows: - -- If is `false`, will not be set to -1 when is blank. - -- If is `true`, will be set to -1 when is blank. - + event. + + , , and are related as follows: + +- If is `false`, will not be set to -1 when is blank. + +- If is `true`, will be set to -1 when is blank. + > [!NOTE] -> To deselect the currently selected item, set the to -1. You cannot set the of a item to -1 if the item is a data-bound item. - - - -## Examples - The following code example show how to use the method and property. The example is part of a complete example in the class overview. - +> To deselect the currently selected item, set the to -1. You cannot set the of a item to -1 if the item is a data-bound item. + + + +## Examples + The following code example show how to use the method and property. The example is part of a complete example in the class overview. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet4"::: + ]]> - The specified index is less than or equal to -2. - - -or- - + The specified index is less than or equal to -2. + + -or- + The specified index is greater than or equal to the number of items in the combo box. @@ -4120,22 +4120,22 @@ Occurs when the property has changed. - has been changed. This can be useful when you need to display information in other controls based on the current selection in the . You can use the event handler for this event to load the information in the other controls. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. - + has been changed. This can be useful when you need to display information in other controls based on the current selection in the . You can use the event handler for this event to load the information in the other controls. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/VB/form1.vb" id="Snippet0"::: + ]]> @@ -4193,23 +4193,23 @@ Gets or sets currently selected item in the . The object that is the currently selected item or if there is no currently selected item. - property to an object, the attempts to make that object the currently selected one in the list. If the object is found in the list, it is displayed in the edit portion of the and the property is set to the corresponding index. If the object does not exist in the list, the property is left at its current value. - + property to an object, the attempts to make that object the currently selected one in the list. If the object is found in the list, it is displayed in the edit portion of the and the property is set to the corresponding index. If the object does not exist in the list, the property is left at its current value. + > [!NOTE] -> The class searches for the specified object by using the method. This method uses the method to determine equality. - - - -## Examples - The following code example shows the usage of the and the properties. The example is part of a complete code example in the class overview. - +> The class searches for the specified object by using the method. This method uses the method to determine equality. + + + +## Examples + The following code example shows the usage of the and the properties. The example is part of a complete code example in the class overview. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ComboBox/VB/comboboxmembers.vb" id="Snippet5"::: + ]]> @@ -4250,17 +4250,17 @@ Gets or sets the text that is selected in the editable portion of a . A string that represents the currently selected text in the combo box. If is set to , the return value is an empty string (""). - property to retrieve or change the currently selected text in a control. However, you should be aware that the selection can change automatically because of user interaction. For example, if you retrieve the value in a button event handler, the value will be an empty string. This is because the selection is automatically cleared when the input focus moves from the combo box to the button. - - When the combo box loses focus, the selection point moves to the beginning of the text and any selected text becomes unselected. In this case, getting the property retrieves an empty string, and setting the property adds the specified value to the beginning of the text. - - When the combo box gains focus, the full text in the control is automatically selected. If you call the control's method to set the input focus, the full text is selected regardless of whether the control already had focus. - - When the user selects an item from the drop-down list or by using the UP ARROW and DOWN ARROW keys, the text for the new item is automatically selected. However, if you try to get the value in a or event handler, the property returns an empty string. This is because, at the time of these events, the previous value has been cleared and the new value has not yet been set. To retrieve the current value in a or event handler, use the property instead. - + property to retrieve or change the currently selected text in a control. However, you should be aware that the selection can change automatically because of user interaction. For example, if you retrieve the value in a button event handler, the value will be an empty string. This is because the selection is automatically cleared when the input focus moves from the combo box to the button. + + When the combo box loses focus, the selection point moves to the beginning of the text and any selected text becomes unselected. In this case, getting the property retrieves an empty string, and setting the property adds the specified value to the beginning of the text. + + When the combo box gains focus, the full text in the control is automatically selected. If you call the control's method to set the input focus, the full text is selected regardless of whether the control already had focus. + + When the user selects an item from the drop-down list or by using the UP ARROW and DOWN ARROW keys, the text for the new item is automatically selected. However, if you try to get the value in a or event handler, the property returns an empty string. This is because, at the time of these events, the previous value has been cleared and the new value has not yet been set. To retrieve the current value in a or event handler, use the property instead. + ]]> @@ -4305,22 +4305,22 @@ Occurs when the user changes the selected item and that change is displayed in the . - event is raised only when the user changes the combo box selection, and you can create a handler for this event to provide special handling for the when the user changes the selected item in the list. However, depending on how the is configured, and how the user changes the selected item, the event may not be raised. Alternatively, you can handle the , but note that this event occurs whether the index is changed programmatically or by the user. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example uses the event and the property to change the length of the text box depending on what the user has selected and committed. - + event is raised only when the user changes the combo box selection, and you can create a handler for this event to provide special handling for the when the user changes the selected item in the list. However, depending on how the is configured, and how the user changes the selected item, the event may not be raised. Alternatively, you can handle the , but note that this event occurs whether the index is changed programmatically or by the user. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example uses the event and the property to change the length of the text box depending on what the user has selected and committed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxSelectedText/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/OnSelectionChangeCommitted/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxSelectedText/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxSelectedText/VB/form1.vb" id="Snippet1"::: + ]]> @@ -4361,11 +4361,11 @@ Gets or sets the number of characters selected in the editable portion of the combo box. The number of characters selected in the combo box. - property is set to a value that is larger than the number of characters within the text of the control, the value of the property is set to the entire length of text within the control minus the value of the property (if any value is specified for the property). - + property is set to a value that is larger than the number of characters within the text of the control, the value of the property is set to the entire length of text within the control minus the value of the property (if any value is specified for the property). + ]]> The value was less than zero. @@ -4407,14 +4407,14 @@ Gets or sets the starting index of text selected in the combo box. The zero-based index of the first character in the string of the current text selection. - property. If the remaining text in the control after the position indicated by the property is less than the value of the property, the value of the property is automatically decreased. The value of the property never causes an increase in the property. - + property. If the remaining text in the control after the position indicated by the property is less than the value of the property, the value of the property is automatically decreased. The value of the property never causes an increase in the property. + > [!NOTE] -> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. - +> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. + ]]> The value is less than zero. @@ -4561,13 +4561,13 @@ if the combo box is sorted; otherwise, . The default is . - sorts existing entries and add new entries to the appropriate sorted position in the list. You can use this property to automatically sort items in a . As items are added to a sorted , the items are moved to the appropriate location in the sorted list. When you set the property to `false`, new items are added to the end of the existing list. The sort is case-insensitive and in alphabetically ascending order. - - Attempting to set the property on a data-bound control raises an . You must sort the data using the underlying data model. - + sorts existing entries and add new entries to the appropriate sorted position in the list. You can use this property to automatically sort items in a . As items are added to a sorted , the items are moved to the appropriate location in the sorted list. When you set the property to `false`, new items are added to the end of the existing list. The sort is case-insensitive and in alphabetically ascending order. + + Attempting to set the property on a data-bound control raises an . You must sort the data using the underlying data model. + ]]> An attempt was made to sort a that is attached to a data source. @@ -4609,22 +4609,22 @@ Gets or sets the text associated with this control. The text associated with this control. - property to `null` or an empty string ("") sets the to -1. Setting the property to a value that is in the collection sets the to the index of that item. Setting the property to a value that is not in the collection leaves the unchanged. Reading the property returns the text of , if it is not `null`. - - - -## Examples - The following code example demonstrates how to initialize a control by setting the property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. - + + + +## Examples + The following code example demonstrates how to initialize a control by setting the property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/VB/form1.vb" id="Snippet2"::: + ]]> @@ -4668,23 +4668,23 @@ Reading the property returns the te Occurs when the control has formatted the text, but before the text is displayed. - event to validate the text before it is actually shown. is not fired if the property is programmatically changed. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. - + event to validate the text before it is actually shown. is not fired if the property is programmatically changed. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet167"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet167"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet167"::: + ]]> @@ -4748,23 +4748,23 @@ Reading the property returns the te The Windows to process. Processes Windows messages. - method after getting filtered through the method. - - The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)) documentation in the Windows Platform SDK reference. - - - -## Examples - -The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the Windows.h header file included in the Platform SDK (Core SDK section) download, which is also available at . - + method after getting filtered through the method. + + The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)) documentation in the Windows Platform SDK reference. + + + +## Examples + +The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the Windows.h header file included in the Platform SDK (Core SDK section) download, which is also available at . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/VB/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/ContextMenuStrip.xml b/xml/System.Windows.Forms/ContextMenuStrip.xml index 3a90bd0e8ec..4d70eb590c6 100644 --- a/xml/System.Windows.Forms/ContextMenuStrip.xml +++ b/xml/System.Windows.Forms/ContextMenuStrip.xml @@ -44,37 +44,37 @@ Represents a shortcut menu. - replaces . You can associate a with any control, and a right mouse click automatically displays the shortcut menu. You can show a programmatically by using the method. supports cancelable and events to handle dynamic population and multiple-click scenarios. supports images, menu-item check state, text, access keys, shortcuts, and cascading menus. - - The following items are specifically designed to work seamlessly with both and in all orientations. They are available by default at design time for the control: - -- - -- - -- - -- - - Shortcut menus are typically used to combine different menu items from a of a form that are useful for the user given the context of the application. For example, you can use a shortcut menu assigned to a control to provide menu items for changing the font of the text, finding text within the control, or Clipboard features for copying and pasting text. You can also expose new objects in a shortcut menu that are not located within a to provide situation-specific commands that are inappropriate for the to display. - - Typically, a shortcut menu is displayed when a user clicks the right mouse button over a control or the form itself. Many visible controls, as well as the itself, have a property that binds the class to the control that displays the shortcut menu. More than one control can use a . - - Set the property to `true` to add space to the left of a for a check mark that shows that the menu item is enabled or selected. The property is set to `true` by default. Use this space to the left of the to display an image for that menu item. - - Although replaces and adds functionality to the control of previous versions, is retained for both backward compatibility and future use if so desired. - - - -## Examples - The following code example demonstrates a with dynamic item addition, dynamic determination with reuse, and handling of the event. - + replaces . You can associate a with any control, and a right mouse click automatically displays the shortcut menu. You can show a programmatically by using the method. supports cancelable and events to handle dynamic population and multiple-click scenarios. supports images, menu-item check state, text, access keys, shortcuts, and cascading menus. + + The following items are specifically designed to work seamlessly with both and in all orientations. They are available by default at design time for the control: + +- + +- + +- + +- + + Shortcut menus are typically used to combine different menu items from a of a form that are useful for the user given the context of the application. For example, you can use a shortcut menu assigned to a control to provide menu items for changing the font of the text, finding text within the control, or Clipboard features for copying and pasting text. You can also expose new objects in a shortcut menu that are not located within a to provide situation-specific commands that are inappropriate for the to display. + + Typically, a shortcut menu is displayed when a user clicks the right mouse button over a control or the form itself. Many visible controls, as well as the itself, have a property that binds the class to the control that displays the shortcut menu. More than one control can use a . + + Set the property to `true` to add space to the left of a for a check mark that shows that the menu item is enabled or selected. The property is set to `true` by default. Use this space to the left of the to display an image for that menu item. + + Although replaces and adds functionality to the control of previous versions, is retained for both backward compatibility and future use if so desired. + + + +## Examples + The following code example demonstrates a with dynamic item addition, dynamic determination with reuse, and handling of the event. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet40"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet40"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet40"::: + ]]> @@ -147,11 +147,11 @@ A component that implements that is the container of the . Initializes a new instance of the class and associates it with the specified container. - is disposed of properly, since it is not a child of the form. - + is disposed of properly, since it is not a child of the form. + ]]> @@ -185,20 +185,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources, and Overriding the Finalize Method. @@ -328,23 +328,23 @@ Gets the last control that caused this to be displayed. The control that caused this to be displayed. - property include the following: - -- Adding, removing, enabling, or disabling a menu item during the event. - -- Deciding on modifications of a chosen command based on the control that last displayed the . - - - -## Examples - The following code example demonstrates dynamic determination with reuse, and handling of the event. This example is part of a larger example provided for the class. - + property include the following: + +- Adding, removing, enabling, or disabling a menu item during the event. + +- Deciding on modifications of a chosen command based on the control that last displayed the . + + + +## Examples + The following code example demonstrates dynamic determination with reuse, and handling of the event. This example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet42"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet42"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet42"::: + ]]> diff --git a/xml/System.Windows.Forms/Control.xml b/xml/System.Windows.Forms/Control.xml index 84afdbce6ec..89656eb2e9c 100644 --- a/xml/System.Windows.Forms/Control.xml +++ b/xml/System.Windows.Forms/Control.xml @@ -4572,9 +4572,9 @@ The following table lists Windows Forms controls and which event ( - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -19667,7 +19667,7 @@ The following code example selects the specified When overriding in a derived class, be sure to call the base class's method so that the property is adjusted. - For more information about drawing on controls, see [Rendering a Windows Forms Control](/dotnet/framework/winforms/controls/rendering-a-windows-forms-control). + For more information about drawing on controls, see Rendering a Windows Forms Control. diff --git a/xml/System.Windows.Forms/DataGridViewBand.xml b/xml/System.Windows.Forms/DataGridViewBand.xml index 80fbed6db62..df32554b99a 100644 --- a/xml/System.Windows.Forms/DataGridViewBand.xml +++ b/xml/System.Windows.Forms/DataGridViewBand.xml @@ -43,22 +43,22 @@ Represents a linear collection of elements in a control. - class represents elements joined together in a band that can be manipulated as a group. Each element is typically an instance of or one of its derived classes. Although a is associated with each band, header cells are not considered elements of the band. - - is the base class of the and classes. There are no public constructors for the type, so the only way to access a band is through columns and rows in a . - - - -## Examples - The following code example uses a to manipulate properties of groups of cells in a . - + class represents elements joined together in a band that can be manipulated as a group. Each element is typically an instance of or one of its derived classes. Although a is associated with each band, header cells are not considered elements of the band. + + is the base class of the and classes. There are no public constructors for the type, so the only way to access a band is through columns and rows in a . + + + +## Examples + The following code example uses a to manipulate properties of groups of cells in a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewBandDemo.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewBandDemo.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet0"::: + ]]> @@ -98,11 +98,11 @@ Creates an exact copy of this band. An that represents the cloned . - @@ -161,20 +161,20 @@ Gets or sets the shortcut menu for the band. The associated with the current . The default is . - or in a . - - - -## Examples - The following code example uses the property of a to add functionality for changing a cell's background color. This code example is part of a larger example provided for the class. - + or in a . + + + +## Examples + The following code example uses the property of a to add functionality for changing a cell's background color. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewColumnDemo.cpp" id="Snippet130"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewColumnDemo.cs" id="Snippet130"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewcolumndemo.vb" id="Snippet130"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewcolumndemo.vb" id="Snippet130"::: + ]]> @@ -215,20 +215,20 @@ Gets or sets the default cell style of the band. The associated with the . - with default values will be created if the default cell style does not exist. - - - -## Examples - The following code example sets the default cell style for the first column in a . - + with default values will be created if the default cell style does not exist. + + + +## Examples + The following code example sets the default cell style for the first column in a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewBandDemo.cpp" id="Snippet7"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewBandDemo.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet7"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet7"::: + ]]> @@ -269,13 +269,13 @@ Gets or sets the run-time type of the default header cell. A that describes the run-time class of the object used as the default header cell. - class or one of its derived types. For example, the class uses a as the default header cell type. Similarly, the class uses a . - - If you are using a custom type derived from in a row or column, the property must be set to the custom type. - + class or one of its derived types. For example, the class uses a as the default header cell type. Similarly, the class uses a . + + If you are using a custom type derived from in a row or column, the property must be set to the custom type. + ]]> The specified value when setting this property is not a representing or a derived type. @@ -370,14 +370,14 @@ Releases all resources used by the . - when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -415,20 +415,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -461,15 +461,15 @@ Releases the resources associated with the band. - . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. - - For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). - - When called by the garbage collector, this method calls the method. - + . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. + + For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + + When called by the garbage collector, this method calls the method. + ]]> @@ -509,20 +509,20 @@ if the band cannot be scrolled from view; otherwise, . The default is . - . Bands adjacent to the frozen band will move over the frozen band. - - - -## Examples - The following code example freezes a band of cells in a column and a row. The example also changes the default cell style of the frozen bands to specify which bands are frozen. This code example is part of a larger example provided for the class. - + . Bands adjacent to the frozen band will move over the frozen band. + + + +## Examples + The following code example freezes a band of cells in a column and a row. The example also changes the default cell style of the frozen bands to specify which bands are frozen. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewBandDemo.cpp" id="Snippet7"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewBandDemo.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet7"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet7"::: + ]]> @@ -563,13 +563,13 @@ if the property has been set; otherwise, . - property automatically instantiates a new if the property has not previously been accessed. You must, therefore, use the property to determine whether the property is currently set to a instance. This is useful to determine which properties of the object returned by the property represent styles set specifically for the band. - - For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). - + property automatically instantiates a new if the property has not previously been accessed. You must, therefore, use the property to determine whether the property is currently set to a instance. This is useful to determine which properties of the object returned by the property represent styles set specifically for the band. + + For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). + ]]> @@ -614,10 +614,10 @@ Gets or sets the header cell of the . A representing the header cell of the . To be added. - The specified value when setting this property is not a and this instance is of type . - - -or- - + The specified value when setting this property is not a and this instance is of type . + + -or- + The specified value when setting this property is not a and this instance is of type . @@ -661,23 +661,23 @@ Gets the relative position of the band within the control. The zero-based position of the band in the or that it is contained within. The default is -1, indicating that there is no associated control. - at run time (assuming the property is set to `true`), the value of the property of each column will not change. Instead, the column values change. Sorting rows, however, does change their values. - - - -## Examples - The following code example uses the property to set column labels. The band's property is accessed through a . - + at run time (assuming the property is set to `true`), the value of the property of each column will not change. Instead, the column values change. Sorting rows, however, does change their values. + + + +## Examples + The following code example uses the property to set column labels. The band's property is accessed through a . + > [!NOTE] -> If visual styles are enabled, the current theme overrides the display style properties for row and column headers. - +> If visual styles are enabled, the current theme overrides the display style properties for row and column headers. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewColumnDemo.cpp" id="Snippet150"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewColumnDemo.cs" id="Snippet150"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewcolumndemo.vb" id="Snippet150"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewcolumndemo.vb" id="Snippet150"::: + ]]> @@ -726,13 +726,13 @@ Gets the cell style in effect for the current band, taking into account style inheritance. A associated with the . The default is . - class always returns `null` because this base class cannot contain elements. - - For more information about style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). - + class always returns `null` because this base class cannot contain elements. + + For more information about style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). + ]]> @@ -844,20 +844,20 @@ if the user cannot edit the band's cells; otherwise, . The default is . - property affects the property of each cell in the band. For example, if the property of a changes, then the property of all cells in the row will change. - - - -## Examples - The following code example demonstrates how to use the property to disable editing for an entire . This code example is part of a larger example provided for the class. - + property affects the property of each cell in the band. For example, if the property of a changes, then the property of all cells in the row will change. + + + +## Examples + The following code example demonstrates how to use the property to disable editing for an entire . This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewBandDemo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewBandDemo.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet11"::: + ]]> When setting this property, this instance is a shared . @@ -900,22 +900,22 @@ Gets or sets a value indicating whether the band can be resized in the user interface (UI). One of the values. The default is . - properties. By default, the property value is based on the property value for columns and the property value for rows. If you explicitly set to or , however, the control value is ignored. Set to to restore the inheritance. - - Because restores the value inheritance, the property will never return a value unless the row or column has not been added to a control. If you need to determine whether the property value of a row or column is inherited, check its property. If the value includes the flag, the property value is not inherited. If the property value is , the user will not be able to manually adjust band size. - - - -## Examples - The following code example sets the property to the default. - + properties. By default, the property value is based on the property value for columns and the property value for rows. If you explicitly set to or , however, the control value is ignored. Set to to restore the inheritance. + + Because restores the value inheritance, the property will never return a value unless the row or column has not been added to a control. If you need to determine whether the property value of a row or column is inherited, check its property. If the value includes the flag, the property value is not inherited. If the property value is , the user will not be able to manually adjust band size. + + + +## Examples + The following code example sets the property to the default. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.MouseBasedResizing/CPP/mousesizing.cpp" id="Snippet14"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridViewBand/Resizable/mousesizing.cs" id="Snippet14"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.MouseBasedResizing/VB/mousesizing.vb" id="Snippet14"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.MouseBasedResizing/VB/mousesizing.vb" id="Snippet14"::: + ]]> @@ -963,25 +963,25 @@ if the band is selected; otherwise, . - with the property enabled is associated with the band. - - - -## Examples - The following code example illustrates the use of this property. - + with the property enabled is associated with the band. + + + +## Examples + The following code example illustrates the use of this property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AreAllCellsSelected/DataGridViewSelectedCollections.cs" id="Snippet05"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridViewSelectedCollections/VB/DataGridViewSelectedCollections.vb" id="Snippet05"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridViewSelectedCollections/VB/DataGridViewSelectedCollections.vb" id="Snippet05"::: + ]]> - The specified value when setting this property is , but the band has not been added to a control. - - -or- - + The specified value when setting this property is , but the band has not been added to a control. + + -or- + This property is being set on a shared . @@ -1037,20 +1037,20 @@ Gets or sets the object that contains data to associate with the band. An that contains information associated with the band. The default is . - property can store any object that you want to associate with a band. This property is typically used to store identifying information, such as a string name, a unique identifier (for example, a ), or the index of the band's data in a database. - - - -## Examples - The following code example uses the property to store a color that is later retrieved to set the property. - + property can store any object that you want to associate with a band. This property is typically used to store identifying information, such as a string name, a unique identifier (for example, a ), or the index of the band's data in a database. + + + +## Examples + The following code example uses the property to store a color that is later retrieved to set the property. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewBandDemo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewBandDemo.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet12"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet12"::: + ]]> @@ -1085,11 +1085,11 @@ Returns a string that represents the current band. A that represents the current . - method. The returned string contains the class's name and property. - + method. The returned string contains the class's name and property. + ]]> @@ -1129,20 +1129,20 @@ if the band is visible; otherwise, . The default is . - property to hide a row. This code example is part of a larger example provided for the class. - + property to hide a row. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewBandDemo.cpp" id="Snippet9"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewBandDemo.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet9"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/VB/datagridviewbanddemo.vb" id="Snippet9"::: + ]]> The specified value when setting this property is and the band is the row for new records. diff --git a/xml/System.Windows.Forms/DataGridViewCell.xml b/xml/System.Windows.Forms/DataGridViewCell.xml index f0174443fbd..f035317ee2c 100644 --- a/xml/System.Windows.Forms/DataGridViewCell.xml +++ b/xml/System.Windows.Forms/DataGridViewCell.xml @@ -915,9 +915,9 @@ - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. diff --git a/xml/System.Windows.Forms/DataGridViewRowCollection.xml b/xml/System.Windows.Forms/DataGridViewRowCollection.xml index 5b6c3356014..28a15870de1 100644 --- a/xml/System.Windows.Forms/DataGridViewRowCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewRowCollection.xml @@ -2139,7 +2139,7 @@ The zero-based index of the to get. Gets the at the specified index. - The at the specified index. Accessing a with this indexer causes the row to become unshared. To keep the row shared, use the method. For more information, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). + The at the specified index. Accessing a with this indexer causes the row to become unshared. To keep the row shared, use the method. For more information, see Best Practices for Scaling the Windows Forms DataGridView Control. To be added. is less than 0. diff --git a/xml/System.Windows.Forms/FileDialogCustomPlace.xml b/xml/System.Windows.Forms/FileDialogCustomPlace.xml index 12e61fc4ebe..c6b912a5b77 100644 --- a/xml/System.Windows.Forms/FileDialogCustomPlace.xml +++ b/xml/System.Windows.Forms/FileDialogCustomPlace.xml @@ -42,13 +42,13 @@ Represents an entry in a custom place collection for Windows Vista. - @@ -94,19 +94,19 @@ A that represents a Windows Vista Known Folder. Initializes a new instance of the class with a custom place identified by a Windows Vista Known Folder GUID. - method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. - + method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/CustomPlaces/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FileDialogCommonPlaces/VB/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FileDialogCommonPlaces/VB/Form1.vb" id="Snippet1"::: + ]]> @@ -182,7 +182,7 @@ Gets or sets the Windows Vista Known Folder GUID for the custom place. - A that indicates the Windows Vista Known Folder for the custom place. If the custom place was specified with a folder path, then an empty GUID is returned. For a list of the available Windows Vista Known Folders, see [Known Folder GUIDs for File Dialog Custom Places](/dotnet/framework/winforms/controls/known-folder-guids-for-file-dialog-custom-places) or the KnownFolders.h file in the Windows SDK. + A that indicates the Windows Vista Known Folder for the custom place. If the custom place was specified with a folder path, then an empty GUID is returned. For a list of the available Windows Vista Known Folders, see Known Folder GUIDs for File Dialog Custom Places or the KnownFolders.h file in the Windows SDK. To be added. diff --git a/xml/System.Windows.Forms/Form.xml b/xml/System.Windows.Forms/Form.xml index bc1c54d68e8..d20a3e93ebd 100644 --- a/xml/System.Windows.Forms/Form.xml +++ b/xml/System.Windows.Forms/Form.xml @@ -77,30 +77,30 @@ Represents a window or dialog box that makes up an application's user interface. - is a representation of any window displayed in your application. The class can be used to create standard, tool, borderless, and floating windows. You can also use the class to create modal windows such as a dialog box. A special kind of form, the multiple-document interface (MDI) form, can contain other forms called MDI child forms. An MDI form is created by setting the property to `true`. MDI child forms are created by setting the property to the MDI parent form that will contain the child form. - - Using the properties available in the class, you can determine the appearance, size, color, and window management features of the window or dialog box you are creating. The property allows you to specify the caption of the window in the title bar. The and properties allow you to define the size and position of the window when it is displayed. You can use the color property to change the default foreground color of all controls placed on the form. The , , and properties allow you to control whether the form can be minimized, maximized, or resized at run time. - - In addition to properties, you can use the methods of the class to manipulate a form. For example, you can use the method to show a form as a modal dialog box. You can use the method to position the form on the desktop. - - The events of the class allow you to respond to actions performed on the form. You can use the event to perform operations such as updating the data displayed in the controls of the form when the form is activated. - - You can use a form as the starting class in your application by placing a method called `Main` in the class. In the `Main` method add code to create and show the form. You will also need to add the `STAThread` attribute to the `Main` method in order for the form to run. When the starting form is closed, the application is also closed. - - If you set the property to `false` before the is visible (for example, setting to false in the Microsoft Visual Studio designer), the minimize, maximize, close, and system buttons remain enabled. If you set to `false` after the is visible (for example, when the Load event occurs), the buttons are disabled. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - + is a representation of any window displayed in your application. The class can be used to create standard, tool, borderless, and floating windows. You can also use the class to create modal windows such as a dialog box. A special kind of form, the multiple-document interface (MDI) form, can contain other forms called MDI child forms. An MDI form is created by setting the property to `true`. MDI child forms are created by setting the property to the MDI parent form that will contain the child form. + + Using the properties available in the class, you can determine the appearance, size, color, and window management features of the window or dialog box you are creating. The property allows you to specify the caption of the window in the title bar. The and properties allow you to define the size and position of the window when it is displayed. You can use the color property to change the default foreground color of all controls placed on the form. The , , and properties allow you to control whether the form can be minimized, maximized, or resized at run time. + + In addition to properties, you can use the methods of the class to manipulate a form. For example, you can use the method to show a form as a modal dialog box. You can use the method to position the form on the desktop. + + The events of the class allow you to respond to actions performed on the form. You can use the event to perform operations such as updating the data displayed in the controls of the form when the form is activated. + + You can use a form as the starting class in your application by placing a method called `Main` in the class. In the `Main` method add code to create and show the form. You will also need to add the `STAThread` attribute to the `Main` method in order for the form to run. When the starting form is closed, the application is also closed. + + If you set the property to `false` before the is visible (for example, setting to false in the Microsoft Visual Studio designer), the minimize, maximize, close, and system buttons remain enabled. If you set to `false` after the is visible (for example, when the Load event occurs), the buttons are disabled. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> Multiple-Document Interface (MDI) Applications @@ -128,20 +128,20 @@ Initializes a new instance of the class. - and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also sets uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - + and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also sets uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -179,24 +179,24 @@ Gets or sets the button on the form that is clicked when the user presses the ENTER key. An that represents the button to use as the accept button for the form. - that is on the current form or located within a container on the current form. - - You can use this property to allow the user to quickly navigate a simple form by allowing them to simply press the ENTER key when they are finished instead of manually clicking the accept button with their mouse. - - The accept button might not be activated if the currently selected control on the form intercepts the ENTER key and processes it. For example, a multiline text box control allows the ENTER key to be pressed when it is selected to insert a new line character in the control. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - + that is on the current form or located within a container on the current form. + + You can use this property to allow the user to quickly navigate a simple form by allowing them to simply press the ENTER key when they are finished instead of manually clicking the accept button with their mouse. + + The accept button might not be activated if the currently selected control on the form intercepts the ENTER key and processes it. For example, a multiline text box control allows the ENTER key to be pressed when it is selected to insert a new line character in the control. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -229,20 +229,20 @@ Activates the form and gives it focus. - property or the property if your forms are in a Multiple-document interface (MDI) application. - - - -## Examples - The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. - + property or the property if your forms are in a Multiple-document interface (MDI) application. + + + +## Examples + The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: + ]]> @@ -275,26 +275,26 @@ Occurs when the form is activated in code or by the user. - [!NOTE] -> When the application is active and has multiple forms, the active form is the form with the input focus. A form that is not visible cannot be the active form. The simplest way to activate a visible form is to click it or use an appropriate keyboard combination. - - To activate a form at run time using code, call the method. You can use this event for tasks such as updating the contents of the form based on changes made to the form's data when the form was not activated. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates how to use the , , , , and members. To run the example, paste the following code in a form called Form1 containing a called `Button1` and two controls called `Label1` and `Label2`. - +> When the application is active and has multiple forms, the active form is the form with the input focus. A form that is not visible cannot be the active form. The simplest way to activate a visible form is to click it or use an appropriate keyboard combination. + + To activate a form at run time using code, call the method. You can use this event for tasks such as updating the contents of the form based on changes made to the form's data when the form was not activated. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates how to use the , , , , and members. To run the example, paste the following code in a form called Form1 containing a called `Button1` and two controls called `Label1` and `Label2`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: + ]]> @@ -330,13 +330,13 @@ The child form to activate. Activates the MDI child of a form. - method simply returns. If `form` is not `null`, then it is set to be the active MDI child form. - - Whether the `form` parameter is `null` or not, raises the event. - + method simply returns. If `form` is not `null`, then it is set to be the active MDI child form. + + Whether the `form` parameter is `null` or not, raises the event. + ]]> @@ -371,22 +371,22 @@ Gets the currently active form for this application. A that represents the currently active form, or if there is no active form. - property to obtain the currently active MDI child form. - - - -## Examples - The following example gets the active form and disables all the controls on the form. The example uses the collection of the form to iterate through each control on the form and disable the controls. - + property to obtain the currently active MDI child form. + + + +## Examples + The following example gets the active form and disables all the controls on the form. The example uses the collection of the form to iterate through each control on the form and disable the controls. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ActiveForm Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ActiveForm/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ActiveForm Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ActiveForm Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -429,22 +429,22 @@ Gets the currently active multiple-document interface (MDI) child window. Returns a that represents the currently active MDI child window, or if there are currently no child windows present. - property to obtain a reference to it. - - - -## Examples - The following example obtains a reference to the active MDI child form and loops through all controls on the form, resetting their properties. This example requires that an MDI parent form has been created and that this method call is being made from the MDI parent form. - + property to obtain a reference to it. + + + +## Examples + The following example obtains a reference to the active MDI child form and loops through all controls on the form, resetting their properties. This example requires that an MDI parent form has been created and that this method call is being made from the MDI parent form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ActiveMdiChild Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ActiveMdiChild/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ActiveMdiChild Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ActiveMdiChild Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -480,25 +480,25 @@ The that this form will own. Adds an owned form to this form. - method is called. You can also make a form owned by another by setting the property with a reference to its owner form. - - When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected. - + method is called. You can also make a form owned by another by setting the property with a reference to its owner form. + + When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected. + > [!NOTE] -> If the form is a multiple-document interface (MDI) parent form, this property returns all forms that are displayed with the exception of any MDI child forms that are currently open. To obtain the MDI child forms opened in an MDI parent form, use the property. - - - -## Examples - The following example demonstrates how to use the method to display a form as an owned form of another form. Once the owned form is shown, you can minimize its owner form and the owned form will minimize with it. The example requires that the code in the example is called from another event or method of a form. - +> If the form is a multiple-document interface (MDI) parent form, this property returns all forms that are displayed with the exception of any MDI child forms that are currently open. To obtain the MDI child forms opened in an MDI parent form, use the property. + + + +## Examples + The following example demonstrates how to use the method to display a form as an owned form of another form. Once the owned form is shown, you can minimize its owner form and the owned form will minimize with it. The example requires that the code in the example is called from another event or method of a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.AddOwnedForm/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/AddOwnedForm/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AddOwnedForm/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AddOwnedForm/VB/form1.vb" id="Snippet1"::: + ]]> @@ -581,11 +581,11 @@ if the opacity of the form can be changed; otherwise, . - property to `false` the form will not be in layered mode which will improve the display performance of the form. - + property to `false` the form will not be in layered mode which will improve the display performance of the form. + ]]> @@ -634,11 +634,11 @@ Resizes the form according to the current value of the property and the size of the current font. - property and the value returned by the method. - + property and the value returned by the method. + ]]> @@ -696,17 +696,17 @@ if the form will automatically scale itself and its controls based on the current font assigned to the form; otherwise, . The default is . - [!IMPORTANT] -> The is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/framework/winforms/automatic-scaling-in-windows-forms). - - You can use this property to allow your form and its controls to automatically adjust based on changes in the font. This can be useful in applications where the font might increase or decrease based on the language specified for use by Windows. - - To obtain the size the form will auto scale to, use the property. If you want to determine the size the form will auto scale to based on a specific font, use the method. - +> The is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/framework/winforms/automatic-scaling-in-windows-forms). + + You can use this property to allow your form and its controls to automatically adjust based on changes in the font. This can be useful in applications where the font might increase or decrease based on the language specified for use by Windows. + + To obtain the size the form will auto scale to, use the property. If you want to determine the size the form will auto scale to based on a specific font, use the method. + ]]> @@ -763,18 +763,18 @@ Gets or sets the base size used for autoscaling of the form. A that represents the base size that this form uses for autoscaling. - [!IMPORTANT] -> This member has been retained for backward compatibility. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/framework/winforms/automatic-scaling-in-windows-forms). - - The value of the property is used at form-display time to compute the scaling factor for the form. The autoscaling base size is used by the form as a baseline for comparison to the system's font size to determine how much to scale the form when autoscaling is used. If you want to determine the size a form will auto scale to based on a specific font, use the method. - +> This member has been retained for backward compatibility. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/framework/winforms/automatic-scaling-in-windows-forms). + + The value of the property is used at form-display time to compute the scaling factor for the form. The autoscaling base size is used by the form as a baseline for comparison to the system's font size to determine how much to scale the form when autoscaling is used. If you want to determine the size a form will auto scale to based on a specific font, use the method. + > [!NOTE] -> The value of this property is used when the form is initially created. Once the property is set, it cannot be changed. - +> The value of this property is used when the form is initially created. Once the property is set, it cannot be changed. + ]]> @@ -814,22 +814,22 @@ to enable autoscrolling on the form; otherwise, . The default is . - property to enable the display of controls that are outsize the client area of a form. The example creates a new form and adds a control to the form. The control is positioned outsize the client area of the new form. The property is set to true to display scroll bars on the form to enable the user to scroll to the control. This example requires that the method defined in this example is called from another form in an event handler or other method. - + property to enable the display of controls that are outsize the client area of a form. The example creates a new form and adds a control to the form. The control is positioned outsize the client area of the new form. The property is set to true to display scroll bars on the form to enable the user to scroll to the control. This example requires that the method defined in this example is called from another form in an event handler or other method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.AutoScroll/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/AutoScroll/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AutoScroll/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AutoScroll/VB/form1.vb" id="Snippet1"::: + ]]> @@ -874,25 +874,25 @@ if the form will automatically resize; if it must be manually resized. - to force a form to resize to fit its contents. - - A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. - - When using , the and properties are respected, but the current value of the property is ignored. Using and also renders the property superfluous, as there is no way to shrink the form to hide its contained controls from view. - - See the enumeration for information on how a form behaves when is `true`. - - - -## Examples - The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. - + to force a form to resize to fit its contents. + + A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. + + When using , the and properties are respected, but the current value of the property is ignored. Using and also renders the property superfluous, as there is no way to shrink the form to hide its contained controls from view. + + See the enumeration for information on how a form behaves when is `true`. + + + +## Examples + The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AutoSizeMode/Overview/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AutoSize/VB/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AutoSize/VB/Form1.vb" id="Snippet1"::: + ]]> @@ -973,21 +973,21 @@ Gets or sets the mode by which the form automatically resizes itself. An enumerated value. The default is . - property to a new value causes the form to be laid out again. - - A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. - - - -## Examples - The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. - + property to a new value causes the form to be laid out again. + + A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. + + + +## Examples + The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AutoSizeMode/Overview/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AutoSize/VB/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.AutoSize/VB/Form1.vb" id="Snippet1"::: + ]]> The value is not a valid value. @@ -1133,26 +1133,26 @@ Gets or sets the button control that is clicked when the user presses the ESC key. An that represents the cancel button for the form. - that is on the current form or located within a container on the current form. - - This property allows you to designate a default action to occur when the user presses the ESC key in your application. You can use this property to allow the user to quickly navigate a simple form by allowing them to simply press the ESC key to close a window without committing changes instead of manually clicking the cancel button with their mouse. - - may not work if another control on the form intercepts the ESC key. For example, if you have a open on your form, ESC will close the instead of closing the Form. - - The object assigned to must be visible on the form, or else pressing the ESC key will have no effect. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - + that is on the current form or located within a container on the current form. + + This property allows you to designate a default action to occur when the user presses the ESC key in your application. You can use this property to allow the user to quickly navigate a simple form by allowing them to simply press the ESC key to close a window without committing changes instead of manually clicking the cancel button with their mouse. + + may not work if another control on the form intercepts the ESC key. For example, if you have a open on your form, ESC will close the instead of closing the Form. + + The object assigned to must be visible on the form, or else pressing the ESC key will have no effect. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1185,13 +1185,13 @@ Centers the position of the form within the bounds of the parent form. - method directly from your code. Instead, set the property to . - - If the form or dialog is top-level, then centers the form with respect to the screen or desktop. - + method directly from your code. Instead, set the property to . + + If the form or dialog is top-level, then centers the form with respect to the screen or desktop. + ]]> @@ -1224,19 +1224,19 @@ Centers the form on the current screen. - property to . - - The method uses the following priority list to determine the screen used to center the form: - -1. The property of the form. - -2. The HWND owner of the form. - -3. The screen that currently has the mouse cursor. - + property to . + + The method uses the following priority list to determine the screen used to center the form: + +1. The property of the form. + +2. The HWND owner of the form. + +3. The screen that currently has the mouse cursor. + ]]> @@ -1279,23 +1279,23 @@ Gets or sets the size of the client area of the form. A that represents the size of the form's client area. - property or use the individual properties and . - + property or use the individual properties and . + > [!NOTE] -> You cannot currently bind to this property using application settings. For more information on application settings, see [Application Settings Overview](/dotnet/framework/winforms/advanced/application-settings-overview). - - - -## Examples - The following example creates an event handler for the event of a form. The event handler uses the property of the form to make a control named `button1` fill the entire client area of the form. - +> You cannot currently bind to this property using application settings. For more information on application settings, see [Application Settings Overview](/dotnet/framework/winforms/advanced/application-settings-overview). + + + +## Examples + The following example creates an event handler for the event of a form. The event handler uses the property of the form to make a control named `button1` fill the entire client area of the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ClientSize Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ClientSize/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ClientSize Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ClientSize Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1329,19 +1329,19 @@ Closes the form. - event and setting the property of the passed as a parameter to your event handler. If the form you are closing is the startup form of your application, your application ends. - - The two conditions when a form is not disposed on `Close` is when (1) it is part of a multiple-document interface (MDI) application, and the form is not visible; and (2) you have displayed the form using . In these cases, you will need to call manually to mark all of the form's controls for garbage collection. - + event and setting the property of the passed as a parameter to your event handler. If the form you are closing is the startup form of your application, your application ends. + + The two conditions when a form is not disposed on `Close` is when (1) it is part of a multiple-document interface (MDI) application, and the form is not visible; and (2) you have displayed the form using . In these cases, you will need to call manually to mark all of the form's controls for garbage collection. + > [!NOTE] -> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. - +> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. + > [!CAUTION] -> Prior to the .NET Framework 2.0, the and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. - +> Prior to the .NET Framework 2.0, the and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. + ]]> The form was closed while a handle was being created. @@ -1387,33 +1387,33 @@ Occurs when the form is closed. - [!CAUTION] -> The event is obsolete in the .NET Framework version 2.0; use the event instead. - - This event occurs after the form has been closed by the user or by the method of the form. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. - - You can use this event to perform tasks such as freeing resources used by the form and to save information entered in the form or to update its parent form. - +> The event is obsolete in the .NET Framework version 2.0; use the event instead. + + This event occurs after the form has been closed by the user or by the method of the form. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. + + You can use this event to perform tasks such as freeing resources used by the form and to save information entered in the form or to update its parent form. + > [!CAUTION] -> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. - - If the form is an MDI parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates how to use the , , , , and members. To run the example, paste the following code in a form called `Form1` containing a called `Button1` and two controls called `Label1` and `Label2`. - +> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. + + If the form is an MDI parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates how to use the , , , , and members. To run the example, paste the following code in a form called `Form1` containing a called `Button1` and two controls called `Label1` and `Label2`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1457,36 +1457,36 @@ Occurs when the form is closing. - [!CAUTION] -> The event is obsolete starting with the .NET Framework 2.0; use the event instead. - - The event occurs as the form is being closed. When a form is closed, all resources created within the object are released and the form is disposed. If you cancel this event, the form remains opened. To cancel the closure of a form, set the property of the passed to your event handler to `true`. - - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. - +> The event is obsolete starting with the .NET Framework 2.0; use the event instead. + + The event occurs as the form is being closed. When a form is closed, all resources created within the object are released and the form is disposed. If you cancel this event, the form remains opened. To cancel the closure of a form, set the property of the passed to your event handler to `true`. + + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. + > [!NOTE] -> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. - +> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. + > [!CAUTION] -> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. - - If the form is an MDI parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. Canceling the event of an MDI child form does not prevent the event of the MDI parent form from being raised. However, canceling the event will set to `true` the property of the that is passed as a parameter to the parent form. To force all MDI parent and child forms to close, set the property to `false` in the MDI parent form. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example uses to test if the text in a has changed. If it has, the user is asked whether to save the changes to a file. - +> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. + + If the form is an MDI parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. Canceling the event of an MDI child form does not prevent the event of the MDI parent form from being raised. However, canceling the event will set to `true` the property of the that is passed as a parameter to the parent form. To force all MDI parent and child forms to close, set the property to `false` in the MDI parent form. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example uses to test if the text in a has changed. If it has, the user is asked whether to save the changes to a file. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Closing/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Closing/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Closing/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Closing/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1526,25 +1526,25 @@ if the form displays a control box in the upper-right corner of the form; otherwise, . The default is . - property is set to `true`, the control box is displayed in the upper-right corner of the caption bar. The control box can include minimize, maximize, and help buttons in addition to a close button. For the `ControlBox` property to have any effect, you must also set the form's property to , , , or . - - If you set to `false` and also set the property, the property of the form is not updated to reflect that the non-client area of the form has been hidden. To fix this problem, put the code that alters the property in the event handler. - + property is set to `true`, the control box is displayed in the upper-right corner of the caption bar. The control box can include minimize, maximize, and help buttons in addition to a close button. For the `ControlBox` property to have any effect, you must also set the form's property to , , , or . + + If you set to `false` and also set the property, the property of the form is not updated to reflect that the non-client area of the form has been hidden. To fix this problem, put the code that alters the property in the event handler. + > [!NOTE] -> When set to `false`, the property has no effect on a Multiple-document interface (MDI) child form that is displayed maximized at time of creation. - - - -## Examples - The following example uses the , , , , and properties to create a form that does not have any border or caption box. The form created in this example could be used to create a splash screen for an application. The example requires that the example's method is defined in a form class and called when the form is being initialized. - +> When set to `false`, the property has no effect on a Multiple-document interface (MDI) child form that is displayed maximized at time of creation. + + + +## Examples + The following example uses the , , , , and properties to create a form that does not have any border or caption box. The form created in this example could be used to create a splash screen for an application. The example requires that the example's method is defined in a form class and called when the form is being initialized. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ControlBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ControlBox/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ControlBox Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ControlBox Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1728,23 +1728,23 @@ Occurs when the form loses focus and is no longer the active form. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet393"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet393"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet393"::: + ]]> @@ -1778,13 +1778,13 @@ Gets the default Input Method Editor (IME) mode supported by the control. One of the values. - class, this property always returns the value. The value of this property is assigned to the property. - + class, this property always returns the value. The value of this property is assigned to the property. + ]]> @@ -1893,22 +1893,22 @@ Gets or sets the size and location of the form on the Windows desktop. A that represents the bounds of the form on the Windows desktop using desktop coordinates. - @@ -1950,26 +1950,26 @@ Gets or sets the location of the form on the Windows desktop. A that represents the location of the form on the desktop. - method before calling the method, your form will be positioned at its default location, which is determined by the operating system. For more information about window positioning, see the [Window Size and Position](/windows/win32/winmsg/window-features#window-size-and-position) section of the "Window Features" article. - - If you call after calling , your form will be positioned at the location you specified. - - - -## Examples - The following example sets the position of a form so that the form is positioned 100 pixels from the left border of the desktop and 100 pixels from the top of the desktop. This example requires that method has been defined within a form class. - + method before calling the method, your form will be positioned at its default location, which is determined by the operating system. For more information about window positioning, see the [Window Size and Position](/windows/win32/winmsg/window-features#window-size-and-position) section of the "Window Features" article. + + If you call after calling , your form will be positioned at the location you specified. + + + +## Examples + The following example sets the position of a form so that the form is positioned 100 pixels from the left border of the desktop and 100 pixels from the top of the desktop. This example requires that method has been defined within a form class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.DesktopLocation Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/DesktopLocation/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.DesktopLocation Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.DesktopLocation Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -2015,30 +2015,30 @@ Gets or sets the dialog result for the form. A that represents the result of the form when used as a dialog box. - enumeration sets the value of the dialog box result for the form, hides the modal dialog box, and returns control to the calling form. This property is typically set by the property of a control on the form. When the user clicks the control, the value assigned to the property of the is assigned to the property of the form. - - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X in the top-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. The method is not automatically called when the user clicks the **Close** button of a dialog box or sets the value of the property. Instead, the form is hidden and can be shown again without creating a new instance of the dialog box. Because of this behavior, you must call the method of the form when the form is no longer needed by your application. - - You can use this property to determine how a dialog box is closed in order to properly process the actions performed in the dialog box. - + enumeration sets the value of the dialog box result for the form, hides the modal dialog box, and returns control to the calling form. This property is typically set by the property of a control on the form. When the user clicks the control, the value assigned to the property of the is assigned to the property of the form. + + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X in the top-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. The method is not automatically called when the user clicks the **Close** button of a dialog box or sets the value of the property. Instead, the form is hidden and can be shown again without creating a new instance of the dialog box. Because of this behavior, you must call the method of the form when the form is no longer needed by your application. + + You can use this property to determine how a dialog box is closed in order to properly process the actions performed in the dialog box. + > [!NOTE] -> You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. - +> You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. + > [!NOTE] -> If a is displayed as a modeless window, the value returned by the property might not return a value assigned to the form because the form's resources are automatically released when the form is closed. - - - -## Examples - The following example displays a form as a dialog box and displays a message box indicating whether the OK or Cancel button of the form was clicked by referencing the property of the form. - +> If a is displayed as a modeless window, the value returned by the property might not return a value assigned to the form because the form's resources are automatically released when the form is closed. + + + +## Examples + The following example displays a form as a dialog box and displays a message box indicating whether the OK or Cancel button of the form was clicked by referencing the property of the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.DialogResult Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/DialogResult/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.DialogResult Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.DialogResult Example/VB/source.vb" id="Snippet1"::: + ]]> The value specified is outside the range of valid values. @@ -2076,22 +2076,22 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Disposes of the resources (other than memory) used by the . - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - - will be called automatically if the form is shown using the method. If another method such as is used, or the form is never shown at all, you must call yourself within your application. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + + will be called automatically if the form is shown using the method. If another method such as is used, or the form is never shown at all, you must call yourself within your application. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -2157,23 +2157,23 @@ Gets or sets the border style of the form. A that represents the style of border to display for the form. The default is . - [!NOTE] -> With the style, it is impossible to resize the window below a certain minimum value, even if you have set to `false` and assigned a zero-length string to . Consider working around this by using the style instead. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - +> With the style, it is impossible to resize the window below a certain minimum value, even if you have set to `false` and assigned a zero-length string to . Consider working around this by using the style instead. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> The value specified is outside the range of valid values. @@ -2205,27 +2205,27 @@ Occurs after the form is closed. - event occurs after the form has been closed by the user or by the method or the method of the class. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. - - You can use this event to perform tasks such as freeing resources used by the form and to save information entered in the form or to update its parent form. - - If the form is a multiple-document interface (MDI) parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. Likewise, the events of all MDI child forms are raised before the event of the MDI parent form is raised. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event occurs after the form has been closed by the user or by the method or the method of the class. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. + + You can use this event to perform tasks such as freeing resources used by the form and to save information entered in the form or to update its parent form. + + If the form is a multiple-document interface (MDI) parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. Likewise, the events of all MDI child forms are raised before the event of the MDI parent form is raised. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet395"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet395"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet395"::: + ]]> @@ -2264,30 +2264,30 @@ Occurs before the form is closed. - event occurs as the form is being closed. When a form is closed, it is disposed, releasing all resources associated with the form. If you cancel this event, the form remains opened. To cancel the closure of a form, set the property of the passed to your event handler to `true`. - - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. - + event occurs as the form is being closed. When a form is closed, it is disposed, releasing all resources associated with the form. If you cancel this event, the form remains opened. To cancel the closure of a form, set the property of the passed to your event handler to `true`. + + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. + > [!NOTE] -> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. - - If the form is a multiple-document interface (MDI) parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. Likewise, the events of all MDI child forms are raised before the event of the MDI parent form is raised. Canceling the event of an MDI child form does not prevent the event of the MDI parent form from being raised. However, canceling the event will set to `true` the property of the class that is passed as a parameter to the parent form. To force all MDI parent and child forms to close, set the property to `false` in the MDI parent form. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - +> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. + + If the form is a multiple-document interface (MDI) parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. Likewise, the events of all MDI child forms are raised before the event of the MDI parent form is raised. Canceling the event of an MDI child form does not prevent the event of the MDI parent form from being raised. However, canceling the event will set to `true` the property of the class that is passed as a parameter to the parent form. To force all MDI parent and child forms to close, set the property to `false` in the MDI parent form. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet394"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet394"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet394"::: + ]]> @@ -2352,15 +2352,15 @@ Gets the size when autoscaling the form based on a specified font. A representing the autoscaled size of the form. - [!IMPORTANT] -> The method is obsolete starting with the .NET Framework 2.0. This member has been retained for backward compatibility. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/framework/winforms/automatic-scaling-in-windows-forms). - - You can use this method to determine the size a form would autoscale to for a specific font before applying the font to the form. If you want to determine the size a form is autoscaled to based on the font currently assigned to the form, use the property. - +> The method is obsolete starting with the .NET Framework 2.0. This member has been retained for backward compatibility. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/framework/winforms/automatic-scaling-in-windows-forms). + + You can use this method to determine the size a form would autoscale to for a specific font before applying the font to the form. If you want to determine the size a form is autoscaled to based on the font currently assigned to the form, use the property. + ]]> @@ -2441,26 +2441,26 @@ to display a Help button in the form's caption bar; otherwise, . The default is . - event to display Help information to the user when the Help button of the form is clicked. + event to display Help information to the user when the Help button of the form is clicked. -To display a Help button, the value of the form's property must be `true`, its default value. The property determines whether the upper-right corner of the caption bar contains controls such as a maximize button, a minimize button, a help button, and a close button. In addition, you must also set the form's property to , , , or . +To display a Help button, the value of the form's property must be `true`, its default value. The property determines whether the upper-right corner of the caption bar contains controls such as a maximize button, a minimize button, a help button, and a close button. In addition, you must also set the form's property to , , , or . > [!IMPORTANT] -> The value of the property is ignored if the **Maximize** or **Minimize** buttons are shown. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a Help button in the caption bar of the dialog box. - +> The value of the property is ignored if the **Maximize** or **Minimize** buttons are shown. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a Help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -2504,23 +2504,23 @@ To display a Help button, the value of the form's Occurs when the **Help** button is clicked. - event occurs when the **Help** button in the form's caption bar is clicked. The **Help** button is displayed when the property is set to `true`. can be canceled. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event occurs when the **Help** button in the form's caption bar is clicked. The **Help** button is displayed when the property is set to `true`. can be canceled. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet388"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet388"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet388"::: + ]]> @@ -2566,13 +2566,13 @@ To display a Help button, the value of the form's Gets or sets the icon for the form. An that represents the icon for the form. - is set to . In that case, the form will not display an icon. - + is set to . In that case, the form will not display an icon. + ]]> @@ -2604,23 +2604,23 @@ To display a Help button, the value of the form's Occurs after the input language of the form has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet400"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet400"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet400"::: + ]]> @@ -2653,23 +2653,23 @@ To display a Help button, the value of the form's Occurs when the user attempts to change the input language for the form. - property of the passed to your event handler to `false`. If the event is canceled, the input language is not changed. You can use this event to determine whether the requested input language change is appropriate for your application. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + property of the passed to your event handler to `false`. If the event is canceled, the input language is not changed. You can use this event to determine whether the requested input language change is appropriate for your application. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet401"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet401"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet401"::: + ]]> @@ -2721,16 +2721,16 @@ To display a Help button, the value of the form's if the form is an MDI child form; otherwise, . - that will be the MDI parent form to the property of the child form. You can use the property to determine whether a form is an MDI parent form. - - You can use the property to determine whether a form returned by a method or property is an MDI child form or a standard form in your application such as a dialog box. - + that will be the MDI parent form to the property of the child form. You can use the property to determine whether a form is an MDI parent form. + + You can use the property to determine whether a form returned by a method or property is an MDI child form or a standard form in your application such as a dialog box. + > [!NOTE] -> All MDI child forms have sizable borders, a control-menu box, and Minimize and **Maximize** buttons, regardless of the settings of the , , , and properties. - +> All MDI child forms have sizable borders, a control-menu box, and Minimize and **Maximize** buttons, regardless of the settings of the , , , and properties. + ]]> @@ -2783,24 +2783,24 @@ To display a Help button, the value of the form's if the form is a container for MDI child forms; otherwise, . The default is . - events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. - + events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. + > [!NOTE] -> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. - - - -## Examples - The following example demonstrates using the property as well as changing the `BackColor` property of an MDI Form. To run this example, paste the following code in a new form. - +> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. + + + +## Examples + The following example demonstrates using the property as well as changing the `BackColor` property of an MDI Form. To run this example, paste the following code in a new form. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/IsMdiContainer/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MdiClientExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MdiClientExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -2845,11 +2845,11 @@ To display a Help button, the value of the form's if the form has restrictions; otherwise, . The default is . - property determines whether the permission is granted. This property is set at run time in the form's constructor, and is cached for the lifetime of the form. Windows Forms applications running in partial trust cannot circumvent this check, as the common language runtime ensures that the parent constructor is always called in partial trust. - + property determines whether the permission is granted. This property is set at run time in the form's constructor, and is cached for the lifetime of the form. Windows Forms applications running in partial trust cannot circumvent this check, as the common language runtime ensures that the parent constructor is always called in partial trust. + ]]> @@ -2887,28 +2887,28 @@ To display a Help button, the value of the form's if the form will receive all key events; if the currently selected control on the form receives key events. The default is . - , , and events. After the form's event handlers have completed processing the keystroke, the keystroke is then assigned to the control with focus. For example, if the property is set to `true` and the currently selected control is a , after the keystroke is handled by the event handlers of the form the control will receive the key that was pressed. To handle keyboard events only at the form level and not allow controls to receive keyboard events, set the property in your form's event handler to `true`. - - You can use this property to process most keystrokes in your application and either handle the keystroke or call the appropriate control to handle the keystroke. For example, when an application uses function keys, you might want to process the keystrokes at the form level rather than writing code for each control that might receive keystroke events. - + , , and events. After the form's event handlers have completed processing the keystroke, the keystroke is then assigned to the control with focus. For example, if the property is set to `true` and the currently selected control is a , after the keystroke is handled by the event handlers of the form the control will receive the key that was pressed. To handle keyboard events only at the form level and not allow controls to receive keyboard events, set the property in your form's event handler to `true`. + + You can use this property to process most keystrokes in your application and either handle the keystroke or call the appropriate control to handle the keystroke. For example, when an application uses function keys, you might want to process the keystrokes at the form level rather than writing code for each control that might receive keystroke events. + > [!NOTE] -> If a form has no visible or enabled controls, it automatically receives all keyboard events. - +> If a form has no visible or enabled controls, it automatically receives all keyboard events. + > [!NOTE] -> A control on a form may be programmed to cancel any keystrokes it receives. Since the control never sends these keystrokes to the form, the form will never see them regardless of the setting of . - - - -## Examples - The following example demonstrates setting a form's property to true and handling the key events at the form level. To run the example, paste the following code in a blank form. - +> A control on a form may be programmed to cancel any keystrokes it receives. Since the control never sends these keystrokes to the form, the form will never see them regardless of the setting of . + + + +## Examples + The following example demonstrates setting a form's property to true and handling the key events at the form level. To run the example, paste the following code in a blank form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/ProcessMnemonic/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/VB/form1.vb" id="Snippet2"::: + ]]> @@ -2945,20 +2945,20 @@ To display a Help button, the value of the form's One of the values that defines the layout of MDI child forms. Arranges the multiple-document interface (MDI) child forms within the MDI parent form. - method to arrange any child forms that are currently open in the application. - + method to arrange any child forms that are currently open in the application. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.LayoutMdi Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/LayoutMdi/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.LayoutMdi Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.LayoutMdi Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -2990,22 +2990,22 @@ To display a Help button, the value of the form's Occurs before a form is displayed for the first time. - , , , and members. To run the example, paste the following code in a form called `Form1` containing a called `Button1` and two controls called `Label1` and `Label2`. - + , , , and members. To run the example, paste the following code in a form called `Form1` containing a called `Button1` and two controls called `Label1` and `Label2`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: + ]]> @@ -3043,13 +3043,13 @@ To display a Help button, the value of the form's Gets or sets the that represents the upper-left corner of the in screen coordinates. The that represents the upper-left corner of the in screen coordinates. - is a structure, which means that it is a value type. If you access a property in , a copy of the property is returned. Therefore, changing the or properties of the returned from the property will not affect the , , , or property values of the . To adjust these properties, set each property value individually, or set the property with a new . - - The property gets or sets the property of the base class, and sets the property to `true`. - + is a structure, which means that it is a value type. If you access a property in , a copy of the property is returned. Therefore, changing the or properties of the returned from the property will not affect the , , , or property values of the . To adjust these properties, set each property value individually, or set the property with a new . + + The property gets or sets the property of the base class, and sets the property to `true`. + ]]> @@ -3093,13 +3093,13 @@ To display a Help button, the value of the form's Gets or sets the primary menu container for the form. A that represents the container for the menu structure of the form. The default is . - property, you must the control to the collection of the form. - - The class supersedes the class in previous versions of the .NET Framework. - + property, you must the control to the collection of the form. + + The class supersedes the class in previous versions of the .NET Framework. + ]]> @@ -3213,26 +3213,26 @@ To display a Help button, the value of the form's to display a **Maximize** button for the form; otherwise, . The default is . - property must be `true`, its default value. The property determines whether the upper-right corner of the caption bar contains controls such as a maximize button, a minimize button, a help button, and a close button. In addition, you must also set the form's property to , , , or . - - A **Maximize** button automatically becomes a restore button when a window is maximized. Minimizing or restoring a window automatically changes the restore button back to a **Maximize** button. - + property must be `true`, its default value. The property determines whether the upper-right corner of the caption bar contains controls such as a maximize button, a minimize button, a help button, and a close button. In addition, you must also set the form's property to , , , or . + + A **Maximize** button automatically becomes a restore button when a window is maximized. Minimizing or restoring a window automatically changes the restore button back to a **Maximize** button. + > [!NOTE] -> Maximizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Maximized`, the form is maximized independently of whatever settings are in effect for the and properties. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - +> Maximizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Maximized`, the form is maximized independently of whatever settings are in effect for the and properties. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -3265,10 +3265,10 @@ To display a Help button, the value of the form's Gets or sets the size of the form when it is maximized. A that represents the bounds of the form when it is maximized. To be added. - The value of the property is greater than the height of the form. - - -or- - + The value of the property is greater than the height of the form. + + -or- + The value of the property is greater than the width of the form. Classes that inherit from can override this method to provide new bounds for the form when it is maximized. The class sets this property internally when the form's **Maximize** button is clicked. @@ -3303,21 +3303,21 @@ To display a Help button, the value of the form's Occurs when the value of the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet389"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet389"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet389"::: + ]]> @@ -3367,20 +3367,20 @@ To display a Help button, the value of the form's Gets the maximum size the form can be resized to. A that represents the maximum size for the form. - object that is 0 in height and 0 in width, the form will have no maximum size beyond the limits set by Windows. - - - -## Examples - The following example demonstrates setting the property. - + object that is 0 in height and 0 in width, the form will have no maximum size beyond the limits set by Windows. + + + +## Examples + The following example demonstrates setting the property. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormExample/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/MaximumSize/form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormExample/VB/form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormExample/VB/form1.vb" id="Snippet3"::: + ]]> The values of the height or width within the object are less than zero. @@ -3415,21 +3415,21 @@ To display a Help button, the value of the form's Occurs when the value of the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet390"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet390"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet390"::: + ]]> @@ -3462,23 +3462,23 @@ To display a Help button, the value of the form's Occurs when a multiple-document interface (MDI) child form is activated or closed within an MDI application. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet397"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet397"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet397"::: + ]]> @@ -3528,22 +3528,22 @@ To display a Help button, the value of the form's Gets an array of forms that represent the multiple-document interface (MDI) child forms that are parented to this form. An array of objects, each of which identifies one of this form's MDI child forms. - that will be the MDI parent form to the property of the child form. - - You can use this property to loop through all the MDI child forms to perform operations such as saving data to a database when the MDI parent form closes or to update fields on the child forms based on actions performed in your application. - - - -## Examples - The following example demonstrates how to use the property to iterate through the list of MDI child forms and add a control to each. - + that will be the MDI parent form to the property of the child form. + + You can use this property to loop through all the MDI child forms to perform operations such as saving data to a database when the MDI parent form closes or to update fields on the child forms based on actions performed in your application. + + + +## Examples + The following example demonstrates how to use the property to iterate through the list of MDI child forms and add a control to each. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.MDIChildren/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/MdiChildren/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.MDIChildren/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.MDIChildren/VB/form1.vb" id="Snippet1"::: + ]]> @@ -3631,33 +3631,33 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Gets or sets the current multiple-document interface (MDI) parent form of this form. A that represents the MDI parent form. - that will be the MDI parent form to the property of the child form. You can use this property from an MDI child form to obtain global information that all child forms need or to invoke methods that perform actions to all child forms. - + that will be the MDI parent form to the property of the child form. You can use this property from an MDI child form to obtain global information that all child forms need or to invoke methods that perform actions to all child forms. + > [!NOTE] -> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. - - - -## Examples - The following example demonstrates how to create child forms in an MDI application. The example code creates a form with unique text to identify the child form. The example uses the property to specify that a form is a child form. This example requires that the code in the example is called from a form that has its property set to `true` and that the form has a private class level integer variable named `childCount`. - +> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. + + + +## Examples + The following example demonstrates how to create child forms in an MDI application. The example code creates a form with unique text to identify the child form. The example uses the property to specify that a form is a child form. This example requires that the code in the example is called from a form that has its property set to `true` and that the form has a private class level integer variable named `childCount`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.MDIParent/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/MdiParent/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.MDIParent/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.MDIParent/VB/form1.vb" id="Snippet1"::: + ]]> - The assigned to this property is not marked as an MDI container. - - -or- - - The assigned to this property is both a child and an MDI container form. - - -or- - + The assigned to this property is not marked as an MDI container. + + -or- + + The assigned to this property is both a child and an MDI container form. + + -or- + The assigned to this property is located on a different thread. @@ -3699,20 +3699,20 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Gets or sets the that is displayed in the form. A that represents the menu to display in the form. - to be displayed when your multiple-document interface (MDI) form has no active MDI child forms and another to display when a child window is displayed. You can also use a different when specific conditions exist in your application that require displaying a different menu set. - - - -## Examples - The following example creates a , assigns two objects to the and binds it to a form. This example requires that you have a created that is named `Form1`. - + to be displayed when your multiple-document interface (MDI) form has no active MDI child forms and another to display when a child window is displayed. You can also use a different when specific conditions exist in your application that require displaying a different menu set. + + + +## Examples + The following example creates a , assigns two objects to the and binds it to a form. This example requires that you have a created that is named `Form1`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MainMenu.MainMenu Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Menu/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic MainMenu.MainMenu Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic MainMenu.MainMenu Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -3752,23 +3752,23 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Occurs when the menu of a form loses focus. - control or enabling and disabling buttons on a . - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + control or enabling and disabling buttons on a . + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet398"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet398"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet398"::: + ]]> @@ -3806,23 +3806,23 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Occurs when the menu of a form receives focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet399"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet399"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet399"::: + ]]> @@ -3867,11 +3867,11 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Gets the merged menu for the form. A that represents the merged menu of the form. - assigned to a form, use the property. - + assigned to a form, use the property. + ]]> @@ -3912,23 +3912,23 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f to display a **Minimize** button for the form; otherwise, . The default is . - property must be `true`, its default value. The property determines whether the upper-right corner of the caption bar contains controls such as a maximize button, a minimize button, a help button, and a close button. In addition, you must also set the form's property to , , , or . - + property must be `true`, its default value. The property determines whether the upper-right corner of the caption bar contains controls such as a maximize button, a minimize button, a help button, and a close button. In addition, you must also set the form's property to , , , or . + > [!NOTE] -> Minimizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Minimized`, the form is minimized independently of whatever settings are in effect for the and properties. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - +> Minimizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Minimized`, the form is minimized independently of whatever settings are in effect for the and properties. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.AcceptButton Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -3978,11 +3978,11 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Gets or sets the minimum size the form can be resized to. A that represents the minimum size for the form. - object that is 0 in height and 0 in width, the form will have no minimum size beyond the limits set by Windows. - + object that is 0 in height and 0 in width, the form will have no minimum size beyond the limits set by Windows. + ]]> The values of the height or width within the object are less than zero. @@ -4014,21 +4014,21 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Occurs when the value of the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet391"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet391"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet391"::: + ]]> @@ -4072,24 +4072,24 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f if the form is displayed modally; otherwise, . - method. - - - -## Examples - The following example uses the property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form a non-top-level form with a tool window border. - + method. + + + +## Examples + The following example uses the property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form a non-top-level form with a tool window border. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Modal/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Modal/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Modal/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Modal/VB/form1.vb" id="Snippet1"::: + ]]> @@ -4134,13 +4134,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + ]]> @@ -4184,13 +4184,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f An that contains the data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4232,13 +4232,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4285,29 +4285,29 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - [!CAUTION] -> The method is obsolete starting with the .NET Framework 2.0; use the method instead. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. - +> The method is obsolete starting with the .NET Framework 2.0; use the method instead. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + > [!CAUTION] -> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. - - - -## Examples - The following example demonstrates how to override the method in a class derived from . - +> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. + + + +## Examples + The following example demonstrates how to override the method in a class derived from . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Drawing/Color/Overview/form1.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/VB/form1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/VB/form1.vb" id="Snippet6"::: + ]]> @@ -4356,29 +4356,29 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A that contains the event data. Raises the event. - [!CAUTION] -> The method is obsolete starting with the .NET Framework 2.0; use the method instead. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. - +> The method is obsolete starting with the .NET Framework 2.0; use the method instead. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + > [!CAUTION] -> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. - - - -## Examples - The following example uses to test if the text in a has changed. If it has, the user is asked whether to save the changes to a file. - +> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. + + + +## Examples + The following example uses to test if the text in a has changed. If it has, the user is asked whether to save the changes to a file. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Closing/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Closing/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Closing/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Closing/VB/form1.vb" id="Snippet1"::: + ]]> @@ -4420,11 +4420,11 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Raises the event. - @@ -4471,13 +4471,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4617,13 +4617,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4711,15 +4711,15 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A that contains the event data. Raises the event. - method removes the current form from the collection of the associated . - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. - + method removes the current form from the collection of the associated . + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + ]]> @@ -4770,13 +4770,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4988,13 +4988,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5044,13 +5044,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5099,13 +5099,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5190,13 +5190,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5245,13 +5245,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5301,13 +5301,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5357,13 +5357,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5412,13 +5412,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5467,13 +5467,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5522,13 +5522,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5660,15 +5660,15 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A that contains the event data. Raises the event. - event will only be raised if the form's property is set to `true`. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + event will only be raised if the form's property is set to `true`. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5718,15 +5718,15 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A that contains the event data. Raises the event. - event will only be raised if the form's property is set to `true`. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + event will only be raised if the form's property is set to `true`. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5776,15 +5776,15 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f An that contains the event data. Raises the event. - method will return without performing any action. If the property of the form has a value of , then the handles of the form and its child controls will be recreated through calls to the method. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method will return without performing any action. If the property of the form has a value of , then the handles of the form and its child controls will be recreated through calls to the method. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5835,15 +5835,15 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A that contains the event data. Raises the event. - event occurs whenever the form is first shown. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + event occurs whenever the form is first shown. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5980,13 +5980,13 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -6033,27 +6033,27 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Gets or sets the opacity level of the form. The level of opacity for the form. The default is 1.00. - property enables you to specify a level of transparency for the form and its controls. When this property is set to a value less than 100 percent (1.00), the entire form, including borders, is made more transparent. Setting this property to a value of 0 percent (0.00) makes the form completely invisible. You can use this property to provide different levels of transparency or to provide effects such as phasing a form in or out of view. For example, you can phase a form into view by setting the property to a value of 0 percent (0.00) and gradually increasing the value until it reaches 100 percent (1.00). - - differs from the transparency provided by , which only makes a form and its controls completely transparent if they are the same color as the value specified in the property. - -This property is not supported when is `true`. - + property enables you to specify a level of transparency for the form and its controls. When this property is set to a value less than 100 percent (1.00), the entire form, including borders, is made more transparent. Setting this property to a value of 0 percent (0.00) makes the form completely invisible. You can use this property to provide different levels of transparency or to provide effects such as phasing a form in or out of view. For example, you can phase a form into view by setting the property to a value of 0 percent (0.00) and gradually increasing the value until it reaches 100 percent (1.00). + + differs from the transparency provided by , which only makes a form and its controls completely transparent if they are the same color as the value specified in the property. + +This property is not supported when is `true`. + The property depends on the Layered Windows API. For more information, see [Layered Windows](/windows/win32/winmsg/window-features#layered-windows). ## Examples -The following example demonstrates how to create a form that is displayed with an opacity level of 75 percent. It creates a new form that is positioned in the center of the screen with an property set to change the opacity level of the form. The example also sets the property to provide a larger sized form than the default size of the form. +The following example demonstrates how to create a form that is displayed with an opacity level of 75 percent. It creates a new form that is positioned in the center of the screen with an property set to change the opacity level of the form. The example also sets the property to provide a larger sized form than the default size of the form. + +This example assumes that the `CreateMyOpaqueForm` method is called from another form in an event handler or other method. -This example assumes that the `CreateMyOpaqueForm` method is called from another form in an event handler or other method. - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Opacity/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Opacity/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Opacity/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Opacity/VB/form1.vb" id="Snippet1"::: + ]]> @@ -6104,25 +6104,25 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets an array of objects that represent all forms that are owned by this form. A array that represents the owned forms for this form. - method. The form assigned to the owner form will remain owned until the method is called. You can also make a form owned by another by setting the property with a reference to its owner form. - - When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected. - + method. The form assigned to the owner form will remain owned until the method is called. You can also make a form owned by another by setting the property with a reference to its owner form. + + When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected. + > [!NOTE] -> If the form is a multiple-document interface (MDI) parent form, this property will return all forms that are displayed with the exception of any MDI child forms that are currently open. To obtain the MDI child forms opened in an MDI parent form, use the property. - - - -## Examples - The following example demonstrates how to use the property to modify all forms owned by the owner form. The first method in the example adds forms to the array of owned forms associated with the owned form. The second method loops through all owned forms and changes the caption. This example requires that both methods are called by an event or other method of a form. - +> If the form is a multiple-document interface (MDI) parent form, this property will return all forms that are displayed with the exception of any MDI child forms that are currently open. To obtain the MDI child forms opened in an MDI parent form, use the property. + + + +## Examples + The following example demonstrates how to use the property to modify all forms owned by the owner form. The first method in the example adds forms to the array of owned forms associated with the owned form. The second method loops through all owned forms and changes the caption. This example requires that both methods are called by an event or other method of a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.OwnedForms/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/OwnedForms/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.OwnedForms/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.OwnedForms/VB/form1.vb" id="Snippet1"::: + ]]> @@ -6167,13 +6167,13 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets or sets the form that owns this form. A that represents the form that is the owner of this form. - property a reference to the form that will be the owner. - - When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not disappear when the owner form is selected. To determine the forms that are owned by a parent form, use the property. - + property a reference to the form that will be the owner. + + When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not disappear when the owner form is selected. To determine the forms that are owned by a parent form, use the property. + ]]> A top-level window cannot have an owner. @@ -6215,13 +6215,13 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another if the keystroke was processed and consumed by the control; otherwise, to allow further processing. - method overrides the base implementation to provide additional handling of main menu command keys and MDI accelerators. - - For information about keyboard input, see [Keyboard Input in a Windows Forms Application](/dotnet/framework/winforms/keyboard-input-in-a-windows-forms-application). - + method overrides the base implementation to provide additional handling of main menu command keys and MDI accelerators. + + For information about keyboard input, see [Keyboard Input in a Windows Forms Application](/dotnet/framework/winforms/keyboard-input-in-a-windows-forms-application). + ]]> @@ -6301,11 +6301,11 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another if the keystroke was processed and consumed by the control; otherwise, to allow further processing. - method overrides the base implementation to provide additional handling of the RETURN and ESCAPE keys in dialog boxes. The method performs no processing on keystrokes that include the ALT or CONTROL modifiers. - + method overrides the base implementation to provide additional handling of the RETURN and ESCAPE keys in dialog boxes. The method performs no processing on keystrokes that include the ALT or CONTROL modifiers. + ]]> @@ -6445,11 +6445,11 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another A representing the form to remove from the list of owned forms for this form. Removes an owned form from this form. - method is called. In addition to removing the owned form from the list of owned form, this method also sets the owner form to `null`. - + method is called. In addition to removing the owned form from the list of owned form, this method also sets the owner form to `null`. + ]]> @@ -6482,34 +6482,34 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Occurs when a form enters resizing mode. - event is raised when the user begins to resize a form, typically by clicking and dragging one of the borders or the sizing grip located on the lower-right corner of the form. This action puts the form into a modal sizing loop until the resize operation is completed. Typically, the following set of events occurs during a resize operation: - -1. A single event occurs as the form enters resizing mode. - -2. Zero or more pairs of and events occur as the form's is modified. - -3. A single event occurs as the form exits resizing mode. - + event is raised when the user begins to resize a form, typically by clicking and dragging one of the borders or the sizing grip located on the lower-right corner of the form. This action puts the form into a modal sizing loop until the resize operation is completed. Typically, the following set of events occurs during a resize operation: + +1. A single event occurs as the form enters resizing mode. + +2. Zero or more pairs of and events occur as the form's is modified. + +3. A single event occurs as the form exits resizing mode. + > [!NOTE] -> Just clicking without dragging on a border or resizing grip will generate the and events without any intermediate and event pairs. - - The and pair of events is also raised when the user moves the form, typically by clicking and dragging on the caption bar. These events are not generated by programmatic manipulation of the form, for example by changing the or properties. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - +> Just clicking without dragging on a border or resizing grip will generate the and events without any intermediate and event pairs. + + The and pair of events is also raised when the user moves the form, typically by clicking and dragging on the caption bar. These events are not generated by programmatic manipulation of the form, for example by changing the or properties. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet404"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet404"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet404"::: + ]]> @@ -6553,25 +6553,25 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Occurs when a form exits resizing mode. - event is raised when the user finishes resizing a form, typically by dragging one of the borders or the sizing grip located on the lower-right corner of the form, and then releasing it. For more information about the resizing operation, see the event. - - The event is also generated after the user moves a form, typically by clicking and dragging on the caption bar. This event is not generated by programmatic manipulation of the form, for example by changing the or properties. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event is raised when the user finishes resizing a form, typically by dragging one of the borders or the sizing grip located on the lower-right corner of the form, and then releasing it. For more information about the resizing operation, see the event. + + The event is also generated after the user moves a form, typically by clicking and dragging on the caption bar. This event is not generated by programmatic manipulation of the form, for example by changing the or properties. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet405"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet405"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet405"::: + ]]> @@ -6625,14 +6625,14 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets the location and size of the form in its normal window state. A that contains the location and size of the form in the normal window state. - property to track the user's window size and position preferences for the form in its normal window state. You should track both the value of the and properties when tracking the user's window preferences. - + property to track the user's window size and position preferences for the form in its normal window state. You should track both the value of the and properties when tracking the user's window preferences. + > [!NOTE] -> The value of the property is valid only when the property of the class is not equal to . - +> The value of the property is valid only when the property of the class is not equal to . + ]]> @@ -6677,25 +6677,25 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another if right-to-left mirror placement is turned on; otherwise, for standard child control placement. The default is . - property is primarily useful for developing world-ready forms for worldwide audiences. Many forms are designed so that controls are laid out on a form in a left-to-right fashion. These forms are compatible with languages that follow this writing direction. However, when you display the same forms to users of right-to-left languages, it is often preferable to reverse the order of the controls on the form. If both the and properties are `true`, mirroring will be turned on for the form, and control placement and text flow will be right-to-left. - - Unlike , does not inherit. If you want it to take effect for child controls, you must set it on each child control that you want mirrored. - - Owner draw is not supported when is set to `Yes`. The owner draw events will still occur, but the behavior of any code you author in these events is not defined. Additionally, , , , and the painting events are not supported. - - The and properties cause the following Windows API window styles to be set: - -- When is set to `Yes` and is set to `true`, Windows Forms sets the `WS_EX_LAYOUTRTL` window style, and removes the `WS_EX_RIGHT` and `WS_EX_RTLREADING` styles. - -- When is set to `Yes` but is set to `No`, Windows Forms sets the `WS_EX_RIGHT` and `WS_EX_RTLREADING` window styles. - - Changing the value of this property raises the event. - - For more information about globalization issues, see [Best Practices for Developing World-Ready Applications](/dotnet/standard/globalization-localization/best-practices-for-developing-world-ready-apps). - + property is primarily useful for developing world-ready forms for worldwide audiences. Many forms are designed so that controls are laid out on a form in a left-to-right fashion. These forms are compatible with languages that follow this writing direction. However, when you display the same forms to users of right-to-left languages, it is often preferable to reverse the order of the controls on the form. If both the and properties are `true`, mirroring will be turned on for the form, and control placement and text flow will be right-to-left. + + Unlike , does not inherit. If you want it to take effect for child controls, you must set it on each child control that you want mirrored. + + Owner draw is not supported when is set to `Yes`. The owner draw events will still occur, but the behavior of any code you author in these events is not defined. Additionally, , , , and the painting events are not supported. + + The and properties cause the following Windows API window styles to be set: + +- When is set to `Yes` and is set to `true`, Windows Forms sets the `WS_EX_LAYOUTRTL` window style, and removes the `WS_EX_RIGHT` and `WS_EX_RTLREADING` styles. + +- When is set to `Yes` but is set to `No`, Windows Forms sets the `WS_EX_RIGHT` and `WS_EX_RTLREADING` window styles. + + Changing the value of this property raises the event. + + For more information about globalization issues, see [Best Practices for Developing World-Ready Applications](/dotnet/standard/globalization-localization/best-practices-for-developing-world-ready-apps). + ]]> @@ -6728,21 +6728,21 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Occurs after the value of the property changes. - and properties are typically used in developing World-Ready applications. - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + and properties are typically used in developing World-Ready applications. + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet402"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet402"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet402"::: + ]]> @@ -7015,20 +7015,20 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another The height of the form. Sets the bounds of the form in desktop coordinates. - method. To run this example, paste the following code in a form that contains a button named `Button2`. Ensure all events are associated with their event handlers. - + method. To run this example, paste the following code in a form that contains a button named `Button2`. Ensure all events are associated with their event handlers. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/MaximumSize/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormExample/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormExample/VB/form1.vb" id="Snippet2"::: + ]]> @@ -7065,20 +7065,20 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another The y-coordinate of the form's location. Sets the location of the form in desktop coordinates. - method to position multiple-document interface (MDI) child forms. - - - -## Examples - The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. - + method to position multiple-document interface (MDI) child forms. + + + +## Examples + The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/VB/form1.vb" id="Snippet1"::: + ]]> @@ -7153,35 +7153,35 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Any object that implements and represents the top-level window that will own this form. Shows the form with the specified owner to the user. - property of the form is set to `owner`. The non-modal form can use the property to get information about the owning form. Calling this method is identical to setting the property of the non-modal and then calling the method. - - Showing the form is equivalent to setting the property to `true`. After the method is called, the property returns a value of `true` until the method is called. - + property of the form is set to `owner`. The non-modal form can use the property to get information about the owning form. Calling this method is identical to setting the property of the non-modal and then calling the method. + + Showing the form is equivalent to setting the property to `true`. After the method is called, the property returns a value of `true` until the method is called. + ]]> - The form being shown is already visible. - - -or- - - The form specified in the parameter is the same as the form being shown. - - -or- - - The form being shown is disabled. - - -or- - - The form being shown is not a top-level window. - - -or- - - The form being shown as a dialog box is already a modal form. - - -or- - + The form being shown is already visible. + + -or- + + The form specified in the parameter is the same as the form being shown. + + -or- + + The form being shown is disabled. + + -or- + + The form being shown is not a top-level window. + + -or- + + The form being shown as a dialog box is already a modal form. + + -or- + The current process is not running in user interactive mode (for more information, see ). @@ -7233,42 +7233,42 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Shows the form as a modal dialog box. One of the values. - enumeration by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. - - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike non-modal forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. - - This version of the method does not specify a form or control as its owner. When this version is called, the currently active window is made the owner of the dialog box. If you want to specify a specific owner, use the other version of this method. - - - -## Examples - The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `testDialog` is created and that it contains a control named `TextBox1`. Furthermore, the example requires that code in this example is contained and called from a different in order to display `testDialog` as a modal dialog box. The example uses the version of that specifies an owner for the dialog box. - + enumeration by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. + + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike non-modal forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. + + This version of the method does not specify a form or control as its owner. When this version is called, the currently active window is made the owner of the dialog box. If you want to specify a specific owner, use the other version of this method. + + + +## Examples + The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `testDialog` is created and that it contains a control named `TextBox1`. Furthermore, the example requires that code in this example is contained and called from a different in order to display `testDialog` as a modal dialog box. The example uses the version of that specifies an owner for the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ShowDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ShowDialog/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ShowDialog Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ShowDialog Example/VB/source.vb" id="Snippet1"::: + ]]> - The form being shown is already visible. - - -or- - - The form being shown is disabled. - - -or- - - The form being shown is not a top-level window. - - -or- - - The form being shown as a dialog box is already a modal form. - - -or- - + The form being shown is already visible. + + -or- + + The form being shown is disabled. + + -or- + + The form being shown is not a top-level window. + + -or- + + The form being shown as a dialog box is already a modal form. + + -or- + The current process is not running in user interactive mode (for more information, see ). @@ -7304,43 +7304,43 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Shows the form as a modal dialog box with the specified owner. One of the values. - by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. - - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike modeless forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. - - This version of the method allows you to specify a specific form that will own the dialog box that is shown. - - - -## Examples - The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `Form2` is created and that it contains a control named `TextBox1`. The example uses the version of that specifies an owner for the dialog box. - + by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. + + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike modeless forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. + + This version of the method allows you to specify a specific form that will own the dialog box that is shown. + + + +## Examples + The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `Form2` is created and that it contains a control named `TextBox1`. The example uses the version of that specifies an owner for the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ShowDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ShowDialog/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ShowDialog Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.ShowDialog Example/VB/source.vb" id="Snippet1"::: + ]]> The form specified in the parameter is the same as the form being shown. - The form being shown is already visible. - - -or- - - The form being shown is disabled. - - -or- - - The form being shown is not a top-level window. - - -or- - - The form being shown as a dialog box is already a modal form. - - -or- - + The form being shown is already visible. + + -or- + + The form being shown is disabled. + + -or- + + The form being shown is not a top-level window. + + -or- + + The form being shown as a dialog box is already a modal form. + + -or- + The current process is not running in user interactive mode (for more information, see ). @@ -7377,15 +7377,15 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another if the form displays an icon in the caption bar; otherwise, . The default is . - property contains a value that indicates whether the form's is displayed in the caption bar of the form. If the property is `false`, both the icon and control box will be suppressed. - - If is `false` when the primary form is shown, a generic icon will be displayed in the taskbar button for the application. - - This property has no effect if is set to . In that case, the form does not display an icon. - + property contains a value that indicates whether the form's is displayed in the caption bar of the form. If the property is `false`, both the icon and control box will be suppressed. + + If is `false` when the primary form is shown, a generic icon will be displayed in the taskbar button for the application. + + This property has no effect if is set to . In that case, the form does not display an icon. + ]]> @@ -7427,24 +7427,24 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another to display the form in the Windows taskbar at run time; otherwise, . The default is . - style. Setting the style does not alone guarantee that a window will not appear in the taskbar. - - - -## Examples - The following example demonstrates how to use the property to make a dialog box that is not displayed in the Windows taskbar. - + style. Setting the style does not alone guarantee that a window will not appear in the taskbar. + + + +## Examples + The following example demonstrates how to use the property to make a dialog box that is not displayed in the Windows taskbar. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.ShowInTaskbar/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ShowInTaskbar/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.ShowInTaskbar/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.ShowInTaskbar/VB/form1.vb" id="Snippet1"::: + ]]> @@ -7474,23 +7474,23 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Occurs whenever the form is first displayed. - event is only raised the first time a form is displayed; subsequently minimizing, maximizing, restoring, hiding, showing, or invalidating and repainting will not raise this event. For more information about the order of events of a form, see [Order of Events in Windows Forms](/dotnet/framework/winforms/order-of-events-in-windows-forms). - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. - + event is only raised the first time a form is displayed; subsequently minimizing, maximizing, restoring, hiding, showing, or invalidating and repainting will not raise this event. For more information about the order of events of a form, see [Order of Events in Windows Forms](/dotnet/framework/winforms/order-of-events-in-windows-forms). + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet403"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet403"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet403"::: + ]]> @@ -7538,15 +7538,15 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another if the window will not be activated when it is shown; otherwise, . The default is . - in your own form, and programming it to return `true`. - - If your non-activated window needs to use UI controls, you should consider using the controls, such as . These controls are windowless, and will not cause a window to activate when they are selected. - + in your own form, and programming it to return `true`. + + If your non-activated window needs to use UI controls, you should consider using the controls, such as . These controls are windowless, and will not cause a window to activate when they are selected. + ]]> @@ -7588,26 +7588,26 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets or sets the size of the form. A that represents the size of the form. - and properties individually. If you want to set the size and location of a form, you can use the property to size and locate the form based on desktop coordinates or use the property of the class to set the size and location of the form based on screen coordinates. - + and properties individually. If you want to set the size and location of a form, you can use the property to size and locate the form based on desktop coordinates or use the property of the class to set the size and location of the form based on screen coordinates. + > [!NOTE] -> The maximum value of this property is limited by the resolution of the screen on which the form runs. The value cannot be greater than 12 pixels over each screen dimension (horizontal + 12 and vertical + 12). - +> The maximum value of this property is limited by the resolution of the screen on which the form runs. The value cannot be greater than 12 pixels over each screen dimension (horizontal + 12 and vertical + 12). + > [!NOTE] -> On Pocket PC devices, you can create a resizable window by setting to `None` and removing any control. On SmartPhone devices, you can never resize a - it will always fill the entire screen. - - - -## Examples - The following example demonstrates how to create a form that is displayed with an opacity level of 75 percent. The example code creates a new form that is positioned in the center of the screen with an property set to change the opacity level of the form. The example code also sets the property to provide a larger sized form than the default size of the form. This example requires that the method defined in this example is called from another form in an event handler or other method. - +> On Pocket PC devices, you can create a resizable window by setting to `None` and removing any control. On SmartPhone devices, you can never resize a - it will always fill the entire screen. + + + +## Examples + The following example demonstrates how to create a form that is displayed with an opacity level of 75 percent. The example code creates a new form that is positioned in the center of the screen with an property set to change the opacity level of the form. The example code also sets the property to provide a larger sized form than the default size of the form. This example requires that the method defined in this example is called from another form in an event handler or other method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Opacity/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Opacity/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Opacity/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Opacity/VB/form1.vb" id="Snippet1"::: + ]]> @@ -7648,20 +7648,20 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets or sets the style of the size grip to display in the lower-right corner of the form. A that represents the style of the size grip to display. The default is - property. - - - -## Examples - The following example demonstrates how to hide the size grip for a when the is not resizable. - + property. + + + +## Examples + The following example demonstrates how to hide the size grip for a when the is not resizable. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.SizeGripStyle/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/SizeGripStyle/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.SizeGripStyle/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.SizeGripStyle/VB/form1.vb" id="Snippet1"::: + ]]> The value specified is outside the range of valid values. @@ -7705,22 +7705,22 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets or sets the starting position of the form at run time. A that represents the starting position of the form. - property or use the default location specified by Windows. You can also position the form to display in the center of the screen or in the center of its parent form for forms such as multiple-document interface (MDI) child forms. - - This property should be set before the form is shown. You can set this property before you call the or method or in your form's constructor. - - - -## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. - + property or use the default location specified by Windows. You can also position the form to display in the center of the screen or in the center of its parent form for forms such as multiple-document interface (MDI) child forms. + + This property should be set before the form is shown. You can set this property before you call the or method or in your form's constructor. + + + +## Examples + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.StartPosition Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/StartPosition/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.StartPosition Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.StartPosition Example/VB/source.vb" id="Snippet1"::: + ]]> The value specified is outside the range of valid values. @@ -7767,11 +7767,11 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets or sets the tab order of the control within its container. An containing the index of the control within the set of controls within its container that is included in the tab order. - property does nothing. - + property does nothing. + ]]> @@ -7984,20 +7984,20 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another to display the form as a top-level window; otherwise, . The default is . - property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form non-top-level form with a tool window border. - + property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form non-top-level form with a tool window border. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Modal/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Modal/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Modal/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.Modal/VB/form1.vb" id="Snippet1"::: + ]]> A Multiple-document interface (MDI) parent form must be a top-level window. @@ -8037,20 +8037,20 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another to display the form as a topmost form; otherwise, . The default is . - property, to better demonstrate the abilities of the topmost form. The second form, named `topMostForm`, sets the property to `true` to display the form as a topmost form. When this code is run, clicking on the maximized form will not cause the topmost form to be displayed below the maximized form. The example requires that the method defined in the example is called from another form. - + property, to better demonstrate the abilities of the topmost form. The second form, named `topMostForm`, sets the property to `true` to display the form as a topmost form. When this code is run, clicking on the maximized form will not cause the topmost form to be displayed below the maximized form. The example requires that the method defined in the example is called from another form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.TopMost/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/TopMost/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.TopMost/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Form.TopMost/VB/form1.vb" id="Snippet1"::: + ]]> @@ -8117,22 +8117,22 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets or sets the color that will represent transparent areas of the form. A that represents the color to display transparently on the form. - property is assigned a , the areas of the form that have the same will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. For example, if the client region of a form is made transparent, clicking the mouse on that area would send the event notification of the click to any window that is below it. If the color assigned to the property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a control on a form that has its property set to `SystemColors.Control`, the control will be displayed transparently unless the property of the control is changed to a different color. - - This property is not supported when is `true`. - - - -## Examples - The following example creates a window that has a transparent client region regardless of background color of the form. This example requires that the example method is defined within a form class. - + property is assigned a , the areas of the form that have the same will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. For example, if the client region of a form is made transparent, clicking the mouse on that area would send the event notification of the click to any window that is below it. If the color assigned to the property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a control on a form that has its property set to `SystemColors.Control`, the control will be displayed transparently unless the property of the control is changed to a different color. + + This property is not supported when is `true`. + + + +## Examples + The following example creates a window that has a transparent client region regardless of background color of the form. This example requires that the example method is defined within a form class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.TransparencyKey Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/TransparencyKey/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.TransparencyKey Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Form.TransparencyKey Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -8163,15 +8163,15 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Updates which button is the default button. - method determines which button on the form raises its Click event when the user presses ENTER, according to the following priority: - -1. If the property implements the interface, that control is the default button. - -2. The property is the default button. - + method determines which button on the form raises its Click event when the user presses ENTER, according to the following priority: + +1. If the property implements the interface, that control is the default button. + +2. The property is the default button. + ]]> @@ -8302,29 +8302,29 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another Gets or sets a value that indicates whether form is minimized, maximized, or normal. A that represents whether form is minimized, maximized, or normal. The default is . - property is always set to `FormWindowState.Normal`, regardless of its initial setting. This is reflected in the , , , and property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the property. - - - -## Examples - The following example demonstrates how to set the to maximized. The code is called from the event handler after the form has been created. - -```csharp -private void Form1_Shown(object sender, EventArgs e) -        { -            this.WindowState = System.Windows.Forms.FormWindowState.Maximized; -        } -``` - -```vb -Private Sub Form1_Shown(ByVal sender As Object, ByVal e As EventArgs) - Me.WindowState = System.Windows.Forms.FormWindowState.Maximized -End Sub -``` - + property is always set to `FormWindowState.Normal`, regardless of its initial setting. This is reflected in the , , , and property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the property. + + + +## Examples + The following example demonstrates how to set the to maximized. The code is called from the event handler after the form has been created. + +```csharp +private void Form1_Shown(object sender, EventArgs e) +        { +            this.WindowState = System.Windows.Forms.FormWindowState.Maximized; +        } +``` + +```vb +Private Sub Form1_Shown(ByVal sender As Object, ByVal e As EventArgs) + Me.WindowState = System.Windows.Forms.FormWindowState.Maximized +End Sub +``` + ]]> The value specified is outside the range of valid values. diff --git a/xml/System.Windows.Forms/HtmlWindow.xml b/xml/System.Windows.Forms/HtmlWindow.xml index 59541055bd7..d452e4a0296 100644 --- a/xml/System.Windows.Forms/HtmlWindow.xml +++ b/xml/System.Windows.Forms/HtmlWindow.xml @@ -32,25 +32,25 @@ Represents the logical window that contains one or more instances of . - should not be confused with the concept of a window in Windows Forms or the Windows API; there is no `HWND` or similar Windows resource that corresponds directly to an instance of . Rather, provides high-level descriptions of a document's location on a user's screen, as well as methods for interacting with users by way of prompts and dialog boxes. acts as a logical container for a Web page's documents and its metadata, such as the document's location and the capabilities of the Web browser. - - A Web page consists of a single document, or a `FRAMESET` containing one or more `FRAME` elements, each of which hosts its own document. Web developers use framesets to show logically related pages side by side (for example, a content page next to a navigation page). When a page consists of a single document, you can access it through the property of ; if the page uses frames, you can access their documents through the collection, which consists of one or more objects. - - When your host the control in a Windows Forms application, you can choose to interact with the user using standard Windows Forms classes, such as or , or you can use methods on defined for this purpose. The method presents a simple dialog box with custom text and an **OK** button; presents a line of custom text and a text input field to the user; and presents a dialog box with a line of custom text and **OK** and **Cancel** buttons. - - You can use to open new windows containing new documents. loads the specified URL into the named window, creating it if it does not already exist, while always opens its URL in a newly created window. - - - -## Examples - The following code example contains two methods. The first opens a URL in a window named `displayWindow`, which it creates with a status bar displayed. The second opens another URL in the same window, but specifies that only the location bar should be displayed. Notice that the dimensions of the window and the controls that are displayed depends on which URL is opened first. The code example requires that your form contains a control named `WebBrowser1`. - + should not be confused with the concept of a window in Windows Forms or the Windows API; there is no `HWND` or similar Windows resource that corresponds directly to an instance of . Rather, provides high-level descriptions of a document's location on a user's screen, as well as methods for interacting with users by way of prompts and dialog boxes. acts as a logical container for a Web page's documents and its metadata, such as the document's location and the capabilities of the Web browser. + + A Web page consists of a single document, or a `FRAMESET` containing one or more `FRAME` elements, each of which hosts its own document. Web developers use framesets to show logically related pages side by side (for example, a content page next to a navigation page). When a page consists of a single document, you can access it through the property of ; if the page uses frames, you can access their documents through the collection, which consists of one or more objects. + + When your host the control in a Windows Forms application, you can choose to interact with the user using standard Windows Forms classes, such as or , or you can use methods on defined for this purpose. The method presents a simple dialog box with custom text and an **OK** button; presents a line of custom text and a text input field to the user; and presents a dialog box with a line of custom text and **OK** and **Cancel** buttons. + + You can use to open new windows containing new documents. loads the specified URL into the named window, creating it if it does not already exist, while always opens its URL in a newly created window. + + + +## Examples + The following code example contains two methods. The first opens a URL in a window named `displayWindow`, which it creates with a status bar displayed. The second opens another URL in the same window, but specifies that only the location bar should be displayed. Notice that the dimensions of the window and the controls that are displayed depends on which URL is opened first. The code example requires that your form contains a control named `WebBrowser1`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet13"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet13"::: + ]]> window Object @@ -91,11 +91,11 @@ The to display in the message box. Displays a message box. - class offers a more powerful version of the method. - + class offers a more powerful version of the method. + ]]> alert Method @@ -137,11 +137,11 @@ A reference to the managed code that handles the event. Adds an event handler for the named HTML DOM event. - event of the control. - + event of the control. + ]]> EventTarget.addEventListener() @@ -172,19 +172,19 @@ Closes the window. - property to determine if the window is already closed. If the window is already closed, this method has no effect. - - When you create new windows using or , causes the HTML Document Object Model to open a new instance of Internet Explorer. If you don't call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application closes. - -## Examples - The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example was written under the assumption that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. To run this example successfully, change the first argument supplied to to a valid URL. - + property to determine if the window is already closed. If the window is already closed, this method has no effect. + + When you create new windows using or , causes the HTML Document Object Model to open a new instance of Internet Explorer. If you don't call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application closes. + +## Examples + The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example was written under the assumption that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. To run this example successfully, change the first argument supplied to to a valid URL. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet9"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet9"::: + ]]> close Method @@ -226,14 +226,14 @@ if the user clicked **Yes**; if the user clicked **No** or closed the dialog box. - displays a modal dialog box; the user will not be able to access the underlying HTML page without first closing this dialog box. - -## Examples + displays a modal dialog box; the user will not be able to access the underlying HTML page without first closing this dialog box. -Copy the following HTML and save it into a form called orderForm.htm: +## Examples + +Copy the following HTML and save it into a form called orderForm.htm: ```html @@ -243,11 +243,11 @@ Select Part Type:
Quantity:
Building/Desk: - / + /

@@ -255,11 +255,11 @@ Building/Desk: ``` -The following example displays a dialog box when the user submits `NewOrderForm`. - +The following example displays a dialog box when the user submits `NewOrderForm`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet10"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet10"::: + ]]> confirm Method @@ -330,19 +330,19 @@ The following example displays a Gets the HTML document contained within the window. A valid instance of , if a document is loaded. If this window contains a FRAMESET, or no document is currently loaded, it will return . - through the property of the control. Use this property when you need to access a document within a `FRAME` using the collection. - - - -## Examples - The following code example inspects each document within a page containing frames and creates a table of all of the outgoing hyperlinks from each page for future inspection. - + through the property of the control. Use this property when you need to access a document within a `FRAME` using the collection. + + + +## Examples + The following code example inspects each document within a page containing frames and creates a table of all of the outgoing hyperlinks from each page for future inspection. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet2"::: + ]]> @@ -386,21 +386,21 @@ The following example displays a Gets the unmanaged interface wrapped by this class. An object that can be cast to an , , or pointer. - . - - You must add a referenced to the unmanaged MSHTML.dll in order to use . For more information, see [Importing a Type Library as an Assembly](/dotnet/framework/interop/importing-a-type-library-as-an-assembly). - - - -## Examples - The following code example obtains an `IHTMLWindow2` pointer from a document's window and displays a new document in a modal window. - + . + + You must add a referenced to the unmanaged MSHTML.dll in order to use . For more information, see [Importing a Type Library as an Assembly](/dotnet/framework/interop/importing-a-type-library-as-an-assembly). + + + +## Examples + The following code example obtains an `IHTMLWindow2` pointer from a document's window and displays a new document in a modal window. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet3"::: + ]]> IHTMLWindow2 Interface @@ -466,19 +466,19 @@ The following example displays a

Occurs when script running inside of the window encounters a run-time error. - occurs whenever a script encounters a run-time error. Because script code is late-bound, which means that calls against the object are not resolved until run-time, errors can include everything from referencing a null object to calling an undefined property or method. - - You can set the property of to `true` in order to prevent the native error dialog box in Internet Explorer from displaying. - -## Examples - The following code example traps the error that results when a script on an HTML page attempts to access an object that is not defined in the document. The page must be fully loaded before the event handler is attached, otherwise the example will not work. - + occurs whenever a script encounters a run-time error. Because script code is late-bound, which means that calls against the object are not resolved until run-time, errors can include everything from referencing a null object to calling an undefined property or method. + + You can set the property of to `true` in order to prevent the native error dialog box in Internet Explorer from displaying. + +## Examples + The following code example traps the error that results when a script on an HTML page attempts to access an object that is not defined in the document. The page must be fully loaded before the event handler is attached, otherwise the example will not work. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet16"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet16"::: + ]]> onerror Event @@ -509,13 +509,13 @@ The following example displays a Puts the focus on the current window. - was called, that window will lose the focus. - - Do not call focus on an element inside of a window until the window's event has been raised. - + was called, that window will lose the focus. + + Do not call focus on an element inside of a window until the window's event has been raised. + ]]> focus Method @@ -547,21 +547,21 @@ The following example displays a Gets a reference to each of the FRAME elements defined within the Web page. An of a document's FRAME and IFRAME objects. - for each `FRAME` or `IFRAME` defined within a Web page. - - - -## Examples - The following code example inspects each document within a page containing frames and creates a table of all of the outgoing hyperlinks from each page for future inspection. - + for each `FRAME` or `IFRAME` defined within a Web page. + + + +## Examples + The following code example inspects each document within a page containing frames and creates a table of all of the outgoing hyperlinks from each page for future inspection. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet2"::: + ]]> frames Collection @@ -620,29 +620,29 @@ The following example displays a Occurs when the current window obtains user input focus. - will occur for: - -- The first window in a `FRAMESET` when the `FRAMESET` first loads. - -- The `FRAME` that last had focus when the window containing the control is brought to the foreground. - -- A `FRAME` clicked by the user, but only if the user's click does not put focus on an element within the window. - + will occur for: + +- The first window in a `FRAMESET` when the `FRAMESET` first loads. + +- The `FRAME` that last had focus when the window containing the control is brought to the foreground. + +- A `FRAME` clicked by the user, but only if the user's click does not put focus on an element within the window. + You cannot cancel the default action for the event, or prevent it from bubbling. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet452"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet452"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet452"::: + ]]> onfocus Event @@ -674,11 +674,11 @@ The following example displays a Gets an object containing the user's most recently visited URLs. The for the current window. - contains all URLs navigated to within the current window, which is referred to as the *navigation stack*, and provides methods for navigating back to those documents. - + contains all URLs navigated to within the current window, which is referred to as the *navigation stack*, and provides methods for navigating back to those documents. + ]]>
@@ -709,19 +709,19 @@ The following example displays a if the window is still open on the screen; otherwise, . - has been closed by the user or by way of a call to the method, attempting to navigate to a new URL or access the window's document will result in an error. Use this property to determine whether it is safe to call properties and methods on the current window object. - - - -## Examples - The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example requires that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. - + has been closed by the user or by way of a call to the method, attempting to navigate to a new URL or access the window's document will result in an error. Use this property to determine whether it is safe to call properties and methods on the current window object. + + + +## Examples + The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example requires that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet8"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet8"::: + ]]> closed Property @@ -752,23 +752,23 @@ The following example displays a Occurs when the window's document and all of its elements have finished initializing. - event works similarly to the event on the control: it signals that it is safe to access HTML elements inside of the document. - + event works similarly to the event on the control: it signals that it is safe to access HTML elements inside of the document. + You cannot cancel the default action for the event. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet453"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet453"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet453"::: + ]]> onload Event @@ -799,16 +799,16 @@ The following example displays a Occurs when user input focus has left the window. - event. This report helps you to learn when the event occurs and can assist you in debugging. - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet454"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet454"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet454"::: + ]]>
@@ -850,13 +850,13 @@ The following example displays a The x- and y-coordinates of the window's upper-left corner. Moves the window to the specified coordinates on the screen. - to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. - - will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control pointing to a.adatum.com, create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. - + to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. + + will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control pointing to a.adatum.com, create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. + ]]> The code trying to execute this operation does not have permission to manipulate this window. @@ -893,13 +893,13 @@ The following example displays a The y-coordinate of the window's upper-left corner. Moves the window to the specified coordinates on the screen. - to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. - - will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control and it is pointing to a.adatum.com, you create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. - + to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. + + will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control and it is pointing to a.adatum.com, you create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. + ]]> The code trying to execute this operation does not have permission to manipulate this window. @@ -990,11 +990,11 @@ The following example displays a The resource to display, described by a Uniform Resource Locator. Displays or downloads the new content located at the specified URL. - navigate Method @@ -1069,11 +1069,11 @@ The following example displays a if both parameters are , or if both elements have the same underlying COM interface; otherwise, . - classes. - + classes. + The equivalent method for this operator is ]]>
@@ -1158,66 +1158,66 @@ The following example displays a The Uniform Resource Locator that describes the location of the file to load. - The name of the window in which to open the resource. This may be a developer-supplied name, or one of the following special values: - - _blank: Opens in a new window. Works the same as a call to . - - _media: Opens in the Media bar. - - _parent: Opens in the window that created the current window. - - _search: Opens in the Search bar. - - _self: Opens in the current window. - + The name of the window in which to open the resource. This may be a developer-supplied name, or one of the following special values: + + _blank: Opens in a new window. Works the same as a call to . + + _media: Opens in the Media bar. + + _parent: Opens in the window that created the current window. + + _search: Opens in the Search bar. + + _self: Opens in the current window. + _top: If called against a window belonging to a FRAME element, opens in the window hosting its FRAMESET. Otherwise, acts the same as _self. - A comma-delimited string consisting of zero or more of the following options in the form name=value. Except for the left, top, height, and width options, which take arbitrary integers, each option accepts yes or , and no or , as valid values. - - channelmode: Used with the deprecated channels technology of Internet Explorer 4.0. Default is no. - - directories: Whether the window should display directory navigation buttons. Default is yes. - - height: The height of the window's client area, in pixels. The minimum is 100; attempts to open a window smaller than this will cause the window to open according to the Internet Explorer defaults. - - left: The left (x-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. - - location: Whether to display the Address bar, which enables users to navigate the window to a new URL. Default is yes. - - menubar: Whether to display menus on the new window. Default is yes. - - resizable: Whether the window can be resized by the user. Default is yes. - - scrollbars: Whether the window has horizontal and vertical scroll bars. Default is yes. - - status: Whether the window has a status bar at the bottom. Default is yes. - - titlebar: Whether the title of the current page is displayed. Setting this option to no has no effect within a managed application; the title bar will always appear. - - toolbar: Whether toolbar buttons such as **Back**, **Forward**, and **Stop** are visible. Default is yes. - - top: The top (y-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. - + A comma-delimited string consisting of zero or more of the following options in the form name=value. Except for the left, top, height, and width options, which take arbitrary integers, each option accepts yes or , and no or , as valid values. + + channelmode: Used with the deprecated channels technology of Internet Explorer 4.0. Default is no. + + directories: Whether the window should display directory navigation buttons. Default is yes. + + height: The height of the window's client area, in pixels. The minimum is 100; attempts to open a window smaller than this will cause the window to open according to the Internet Explorer defaults. + + left: The left (x-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. + + location: Whether to display the Address bar, which enables users to navigate the window to a new URL. Default is yes. + + menubar: Whether to display menus on the new window. Default is yes. + + resizable: Whether the window can be resized by the user. Default is yes. + + scrollbars: Whether the window has horizontal and vertical scroll bars. Default is yes. + + status: Whether the window has a status bar at the bottom. Default is yes. + + titlebar: Whether the title of the current page is displayed. Setting this option to no has no effect within a managed application; the title bar will always appear. + + toolbar: Whether toolbar buttons such as **Back**, **Forward**, and **Stop** are visible. Default is yes. + + top: The top (y-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. + width: The width of the window's client area, in pixels. The minimum is 100; attempts to open a window smaller than this will cause the window to open according to the Internet Explorer defaults. to replace the current window's URL with in the navigation history. This will effect the operation of methods on the class. Displays a file in the named window. The new window, or the previously created window named by the parameter. - . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: - - `Click to Start Order` - - If you supply any options for the `windowOptions` parameter, any option not included is automatically disabled. In other words, if you only specify by way of `windowOptions` that you want a status bar, then the menu bar, toolbar, title, scroll bars, and so on will not be displayed unless you explicitly enable them by way of `windowOptions`. - - If the file referenced by `url` is an HTML file, text file, or other file type that can be hosted inside of Internet Explorer, it will be displayed in the named window. If the file cannot be displayed inside of Internet Explorer, and the window named by target does not already exist, then the window will open only long enough for Internet Explorer to download the resource; it will close immediately afterwards. - - When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - - If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . - + . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: + + `Click to Start Order` + + If you supply any options for the `windowOptions` parameter, any option not included is automatically disabled. In other words, if you only specify by way of `windowOptions` that you want a status bar, then the menu bar, toolbar, title, scroll bars, and so on will not be displayed unless you explicitly enable them by way of `windowOptions`. + + If the file referenced by `url` is an HTML file, text file, or other file type that can be hosted inside of Internet Explorer, it will be displayed in the named window. If the file cannot be displayed inside of Internet Explorer, and the window named by target does not already exist, then the window will open only long enough for Internet Explorer to download the resource; it will close immediately afterwards. + + When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + + If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . + ]]> @@ -1258,77 +1258,77 @@ The following example displays a The Uniform Resource Locator that describes the location of the file to load. - The name of the window in which to open the resource. This can be a developer-supplied name, or one of the following special values: - - _blank: Opens in a new window. Works the same as a call to . - - _media: Opens in the Media bar. - - _parent: Opens in the window that created the current window. - - _search: Opens in the Search bar. - - _self: Opens in the current window. - + The name of the window in which to open the resource. This can be a developer-supplied name, or one of the following special values: + + _blank: Opens in a new window. Works the same as a call to . + + _media: Opens in the Media bar. + + _parent: Opens in the window that created the current window. + + _search: Opens in the Search bar. + + _self: Opens in the current window. + _top: If called against a window belonging to a FRAME element, opens in the window hosting its FRAMESET. Otherwise, acts the same as _self. - A comma-delimited string consisting of zero or more of the following options in the form name=value. Except for the left, top, height, and width options, which take arbitrary integers, each option accepts yes or , and no or , as valid values. - - channelmode: Used with the deprecated channels technology of Internet Explorer 4.0. Default is no. - - directories: Whether the window should display directory navigation buttons. Default is yes. - - height: The height of the window's client area, in pixels. The minimum is 100; attempts to open a window smaller than this will cause the window to open according to the Internet Explorer defaults. - - left: The left (x-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. - - location: Whether to display the Address bar, which enables users to navigate the window to a new URL. Default is yes. - - menubar: Whether to display menus on the new window. Default is yes. - - resizable: Whether the window can be resized by the user. Default is yes. - - scrollbars: Whether the window has horizontal and vertical scroll bars. Default is yes. - - status: Whether the window has a status bar at the bottom. Default is yes. - - titlebar: Whether the title of the current page is displayed. Setting this option to no has no effect within a managed application; the title bar will always appear. - - toolbar: Whether toolbar buttons such as **Back**, **Forward**, and **Stop** are visible. Default is yes. - - top: The top (y-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. - + A comma-delimited string consisting of zero or more of the following options in the form name=value. Except for the left, top, height, and width options, which take arbitrary integers, each option accepts yes or , and no or , as valid values. + + channelmode: Used with the deprecated channels technology of Internet Explorer 4.0. Default is no. + + directories: Whether the window should display directory navigation buttons. Default is yes. + + height: The height of the window's client area, in pixels. The minimum is 100; attempts to open a window smaller than this will cause the window to open according to the Internet Explorer defaults. + + left: The left (x-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. + + location: Whether to display the Address bar, which enables users to navigate the window to a new URL. Default is yes. + + menubar: Whether to display menus on the new window. Default is yes. + + resizable: Whether the window can be resized by the user. Default is yes. + + scrollbars: Whether the window has horizontal and vertical scroll bars. Default is yes. + + status: Whether the window has a status bar at the bottom. Default is yes. + + titlebar: Whether the title of the current page is displayed. Setting this option to no has no effect within a managed application; the title bar will always appear. + + toolbar: Whether toolbar buttons such as **Back**, **Forward**, and **Stop** are visible. Default is yes. + + top: The top (y-coordinate) position of the window, relative to the upper-left corner of the user's screen, in pixels. Must be a positive integer. + width: The width of the window's client area, in pixels. The minimum is 100; attempts to open a window smaller than this will cause the window to open according to the Internet Explorer defaults. to replace the current window's URL with in the navigation history. This will affect the operation of methods on the class. Displays a file in the named window. An representing the new window, or the previously created window named by the parameter. - . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: - - `Click to Start Order` - - If you supply any options for the `windowOptions` parameter, any option not included is automatically disabled. In other words, if you only specify by way of `windowOptions` that you want a status bar, then the menu bar, toolbar, title, scroll bars, and so on will not be displayed unless you explicitly enable them by way of `windowOptions`. - - If the file referenced by `url` is an HTML file, text file, or other file type that can be hosted inside of Internet Explorer, it will be displayed in the named window. If the file cannot be displayed inside of Internet Explorer, and the window named by target does not already exist, then the window will open only long enough for Internet Explorer to download the resource; it will close immediately afterwards. - - When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - - If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . - -## Examples - The following code example contains two methods: - -- The first opens a URL in a window named `displayWindow`, which it creates with a status bar displayed. -- The second opens another URL in the same window, but specifies that only the location bar should be displayed. - - Notice that the dimensions of the window and the controls that are displayed depends on which URL is opened first. The code example requires that your form contains a control named `WebBrowser1`. - + . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: + + `Click to Start Order` + + If you supply any options for the `windowOptions` parameter, any option not included is automatically disabled. In other words, if you only specify by way of `windowOptions` that you want a status bar, then the menu bar, toolbar, title, scroll bars, and so on will not be displayed unless you explicitly enable them by way of `windowOptions`. + + If the file referenced by `url` is an HTML file, text file, or other file type that can be hosted inside of Internet Explorer, it will be displayed in the named window. If the file cannot be displayed inside of Internet Explorer, and the window named by target does not already exist, then the window will open only long enough for Internet Explorer to download the resource; it will close immediately afterwards. + + When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + + If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . + +## Examples + The following code example contains two methods: + +- The first opens a URL in a window named `displayWindow`, which it creates with a status bar displayed. +- The second opens another URL in the same window, but specifies that only the location bar should be displayed. + + Notice that the dimensions of the window and the controls that are displayed depends on which URL is opened first. The code example requires that your form contains a control named `WebBrowser1`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet13"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet13"::: + ]]> open Method @@ -1409,15 +1409,15 @@ The following example displays a Displays a file in a new window. An representing the new window. - or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - - If you want to load a document into a previously opened window, see the method. - + or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + + If you want to load a document into a previously opened window, see the method. + ]]> @@ -1460,15 +1460,15 @@ The following example displays a Displays a file in a new window. An representing the new window. - or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - - If you want to load a document into a previously opened window, see the method. - + or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + + If you want to load a document into a previously opened window, see the method. + ]]> open Method @@ -1500,11 +1500,11 @@ The following example displays a Gets the window which resides above the current one in a page containing frames. The that owns the current window. If the current window is not a FRAME, or is not embedded inside of a FRAME, it returns . - parent Property @@ -1535,19 +1535,19 @@ The following example displays a Gets the position of the window's client area on the screen. A describing the x -and y-coordinates of the top-left corner of the screen, in pixels. - property of the control will return the position of the control relative to the upper-left corner of the form. By contrast, will return the location of the document's display area relative to the top-left corner of the user's monitor. - - - -## Examples - The following code example opens a new window directly over the control on the form. The code example requires that your form contains an instance of the control named `WebBrowser1`. - + property of the control will return the position of the control relative to the upper-left corner of the form. By contrast, will return the location of the document's display area relative to the top-left corner of the user's monitor. + + + +## Examples + The following code example opens a new window directly over the control on the form. The code example requires that your form contains an instance of the control named `WebBrowser1`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet5"::: + ]]> Windows Forms Coordinates @@ -1593,11 +1593,11 @@ The following example displays a Shows a dialog box that displays a message and a text box to the user. A representing the text entered by the user. - provides a quick, easy way to obtain simple text input from the user. - + provides a quick, easy way to obtain simple text input from the user. + ]]> prompt Method @@ -1628,11 +1628,11 @@ The following example displays a Takes focus off of the current window. - will cause that window to lose focus, but it will not automatically set focus on another window. - + will cause that window to lose focus, but it will not automatically set focus on another window. + ]]> blur Method @@ -1663,16 +1663,16 @@ The following example displays a Occurs when the user uses the mouse to change the dimensions of the window. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet455"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet455"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet455"::: + ]]> onresize Event @@ -1715,14 +1715,14 @@ The following example displays a A describing the desired width and height of the window, in pixels. Must be 100 pixels or more in both dimensions. Changes the size of the window to the specified dimensions. - The window you are trying to resize is in a different domain than its parent window. This restriction is part of cross-frame scripting security. @@ -1759,7 +1759,7 @@ The following example displays a Describes the desired height of the window, in pixels. Must be 100 pixels or more. Changes the size of the window to the specified dimensions. To be added. - The window you are trying to resize is in a different domain than its parent window. This restriction is part of cross-frame scripting security; for more information, see [About Cross-Frame Scripting and Security](https://msdn.microsoft.com/library/ms533028.aspx). + The window you are trying to resize is in a different domain than its parent window. This restriction is part of cross-frame scripting security; for more information, see About Cross-Frame Scripting and Security.
@@ -1787,16 +1787,16 @@ The following example displays a Occurs when the user scrolls through the window to view off-screen text. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet456"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet456"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet456"::: + ]]> onscroll Event @@ -1839,19 +1839,19 @@ The following example displays a The x- and y-coordinates, relative to the top-left corner of the current window, toward which the page should scroll. Moves the window to the specified coordinates. - will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. - - - -## Examples - The following code example scrolls through the document to the coordinate position clicked by the user. - + will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. + + + +## Examples + The following code example scrolls through the document to the coordinate position clicked by the user. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet15"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet15"::: + ]]> scrollTo Method @@ -1887,11 +1887,11 @@ The following example displays a The y-coordinate, relative to the top-left corner of the current window, toward which the page should scroll. Scrolls the window to the designated position. - will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. - + will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. + ]]>
@@ -1962,11 +1962,11 @@ The following example displays a Gets or sets the text displayed in the status bar of a window. A containing the current status text. - control does not display a status bar. Any new window that you open with the or methods, however, will display a status bar by default. - + control does not display a status bar. Any new window that you open with the or methods, however, will display a status bar by default. + ]]> status Property @@ -1997,16 +1997,16 @@ The following example displays a Occurs when the current page is unloading, and a new page is about to be displayed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet457"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet457"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet457"::: + ]]> onunload Event @@ -2038,11 +2038,11 @@ The following example displays a Gets the URL corresponding to the current item displayed in the window. A describing the URL. - method. - + method. + ]]>
@@ -2073,19 +2073,19 @@ The following example displays a Gets the frame element corresponding to this window. An corresponding to this window's FRAME element. If this window is not a frame, it returns . - collection, it returns an . Call on this object if you need to access attributes of the underlying `FRAME` element, such as the `SRC` attribute. - - - -## Examples - The following code example compares the `SRC` attribute of frames in a `FRAMESET` to the current location. If they are different, the frames are reset to their original URLs. - + collection, it returns an . Call on this object if you need to access attributes of the underlying `FRAME` element, such as the `SRC` attribute. + + + +## Examples + The following code example compares the `SRC` attribute of frames in a `FRAMESET` to the current location. If they are different, the frames are reset to their original URLs. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet8"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.HtmlWindow/VB/Form1.vb" id="Snippet8"::: + ]]> frameElement Property diff --git a/xml/System.Windows.Forms/Label.xml b/xml/System.Windows.Forms/Label.xml index da2e24dd40c..0e9d8db69c9 100644 --- a/xml/System.Windows.Forms/Label.xml +++ b/xml/System.Windows.Forms/Label.xml @@ -78,25 +78,25 @@ Represents a standard Windows label. - controls are typically used to provide descriptive text for a control. For example, you can use a to add descriptive text for a control to inform the user about the type of data expected in the control. controls can also be used to add descriptive text to a to provide the user with helpful information. For example, you can add a to the top of a that provides instructions to the user on how to input data in the controls on the form. controls can be also used to display run time information on the status of an application. For example, you can add a control to a form to display the status of each file as a list of files is processed. - - A participates in the tab order of a form, but does not receive focus (the next control in the tab order receives focus). For example, if the property is set to `true`, and a mnemonic character - the first character after an ampersand (&) - is specified in the property of the control, when a user presses ALT+ the mnemonic key, focus moves to the next control in the tab order. This feature provides keyboard navigation for a form. In addition to displaying text, the control can also display an image using the property, or a combination of the and properties. - + controls are typically used to provide descriptive text for a control. For example, you can use a to add descriptive text for a control to inform the user about the type of data expected in the control. controls can also be used to add descriptive text to a to provide the user with helpful information. For example, you can add a to the top of a that provides instructions to the user on how to input data in the controls on the form. controls can be also used to display run time information on the status of an application. For example, you can add a control to a form to display the status of each file as a list of files is processed. + + A participates in the tab order of a form, but does not receive focus (the next control in the tab order receives focus). For example, if the property is set to `true`, and a mnemonic character - the first character after an ampersand (&) - is specified in the property of the control, when a user presses ALT+ the mnemonic key, focus moves to the next control in the tab order. This feature provides keyboard navigation for a form. In addition to displaying text, the control can also display an image using the property, or a combination of the and properties. + > [!NOTE] -> A can be made transparent by setting its property to `Color.Transparent`. When you use a transparent label, use only the current device coordinate system to draw on the container, or the background might paint improperly. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and contains an image. The image is displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - +> A can be made transparent by setting its property to `Color.Transparent`. When you use a transparent label, use only the current device coordinate system to draw on the container, or the background might paint improperly. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and contains an image. The image is displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -125,20 +125,20 @@ Initializes a new instance of the class. - property set to `false` and with its property set to `BorderStyle.None`. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - + property set to `false` and with its property set to `BorderStyle.None`. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -183,14 +183,14 @@ if the additional label text is to be indicated by an ellipsis; otherwise, . The default is . - to `true` to display text that extends beyond the width of the in a tooltip when the user passes over the control with the mouse. If is `true`, the label will grow to fit the text and an ellipsis will not appear. - + to `true` to display text that extends beyond the width of the in a tooltip when the user passes over the control with the mouse. If is `true`, the label will grow to fit the text and an ellipsis will not appear. + > [!IMPORTANT] -> If the font is taller than the height of the and is `true`, you must set to `false` for text to be drawn. - +> If the font is taller than the height of the and is `true`, you must set to `false` for text to be drawn. + ]]> @@ -251,21 +251,21 @@ if the control adjusts its width to closely fit its contents; otherwise, . When added to a form using the designer, the default value is . When instantiated from code, the default value is . - adjusts its width to display its entire contents. This property is typically set to `true` when you use a control to display various lengths of text, such as the status of an application process. You can also use this property when the application will display text in various languages, and the size of the text might increase or decrease based on the language settings in Windows. - + adjusts its width to display its entire contents. This property is typically set to `true` when you use a control to display various lengths of text, such as the status of an application process. You can also use this property when the application will display text in various languages, and the size of the text might increase or decrease based on the language settings in Windows. + > [!IMPORTANT] > If the font is taller than the height of the and is `true`, you must set to `false` for text to be drawn. - -## Examples - The following code example demonstrates the property. To run this example, paste the following code in a form and call the `InitializeLabel` method from the form's constructor or `Load` method. - + +## Examples + The following code example demonstrates the property. To run this example, paste the following code in a form and call the `InitializeLabel` method from the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LabelAutoSize/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/AutoSize/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.LabelAutoSize/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.LabelAutoSize/VB/form1.vb" id="Snippet1"::: + ]]> @@ -310,21 +310,21 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named Label1. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named Label1. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet458"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet458"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet458"::: + ]]> @@ -370,11 +370,11 @@ Gets or sets the image rendered on the background of the control. An that represents the background image of the control. The default is . - @@ -415,11 +415,11 @@ Occurs when the property changes. - @@ -459,11 +459,11 @@ This property is not relevant for this class. An object. -
@@ -503,11 +503,11 @@ Occurs when the property changes. - @@ -548,20 +548,20 @@ Gets or sets the border style for the control. One of the values. The default is . - that labels another control from a that displays the status of a process in an application. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - + that labels another control from a that displays the status of a process in an application. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> The value assigned is not one of the values. @@ -608,11 +608,11 @@ Determines the size and location of an image drawn within the control based on the alignment of the control. A that represents the size and location of the specified image within the control. - , to determine the size and location of an image to draw within the control based on its location within the control. The location of the image is based on the value of the control's property. - + , to determine the size and location of an image to draw within the control based on its location within the control. The location of the image is based on the value of the control's property. + ]]> @@ -807,20 +807,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method.
@@ -906,14 +906,14 @@ Gets or sets the flat style appearance of the label control. One of the values. The default value is . - property is set to `FlatStyle.System`, any values assigned to the , , , and properties are ignored. In addition, the property ignores any property values that are not vertical property settings. Horizontally aligned settings of the property are aligned to the top of the control. For example, if you set the property to `ContentAlignment.TopCenter`, `ContentAlignment.MiddleCenter`, or `ContentAlignment.BottomCenter`, when the property is set to `FlatStyle.System`, the text in the control will be aligned to the top and center locations within the bounds of the control. - + property is set to `FlatStyle.System`, any values assigned to the , , , and properties are ignored. In addition, the property ignores any property values that are not vertical property settings. Horizontally aligned settings of the property are aligned to the top of the control. For example, if you set the property to `ContentAlignment.TopCenter`, `ContentAlignment.MiddleCenter`, or `ContentAlignment.BottomCenter`, when the property is set to `FlatStyle.System`, the text in the control will be aligned to the top and center locations within the bounds of the control. + > [!NOTE] -> In the .NET Framework version 1.1, setting the property to `FlatStyle.System` does not cause the value of the property to be ignored. In addition, the property has no effect in the derived class, . - +> In the .NET Framework version 1.1, setting the property to `FlatStyle.System` does not cause the value of the property to be ignored. In addition, the property has no effect in the derived class, . + ]]> The value assigned is not one of the values. @@ -983,20 +983,20 @@ Gets or sets the image that is displayed on a . An displayed on the . The default is . - property cannot be used at the same time as the and properties. When the property is used to display an image, the and properties are automatically set to their default settings. - - - -## Examples - The following code example demonstrates how to create a and then to display an behind the . First, the example creates a and then creates an based on a disk file. Next, the property is initialized to contain the . Finally, the property is initialized to the . - + property cannot be used at the same time as the and properties. When the property is used to display an image, the and properties are automatically set to their default settings. + + + +## Examples + The following code example demonstrates how to create a and then to display an behind the . First, the example creates a and then creates an based on a disk file. Next, the property is initialized to contain the . Finally, the property is initialized to the . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Label_Image/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Image/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Label_Image/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Label_Image/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1041,20 +1041,20 @@ Gets or sets the alignment of an image that is displayed in the control. One of the values. The default is . - control to ensure that the image is properly displayed. You can add an image to a using the property or the and properties. Images displayed in the control cannot be stretched or shrunk to fill the control if the control is larger or smaller than the image. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - + control to ensure that the image is properly displayed. You can add an image to a using the property or the and properties. Images displayed in the control cannot be stretched or shrunk to fill the control if the control is larger or smaller than the image. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> The value assigned is not one of the values. @@ -1120,24 +1120,24 @@ Gets or sets the index value of the image displayed on the . A zero-based index that represents the position in the control (assigned to the property) where the image is located. The default is -1. - and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is automatically set to `null`. - + and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is automatically set to `null`. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1199,14 +1199,14 @@ For example, consider a button control whose Gets or sets the key accessor for the image in the . A string representing the key of the image. - property specifies the image from the image list to display on the . - + property specifies the image from the image list to display on the . + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + ]]>
@@ -1248,23 +1248,23 @@ If you set the property, the Gets or sets the that contains the images to display in the control. An that stores the collection of objects. The default value is . - and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is set to `null`. - + and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is set to `null`. + > [!NOTE] -> The will not be garbage collected if its is still referenced elsewhere. Set the property of the to `null` to enable efficient garbage collection. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - +> The will not be garbage collected if its is still referenced elsewhere. Set the property of the to `null` to enable efficient garbage collection. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1309,11 +1309,11 @@ If you set the property, the Gets or sets the Input Method Editor (IME) mode supported by this control. One of the values. - The value assigned to this property is not within the range of valid values specified in the enumeration. @@ -1357,11 +1357,11 @@ If you set the property, the Occurs when the property changes. -
@@ -1402,11 +1402,11 @@ If you set the property, the Occurs when the user presses a key while the label has focus. -
@@ -1447,11 +1447,11 @@ If you set the property, the Occurs when the user presses a key while the label has focus. -
@@ -1492,11 +1492,11 @@ If you set the property, the Occurs when the user releases a key while the label has focus. -
@@ -1677,13 +1677,13 @@ If you set the property, the An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1907,13 +1907,13 @@ If you set the property, the An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1956,11 +1956,11 @@ If you set the property, the An that contains the event data. Raises the event. - @@ -2084,23 +2084,23 @@ If you set the property, the Gets the preferred height of the control. The height of the control (in pixels), assuming a single line of text is displayed. - property to ensure that the text in the control is displayed properly. You can use the property to automatically adjust the height and the width of the control, based on the text and font size. - + property to ensure that the text in the control is displayed properly. You can use the property to automatically adjust the height and the width of the control, based on the text and font size. + > [!NOTE] -> If the property of the control is set to `BorderStyle.None`, the value returned by property will be larger due to the lack of borders. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - +> If the property of the control is set to `BorderStyle.None`, the value returned by property will be larger due to the lack of borders. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -2147,23 +2147,23 @@ If you set the property, the Gets the preferred width of the control. The width of the control (in pixels), assuming a single line of text is displayed. - that is only 100 pixels wide. The property still returns 300 pixels. You can use this property, along with the property, to ensure that the text in the control is displayed properly. You can use the property to automatically adjust the height and the width of the control based on the text and font size. - + that is only 100 pixels wide. The property still returns 300 pixels. You can use this property, along with the property, to ensure that the text in the control is displayed properly. You can use the property to automatically adjust the height and the width of the control based on the text and font size. + > [!NOTE] -> If the property of the control is set to `BorderStyle.None`, the value returned by property will be larger due to the lack of borders. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - +> If the property of the control is set to `BorderStyle.None`, the value returned by property will be larger due to the lack of borders. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -2244,11 +2244,11 @@ If you set the property, the if the background of the control's container is rendered on the ; otherwise, . The default is . -
@@ -2316,11 +2316,11 @@ If you set the property, the A bitwise combination of the values. For any parameter not specified, the current value will be used. Sets the specified bounds of the label. - property to `true`, the label will be sized to fit the contents of the label. If you set to `false` after calling the method, the label will receive the dimensions you specified in the call. - + property to `true`, the label will be sized to fit the contents of the label. If you set to `false` after calling the method, the label will receive the dimensions you specified in the call. + ]]> @@ -2365,11 +2365,11 @@ If you set the property, the Gets or sets a value indicating whether the user can tab to the . This property is not used by this class. This property is not used by this class. The default is . - property is not relevant for the class, so setting to `true` has no effect. - + property is not relevant for the class, so setting to `true` has no effect. + ]]> @@ -2411,11 +2411,11 @@ If you set the property, the Occurs when the property changes. - @@ -2509,11 +2509,11 @@ If you set the property, the Gets or sets the alignment of text in the label. One of the values. The default is . - property to one of the right-aligned horizontal alignments (, , ) and the text will be aligned with the right edge of the labels to align with your controls. - + property to one of the right-aligned horizontal alignments (, , ) and the text will be aligned with the right edge of the labels to align with your controls. + ]]> The value assigned is not one of the values. @@ -2546,21 +2546,21 @@ If you set the property, the Occurs when the value of the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named Label1. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named Label1. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet459"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet459"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet459"::: + ]]> @@ -2634,13 +2634,13 @@ If you set the property, the if the class should be used to perform text rendering for compatibility with versions 1.0 and 1.1. of the .NET Framework; otherwise, . The default is . - class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. - - The GDI based class was introduced in the .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of the .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. - + class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, if your application is not being upgraded from .NET Framework 1.0 or .NET Framework 1.1, it is recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. + + The GDI based class was introduced in the .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of the .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. + ]]> @@ -2680,20 +2680,20 @@ If you set the property, the if the label doesn't display the ampersand character and underlines the character after the ampersand in its displayed text and treats the underlined character as an access key; otherwise, if the ampersand character is displayed in the text of the control. The default is . - property is set to `true` and a mnemonic character (a character preceded by the ampersand) is defined in the property of the , pressing ALT+ the mnemonic character sets the focus to the control that follows the in the tab order. You can use this property to provide proper keyboard navigation to the controls on your form. - - - -## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. - + property is set to `true` and a mnemonic character (a character preceded by the ampersand) is defined in the property of the , pressing ALT+ the mnemonic character sets the focus to the control that follows the in the tab order. You can use this property to provide proper keyboard navigation to the controls on your form. + + + +## Examples + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic Label Example/VB/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/MonthCalendar.xml b/xml/System.Windows.Forms/MonthCalendar.xml index 7843bb06c54..83b1a68090e 100644 --- a/xml/System.Windows.Forms/MonthCalendar.xml +++ b/xml/System.Windows.Forms/MonthCalendar.xml @@ -65,31 +65,31 @@ Represents a Windows control that enables the user to select a date using a visual monthly calendar display. - and properties. - - You can change the look of the calendar portion of the control by setting the , , , , , and properties. - + and properties. + + You can change the look of the calendar portion of the control by setting the , , , , , and properties. + > [!NOTE] -> The `MonthCalendar` control only supports Gregorian calendars. - - The `MonthCalendar` control is drawn by the operating system, so the event is never raised. If you need to provide a customized look to the control, you should override the method, call the base implementation of , and then perform custom painting. - - If you need custom date formatting and a selection limited to just one date, you might consider using a control instead of a . Using the eliminates much of the need for validating date/time values. - - For more information on month calendar controls, see [Month Calendar Control Reference](https://go.microsoft.com/fwlink/?LinkId=178863). - - - -## Examples - The following code example displays a form containing a `MonthCalendar` control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - +> The `MonthCalendar` control only supports Gregorian calendars. + + The `MonthCalendar` control is drawn by the operating system, so the event is never raised. If you need to provide a customized look to the control, you should override the method, call the base implementation of , and then perform custom painting. + + If you need custom date formatting and a selection limited to just one date, you might consider using a control instead of a . Using the eliminates much of the need for validating date/time values. + + For more information on month calendar controls, see [Month Calendar Control Reference](https://go.microsoft.com/fwlink/?LinkId=178863). + + + +## Examples + The following code example displays a form containing a `MonthCalendar` control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -121,27 +121,27 @@ Initializes a new instance of the class. - constructor creates a new . - - The following table shows initial property values for an instance of the class. - -|Item|Description| -|----------|-----------------| -||Today's date.| -||Today's date.| - - - -## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + constructor creates a new . + + The following table shows initial property values for an instance of the class. + +|Item|Description| +|----------|-----------------| +||Today's date.| +||Today's date.| + + + +## Examples + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -175,13 +175,13 @@ The date to be displayed in bold. Adds a day that is displayed in bold on an annual basis in the month calendar. - method afterward to update the display. - - To add multiple dates in a single assignment, you can assign an array of objects to the property. - + method afterward to update the display. + + To add multiple dates in a single assignment, you can assign an array of objects to the property. + ]]> @@ -217,22 +217,22 @@ The date to be displayed in bold. Adds a day to be displayed in bold in the month calendar. - method afterward to update the display. - - To add multiple dates in a single assignment, you can assign an array of objects to the property. - - - -## Examples - The following code example uses the and methods to mark and display in a bold font dates read from a file. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. - + method afterward to update the display. + + To add multiple dates in a single assignment, you can assign an array of objects to the property. + + + +## Examples + The following code example uses the and methods to mark and display in a bold font dates read from a file. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MonthCalendar/CPP/mc.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/AddBoldedDate/mc.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/MonthCalendar/VB/mc.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/MonthCalendar/VB/mc.vb" id="Snippet2"::: + ]]> @@ -268,13 +268,13 @@ The date to be displayed in bold. Adds a day that is displayed in bold on a monthly basis in the month calendar. - method afterward to update the display. - - To add multiple dates in a single assignment, you can assign an array of objects to the property. - + method afterward to update the display. + + To add multiple dates in a single assignment, you can assign an array of objects to the property. + ]]> @@ -313,20 +313,20 @@ Gets or sets the array of objects that determines which annual days are displayed in bold. An array of objects. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -359,24 +359,24 @@ Gets or sets the background color for the control. A that represents the background color of the control. The default is the value of the property. - property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. - - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. - - Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. - - - -## Examples - The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. - + property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. + + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + + Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. + + + +## Examples + The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Windows.Forms.Control Properties/VB/controlproperties.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Windows.Forms.Control Properties/VB/controlproperties.vb" id="Snippet1"::: + ]]> @@ -435,11 +435,11 @@ Gets or sets the background image for the . The that is the background image for the control. - @@ -529,11 +529,11 @@ Gets or sets a value indicating the layout for the . One of the values. - @@ -619,20 +619,20 @@ Gets or sets the array of objects that determines which nonrecurring dates are displayed in bold. The array of bold dates. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -673,20 +673,20 @@ Gets or sets the number of columns and rows of months displayed. A with the number of columns and rows to use to display the calendar. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -741,11 +741,11 @@ Occurs when the user clicks the control. - control sets the bit flag to `false`, so the will not raise the event. - + control sets the bit flag to `false`, so the will not raise the event. + ]]> @@ -775,10 +775,10 @@ Creates a new accessibility object for the current instance. A new accessibility object for the control. - instance returned by this method provides correct values for the , , and properties. The new value for the property is , the new value for the property is the current selection, and the new default value for the property is the type name. +The instance returned by this method provides correct values for the , , and properties. The new value for the property is , the new value for the property is the current selection, and the new default value for the property is the type name. The is only available in applications that are recompiled to target the .NET Framework 4.7.1 or that opt in to the .NET Framework accessibility features added in the .NET Framework 4.7.1 by using a compatibility switch. For more information, see the Windows Forms section in [Retargeting Changes for Migration from .NET Framework 4.7 to 4.7.1](/dotnet/framework/migration-guide/retargeting/4.7-4.7.1#windows-forms). ]]> @@ -839,11 +839,11 @@ The is only available in applicatio Gets a for creating a control. A with the information for creating a control. - property is called when a window is created. Inheriting classes can override this property to add extra functionality, but you should first call `base.getCreateParams()` to make sure the control continues to work correctly. - + property is called when a window is created. Inheriting classes can override this property to add extra functionality, but you should first call `base.getCreateParams()` to make sure the control continues to work correctly. + ]]> @@ -889,28 +889,28 @@ The is only available in applicatio Occurs when the date selected in the changes. - event occurs during any date selection, whether by mouse, keyboard, or code. The event is similar, but it occurs only at the end of a date selection made using the mouse. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example creates a , sets its and properties, and assigns the to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example requires that you have a with two controls, a , and a control. - + event occurs during any date selection, whether by mouse, keyboard, or code. The event is similar, but it occurs only at the end of a date selection made using the mouse. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example creates a , sets its and properties, and assigns the to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example requires that you have a with two controls, a , and a control. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/CPP/selectionrangeobj.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/DateChanged/selectionrangeobj.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/VB/selectionrangeobj.vb" id="Snippet1"::: - - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/VB/selectionrangeobj.vb" id="Snippet1"::: + + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -956,22 +956,22 @@ The is only available in applicatio Occurs when the user makes an explicit date selection using the mouse. - event, but it occurs at the end of a date selection made using the mouse. The event occurs during any date selection, whether by mouse, keyboard, or code. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + event, but it occurs at the end of a date selection made using the mouse. The event occurs during any date selection, whether by mouse, keyboard, or code. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -1064,11 +1064,11 @@ The is only available in applicatio Gets the default size of the calendar. A specifying the height and width, in pixels, of the control. - property includes the area necessary to display the "Today:" date at the bottom of the calendar. - + property includes the area necessary to display the "Today:" date at the bottom of the calendar. + ]]> @@ -1131,20 +1131,20 @@ The is only available in applicatio to release both managed and unmanaged resources; to release only unmanaged resources. Releases all resources used by the . - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources. @@ -1180,11 +1180,11 @@ The is only available in applicatio if the control should use a secondary buffer to redraw; otherwise, . The default is . - property has no effect on the appearance of the control. - + property has no effect on the appearance of the control. + ]]> @@ -1237,11 +1237,11 @@ The is only available in applicatio Occurs when the user double-clicks the control. - control sets the bit flag to `false`, so the will not raise the event. - + control sets the bit flag to `false`, so the will not raise the event. + ]]> @@ -1286,15 +1286,15 @@ The is only available in applicatio Gets or sets the first day of the week as displayed in the month calendar. One of the values. The default is . - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> The assigned value is not one of the enumeration members. @@ -1327,22 +1327,22 @@ The is only available in applicatio Gets or sets the foreground color of the control. The foreground of the control. The default is the value of the property. - property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. - - Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. - - - -## Examples - The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. - + property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + + Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. + + + +## Examples + The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Windows.Forms.Control Properties/VB/controlproperties.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Windows.Forms.Control Properties/VB/controlproperties.vb" id="Snippet1"::: + ]]> @@ -1384,11 +1384,11 @@ The is only available in applicatio Retrieves date information that represents the low and high limits of the displayed dates of the control. The begin and end dates of the displayed calendar. - method returns a that contains the begin and end dates displayed in the current view of the control. You can modify the returned range based on the value you specify for the `visible` parameter. By specifying `false`, you can retrieve all dates displayed on the control; specifying `true` retrieves only those dates that are part of fully displayed months. - + method returns a that contains the begin and end dates displayed in the current view of the control. You can modify the returned range based on the value you specify for the `visible` parameter. By specifying `false`, you can retrieve all dates displayed on the control; specifying `true` retrieves only those dates that are part of fully displayed months. + ]]> @@ -1509,11 +1509,11 @@ The is only available in applicatio Gets or sets the Input Method Editor (IME) mode supported by this control. One of the values. - @@ -1628,15 +1628,15 @@ The is only available in applicatio Gets or sets the maximum allowable date. A representing the maximum allowable date. The default is 12/31/9998. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> The value is less than the . @@ -1679,28 +1679,28 @@ The is only available in applicatio Gets or sets the maximum number of days that can be selected in a month calendar control. The maximum number of days that you can select. The default is 7. - property represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), and can be no more than six days apart. - - - -## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + property represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), and can be no more than six days apart. + + + +## Examples + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> - The value is less than 1. - - -or- - + The value is less than 1. + + -or- + The cannot be set. @@ -1730,21 +1730,21 @@ The is only available in applicatio Gets or sets the minimum allowable date. A representing the minimum allowable date. The default is 01/01/1753. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> - The date set is greater than the . - - -or- - + The date set is greater than the . + + -or- + The date set is earlier than 01/01/1753. @@ -1780,20 +1780,20 @@ The is only available in applicatio Gets or sets the array of objects that determine which monthly days to bold. An array of objects. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -1957,13 +1957,13 @@ The is only available in applicatio A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2001,13 +2001,13 @@ The is only available in applicatio A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2045,15 +2045,15 @@ The is only available in applicatio An that contains the event data. Raises the event. - method resizes the control based on the new font size. This can cause the calendar to overlap other controls on the form if the potential sizing issues have not been taken into account. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method resizes the control based on the new font size. This can cause the calendar to overlap other controls on the form if the potential sizing issues have not been taken into account. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2182,13 +2182,13 @@ The is only available in applicatio An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2258,13 +2258,13 @@ The is only available in applicatio An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2312,11 +2312,11 @@ The is only available in applicatio in all cases. - property will have no effect on the appearance of the . - + property will have no effect on the appearance of the . + ]]> @@ -2368,13 +2368,13 @@ The is only available in applicatio Occurs when the value of the property changes. - @@ -2427,11 +2427,11 @@ The is only available in applicatio Occurs when the control is redrawn. - control sets the bit flag to `false`, so the will not raise the event. To provide a custom look to the control, you should override the method, call the base implementation of , and then perform custom painting. - + control sets the bit flag to `false`, so the will not raise the event. To provide a custom look to the control, you should override the method, call the base implementation of , and then perform custom painting. + ]]> @@ -2462,13 +2462,13 @@ The is only available in applicatio Removes all the annually bold dates. - array. To remove a single date from the bold dates, use the method. - - You must call the method to ensure that the display is updated to reflect the removal. - + array. To remove a single date from the bold dates, use the method. + + You must call the method to ensure that the display is updated to reflect the removal. + ]]> @@ -2499,22 +2499,22 @@ The is only available in applicatio Removes all the nonrecurring bold dates. - array. To remove a single date from the bold dates, use the method. - - You must call the method to ensure that the display is updated to reflect the removal. - - - -## Examples - The following code example demonstrates how to use the method. - + array. To remove a single date from the bold dates, use the method. + + You must call the method to ensure that the display is updated to reflect the removal. + + + +## Examples + The following code example demonstrates how to use the method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MonthCalendar/CPP/mc.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/AddBoldedDate/mc.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/MonthCalendar/VB/mc.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/MonthCalendar/VB/mc.vb" id="Snippet4"::: + ]]> @@ -2545,13 +2545,13 @@ The is only available in applicatio Removes all the monthly bold dates. - array. To remove a single date from the bold dates, use the method. - - You must call the method to ensure that the display is updated to reflect the removal. - + array. To remove a single date from the bold dates, use the method. + + You must call the method to ensure that the display is updated to reflect the removal. + ]]> @@ -2585,11 +2585,11 @@ The is only available in applicatio The date to remove from the date list. Removes the specified date from the list of annually bold dates. - method to ensure that the display is updated to reflect the removal. - + method to ensure that the display is updated to reflect the removal. + ]]> @@ -2624,20 +2624,20 @@ The is only available in applicatio The date to remove from the date list. Removes the specified date from the list of nonrecurring bold dates. - method to ensure that the display is updated to reflect the removal. - - - -## Examples - The following code example uses the method to remove a specified date from the list of bold dates. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. - + method to ensure that the display is updated to reflect the removal. + + + +## Examples + The following code example uses the method to remove a specified date from the list of bold dates. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MonthCalendar/CPP/mc.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/AddBoldedDate/mc.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/MonthCalendar/VB/mc.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/MonthCalendar/VB/mc.vb" id="Snippet3"::: + ]]> @@ -2672,11 +2672,11 @@ The is only available in applicatio The date to remove from the date list. Removes the specified date from the list of monthly bolded dates. - to ensure that the display is updated to reflect the removal. - + to ensure that the display is updated to reflect the removal. + ]]> @@ -2753,13 +2753,13 @@ The is only available in applicatio if the control is laid out from right to left; otherwise, . The default is . - property is useful for international applications where the language is written from right to left. When the and properties are both `true`, - - Mirroring will be turned on for the form, and control placement and text will be from right to left. - + property is useful for international applications where the language is written from right to left. When the and properties are both `true`, + + Mirroring will be turned on for the form, and control placement and text will be from right to left. + ]]> @@ -2803,21 +2803,21 @@ The is only available in applicatio Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `MonthCalendar1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `MonthCalendar1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet504"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet504"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet504"::: + ]]> @@ -2858,26 +2858,26 @@ The is only available in applicatio Gets or sets the scroll rate for a month calendar control. A positive number representing the current scroll rate in number of months moved. The default is the number of months currently displayed. The maximum is 20,000. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> - The value is less than 0. - - -or- - + The value is less than 0. + + -or- + The value is greater than 20,000. @@ -2921,34 +2921,34 @@ The is only available in applicatio Gets or sets the end date of the selected range of dates. A indicating the last date in the selection range. - property to a date that is earlier than the current value of the property, is automatically set equal to . - - If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . - + property to a date that is earlier than the current value of the property, is automatically set equal to . + + If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . + > [!NOTE] -> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. - +> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. + > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. - - - -## Examples - The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. - +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. + + + +## Examples + The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/SelectionEnd/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/VB/form1.vb" id="Snippet1"::: + ]]> - The date value is less than the value. - - -or- - + The date value is less than the value. + + -or- + The date value is greater than the value. @@ -2987,33 +2987,33 @@ The is only available in applicatio Gets or sets the selected range of dates for a month calendar control. A with the start and end dates of the selected range. - method. You can set the start and end dates separately by setting either the or properties. You cannot change the start and end dates by setting the or property values of the property. You should use , , or . - - If the property value of the is greater than its property value, the dates are swapped; the property value becomes the starting date, and property value becomes the end date. - + method. You can set the start and end dates separately by setting either the or properties. You cannot change the start and end dates by setting the or property values of the property. You should use , , or . + + If the property value of the is greater than its property value, the dates are swapped; the property value becomes the starting date, and property value becomes the end date. + > [!NOTE] -> Scrolling through the calendar display with the navigation buttons when a range is selected can cause unexpected results (for example, the date range is not preserved). If you have a single month displayed with a range of 04/01/2001 to 04/10/2001, scrolling the calendar to March changes the selected range as follows: 03/01/2001 to 03/10/2001. If you have multiple months displayed, such as March and April with a selected range of 04/01/2001 to 04/10/2001, scrolling the calendar back to January and February changes the selected range as follows: 01/01/2001 to 01/10/2001. - +> Scrolling through the calendar display with the navigation buttons when a range is selected can cause unexpected results (for example, the date range is not preserved). If you have a single month displayed with a range of 04/01/2001 to 04/10/2001, scrolling the calendar to March changes the selected range as follows: 03/01/2001 to 03/10/2001. If you have multiple months displayed, such as March and April with a selected range of 04/01/2001 to 04/10/2001, scrolling the calendar back to January and February changes the selected range as follows: 01/01/2001 to 01/10/2001. + > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. - +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. + ]]> - The value of the assigned is less than the minimum date allowable for a month calendar control. - - -or- - - The value of the assigned is greater than the maximum allowable date for a month calendar control. - - -or- - - The value of the assigned is less than the minimum date allowable for a month calendar control. - - -or- - + The value of the assigned is less than the minimum date allowable for a month calendar control. + + -or- + + The value of the assigned is greater than the maximum allowable date for a month calendar control. + + -or- + + The value of the assigned is less than the minimum date allowable for a month calendar control. + + -or- + The value of the assigned is greater than the maximum allowable date for a month calendar control. @@ -3061,34 +3061,34 @@ The is only available in applicatio Gets or sets the start date of the selected range of dates. A indicating the first date in the selection range. - property to a date that is later than the current value of the property, is automatically set equal to . - - If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . - + property to a date that is later than the current value of the property, is automatically set equal to . + + If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . + > [!NOTE] -> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. - +> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. + > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. - - - -## Examples - The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. - +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. + + + +## Examples + The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/SelectionEnd/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/VB/form1.vb" id="Snippet1"::: + ]]> - The date value is less than . - - -or- - + The date value is less than . + + -or- + The date value is greater than . @@ -3165,11 +3165,11 @@ The is only available in applicatio The number of rows. Sets the number of columns and rows of months to display. - @@ -3206,19 +3206,19 @@ The is only available in applicatio The date to be selected. Sets a date as the currently selected date. - and the properties to the specified date. This method is the functional equivalent of setting the selection range to a single day through the method or the property. - + and the properties to the specified date. This method is the functional equivalent of setting the selection range to a single day through the method or the property. + ]]> - The value is less than the minimum allowable date. - - -or- - - The value is greater than the maximum allowable date. - + The value is less than the minimum allowable date. + + -or- + + The value is greater than the maximum allowable date. + This exception will only be thrown if or have been set explicitly. @@ -3253,36 +3253,36 @@ The is only available in applicatio The end date of the selection range. Sets the selected dates in a month calendar control to the specified date range. - property. You can set the start and end dates separately by setting either the or property. - - If you set the `date1` parameter greater than the `date2` parameter, both dates are set to the `date1` value. - + property. You can set the start and end dates separately by setting either the or property. + + If you set the `date1` parameter greater than the `date2` parameter, both dates are set to the `date1` value. + > [!NOTE] -> Scrolling through the calendar display with the navigation buttons when a range is selected can cause unexpected results (for example, the date range is not preserved). If you have a single month displayed with a range of 04/01/2001 to 04/10/2001, scrolling the calendar back changes the selected range as follows: 03/01/2001 to 03/10/2001. If you have multiple months displayed, such as March and April with a selected range of 04/01/2001 to 04/10/2001, scrolling the calendar back to January and February changes the selected range as follows: 01/01/2001 to 01/10/2001. - +> Scrolling through the calendar display with the navigation buttons when a range is selected can cause unexpected results (for example, the date range is not preserved). If you have a single month displayed with a range of 04/01/2001 to 04/10/2001, scrolling the calendar back changes the selected range as follows: 03/01/2001 to 03/10/2001. If you have multiple months displayed, such as March and April with a selected range of 04/01/2001 to 04/10/2001, scrolling the calendar back to January and February changes the selected range as follows: 01/01/2001 to 01/10/2001. + > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. - +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. + ]]> - is less than the minimum date allowable for a month calendar control. - - -or- - - is greater than the maximum allowable date for a month calendar control. - - -or- - - is less than the minimum date allowable for a month calendar control. - - -or- - - is greater than the maximum allowable date for a month calendar control. - + is less than the minimum date allowable for a month calendar control. + + -or- + + is greater than the maximum allowable date for a month calendar control. + + -or- + + is less than the minimum date allowable for a month calendar control. + + -or- + + is greater than the maximum allowable date for a month calendar control. + This exception will only be thrown if or have been set explicitly. @@ -3326,20 +3326,20 @@ The is only available in applicatio if today's date is displayed; otherwise, . The default is . - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -3382,20 +3382,20 @@ The is only available in applicatio if today's date is identified with a circle or a square; otherwise, . The default is . - is `true`, and visual styles are enabled and supported on the computer running the application, today's date will be enclosed in a square, otherwise today's date will be circled. - - - -## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + is `true`, and visual styles are enabled and supported on the computer running the application, today's date will be enclosed in a square, otherwise today's date will be circled. + + + +## Examples + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -3442,15 +3442,15 @@ The is only available in applicatio if the week numbers are displayed; otherwise, . The default is . - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> @@ -3491,11 +3491,11 @@ The is only available in applicatio Gets the minimum size to display one month of the calendar. The size, in pixels, necessary to fully display one month in the calendar. - and members, representing the minimum width and height required to display one month in the control. The minimum required window size for a month calendar control depends on the currently selected font. - + and members, representing the minimum width and height required to display one month in the control. The minimum required window size for a month calendar control depends on the currently selected font. + ]]> The dimensions cannot be retrieved. @@ -3585,11 +3585,11 @@ The is only available in applicatio . - @@ -3676,22 +3676,22 @@ The is only available in applicatio Gets or sets a value indicating the background color of the title area of the calendar. A . The default is the system color for active captions. - property. Setting the equal to the for the main display area of the calendar causes the days-of-the-week text to become unreadable. - - Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. - - - -## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + property. Setting the equal to the for the main display area of the calendar causes the days-of-the-week text to become unreadable. + + Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. + + + +## Examples + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> The value is not a valid . @@ -3729,20 +3729,20 @@ The is only available in applicatio Gets or sets a value indicating the foreground color of the title area of the calendar. A . The default is the system color for active caption text. - control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> The value is not a valid . @@ -3774,26 +3774,26 @@ The is only available in applicatio Gets or sets the value that is used by as today's date. A representing today's date. The default value is the current system date. - property returns the current system date, and the property is `false`. Setting the property sets the property to `true` and, from that point, the value returned by the property is the one the user sets. - - - -## Examples - The following code example demonstrates how to use the , and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. - + property returns the current system date, and the property is `false`. Setting the property sets the property to `true` and, from that point, the value returned by the property is the one the user sets. + + + +## Examples + The following code example demonstrates how to use the , and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/SelectionEnd/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/VB/form1.vb" id="Snippet1"::: + ]]> - The value is less than the minimum allowable date. - - -or- - + The value is less than the minimum allowable date. + + -or- + The value is greater than the maximum allowable date. @@ -3870,11 +3870,11 @@ The is only available in applicatio Returns a string that represents the control. A string that represents the current . - method of the property. - + method of the property. + ]]> @@ -3911,22 +3911,22 @@ The is only available in applicatio Gets or sets a value indicating the color of days in months that are not fully displayed in the control. A . The default is . - property, you can modify the color of the text for those dates. - - Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. - - - -## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. - + property, you can modify the color of the text for those dates. + + Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. + + + +## Examples + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/VB/monthcalendar.vb" id="Snippet1"::: + ]]> The value is not a valid . @@ -3958,11 +3958,11 @@ The is only available in applicatio Repaints the bold dates to reflect the dates set in the lists of bold dates. - method to reflect changes made to , , or properties, either directly by modifying elements of the array or by using the add or remove methods provided to modify the date lists. - + method to reflect changes made to , , or properties, either directly by modifying elements of the array or by using the add or remove methods provided to modify the date lists. + ]]> diff --git a/xml/System.Windows.Forms/PaintEventArgs.xml b/xml/System.Windows.Forms/PaintEventArgs.xml index d0d7513a655..96caf8c6e64 100644 --- a/xml/System.Windows.Forms/PaintEventArgs.xml +++ b/xml/System.Windows.Forms/PaintEventArgs.xml @@ -45,26 +45,26 @@ Provides data for the event. - event occurs when a control is redrawn. A specifies the to use to paint the control and the in which to paint. - - For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates handling the event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. - + event occurs when a control is redrawn. A specifies the to use to paint the control and the in which to paint. + + For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates handling the event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Demontrates Form Paint Event/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PaintEventArgs/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Demontrates Form Paint Event/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Demontrates Form Paint Event/VB/form1.vb" id="Snippet1"::: + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.Paint/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnPaint/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Control.Paint/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Control.Paint/VB/form1.vb" id="Snippet1"::: + ]]> @@ -99,20 +99,20 @@ The that represents the rectangle in which to paint. Initializes a new instance of the class with the specified graphics and clipping rectangle. - identified by the `graphics` parameter is disposed when the is disposed. - - - -## Examples - The following code examples draws lines and text on a control. - + identified by the `graphics` parameter is disposed when the is disposed. + + + +## Examples + The following code examples draws lines and text on a control. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.Paint/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnPaint/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Control.Paint/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Control.Paint/VB/form1.vb" id="Snippet1"::: + ]]> @@ -151,16 +151,16 @@ Gets the rectangle in which to paint. The in which to paint. - event. This report helps you to learn when the event occurs and can assist you in debugging. - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet42"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet42"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet42"::: + ]]> @@ -204,14 +204,14 @@ Releases all resources used by the . - when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + ]]> Cleaning Up Unmanaged Resources @@ -247,20 +247,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. Implementing a Dispose method Cleaning Up Unmanaged Resources @@ -320,19 +320,19 @@ Gets the graphics used to paint. The object used to paint. The object provides methods for drawing objects on the display device. - event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. - + event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Demontrates Form Paint Event/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PaintEventArgs/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Demontrates Form Paint Event/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Demontrates Form Paint Event/VB/form1.vb" id="Snippet1"::: + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.Paint/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnPaint/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Control.Paint/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Control.Paint/VB/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/PictureBox.xml b/xml/System.Windows.Forms/PictureBox.xml index 24696828d43..7d2025746b9 100644 --- a/xml/System.Windows.Forms/PictureBox.xml +++ b/xml/System.Windows.Forms/PictureBox.xml @@ -529,9 +529,9 @@ - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. diff --git a/xml/System.Windows.Forms/StatusBar.xml b/xml/System.Windows.Forms/StatusBar.xml index 18c58a5b7ee..e66023adf27 100644 --- a/xml/System.Windows.Forms/StatusBar.xml +++ b/xml/System.Windows.Forms/StatusBar.xml @@ -47,32 +47,32 @@ Represents a Windows status bar control. - + This class is not available in .NET 5 and later versions. Use the control instead, which replaces and extends the control. - control instead. - Typically, a control consists of objects, each of which displays text and/or an icon. You can also provide owner-drawn panels to provide custom panels such as a progress bar or a series of images that displays the state of your application. A control typically displays information about an object being viewed on a , the object's components, or contextual information that relates to that object's operation within your application. - - The control provides properties that enable you to customize the appearance of the control. If the is displayed on a form that can be resized, you can use the property to display a sizing grip in the lower-right corner of the form to indicate to users that the form can be resized. The property enables you to display panels within your or to display only the value of the property of the control. - - The default has no panels. To add panels to a you can use the method of the class that is accessible through the property of the control. You can also use the object provided through the property to remove panels from the control and access a specific to manipulate the panel. - - If you want to determine when a object within a control is clicked, you can create an event handler for the event. To perform owner-draw operations on a panel, you can create an event handler for the event. The event data passed to the event handler provides information on the panel to draw and a object to use to perform drawing tasks. - + Typically, a control consists of objects, each of which displays text and/or an icon. You can also provide owner-drawn panels to provide custom panels such as a progress bar or a series of images that displays the state of your application. A control typically displays information about an object being viewed on a , the object's components, or contextual information that relates to that object's operation within your application. + + The control provides properties that enable you to customize the appearance of the control. If the is displayed on a form that can be resized, you can use the property to display a sizing grip in the lower-right corner of the form to indicate to users that the form can be resized. The property enables you to display panels within your or to display only the value of the property of the control. + + The default has no panels. To add panels to a you can use the method of the class that is accessible through the property of the control. You can also use the object provided through the property to remove panels from the control and access a specific to manipulate the panel. + + If you want to determine when a object within a control is clicked, you can create an event handler for the event. To perform owner-draw operations on a panel, you can create an event handler for the event. The event data passed to the event handler provides information on the panel to draw and a object to use to perform drawing tasks. + When you create an instance of , the read/write properties are set to initial values. For a list of these values, see the constructor. - -## Examples - The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . - + +## Examples + The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> @@ -97,32 +97,32 @@ This class is not available in .NET 5 and later versions. Use the Initializes a new instance of the class. - has no panels. - - When you create an instance of , the following read/write properties are set to initial values. - -|Property|Initial value| -|--------------|-------------------| -||| -||`false`| -||`true`| - - You can change the value for any of these properties through a separate call to the property. - - - -## Examples - The following code example demonstrates how to construct a and use the , , , , and members and how to handle the event. - - To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or `Load` method. - + has no panels. + + When you create an instance of , the following read/write properties are set to initial values. + +|Property|Initial value| +|--------------|-------------------| +||| +||`false`| +||`true`| + + You can change the value for any of these properties through a separate call to the property. + + + +## Examples + The following code example demonstrates how to construct a and use the , , , , and members and how to handle the event. + + To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/.ctor/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -158,11 +158,11 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the background color for the . The that is the background color of the control. - @@ -231,11 +231,11 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the background image for the . An that is the background image for the . - has no effect on the appearance of the control, therefore it is not shown in the designer or by IntelliSense. - + has no effect on the appearance of the control, therefore it is not shown in the designer or by IntelliSense. + ]]> @@ -270,11 +270,11 @@ This class is not available in .NET 5 and later versions. Use the Occurs when the value of the property is changed. - @@ -309,11 +309,11 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the layout of the background image of the . One of the values. - has no effect on the appearance of the control, therefore it is not shown in the designer or by IntelliSense. - + has no effect on the appearance of the control, therefore it is not shown in the designer or by IntelliSense. + ]]> @@ -347,11 +347,11 @@ This class is not available in .NET 5 and later versions. Use the Occurs when the value of the property changes. - @@ -424,11 +424,11 @@ This class is not available in .NET 5 and later versions. Use the Gets the default Input Method Editor (IME) mode supported by this control. One of the values. - class, this property always returns the value. - + class, this property always returns the value. + ]]> @@ -482,20 +482,20 @@ This class is not available in .NET 5 and later versions. Use the to release both managed and unmanaged resources; to release only unmanaged resources. Disposes of the resources (other than memory) used by the . - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -560,11 +560,11 @@ This class is not available in .NET 5 and later versions. Use the if the control has a secondary buffer; otherwise, . - control, therefore it is not shown in the designer or by IntelliSense. - + control, therefore it is not shown in the designer or by IntelliSense. + ]]> @@ -589,22 +589,22 @@ This class is not available in .NET 5 and later versions. Use the Occurs when a visual aspect of an owner-drawn status bar control changes. - control. For example, if you display an owner-drawn that displays a progress bar, you can use this event to perform the drawing of the progress bar on the panel. The data provided to the event through the object passed as a parameter to the event handler enables you to determine the panel that needs to be drawn and the to use to draw to the panel. This event is only raised when the property of a in a control is set to . - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to create an owner-drawn that displays a custom background and the current date. This example requires that you have connected the event of a control to the event handler defined in the example. - + control. For example, if you display an owner-drawn that displays a progress bar, you can use this event to perform the drawing of the progress bar on the panel. The data provided to the event through the object passed as a parameter to the event handler enables you to determine the panel that needs to be drawn and the to use to draw to the panel. This event is only raised when the property of a in a control is set to . + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to create an owner-drawn that displays a custom background and the current date. This example requires that you have connected the event of a control to the event handler defined in the example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar.DrawItem/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/DrawItem/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar.DrawItem/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar.DrawItem/VB/form1.vb" id="Snippet1"::: + ]]> @@ -797,22 +797,22 @@ This class is not available in .NET 5 and later versions. Use the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to create an owner-drawn that displays a custom background and the current date. This example requires that you have connected the event of a control to the event handler defined in the example. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to create an owner-drawn that displays a custom background and the current date. This example requires that you have connected the event of a control to the event handler defined in the example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar.DrawItem/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/DrawItem/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar.DrawItem/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar.DrawItem/VB/form1.vb" id="Snippet1"::: + ]]> @@ -846,14 +846,14 @@ This class is not available in .NET 5 and later versions. Use the An that contains the event data. Raises the event. - [!NOTE] -> When overriding in a derived class, be sure to call the base class's method. - +> When overriding in a derived class, be sure to call the base class's method. + ]]> @@ -882,11 +882,11 @@ This class is not available in .NET 5 and later versions. Use the An that contains the event data. Raises the event. - @@ -918,11 +918,11 @@ This class is not available in .NET 5 and later versions. Use the A that contains the event data. Raises the event. - @@ -954,11 +954,11 @@ This class is not available in .NET 5 and later versions. Use the A that contains the event data. Raises the event. - @@ -990,13 +990,13 @@ This class is not available in .NET 5 and later versions. Use the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1030,11 +1030,11 @@ This class is not available in .NET 5 and later versions. Use the An that contains the event data. Raises the event. - @@ -1094,24 +1094,24 @@ This class is not available in .NET 5 and later versions. Use the Occurs when a object on a control is clicked. - control is clicked. The data provided to the event through the passed as a parameter to the event handler enables you to determine the that was clicked by the user in order to perform tasks on the selected panel. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to use the , , , , and members and how to handle the event. - - To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or `Load` method. - + control is clicked. The data provided to the event through the passed as a parameter to the event handler enables you to determine the that was clicked by the user in order to perform tasks on the selected panel. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to use the , , , , and members and how to handle the event. + + To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/.ctor/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1154,20 +1154,20 @@ This class is not available in .NET 5 and later versions. Use the Gets the collection of panels contained within the control. A containing the objects of the control. - control can display a number of panels to provide information to the user of your application. For example, a panel could display the current time or the progress of a file download. Each panel displayed by the control is an instance of the class. The property enables you to obtain a reference to the collection of objects that are currently stored in the control. With this reference, you can add panels, remove panels, access a specific panel within the collection, and obtain a count of the panels in the control. For more information on the tasks that can be performed with the panel collection, see the class reference topics. - - - -## Examples - The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second object, named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . - + control can display a number of panels to provide information to the user of your application. For example, a panel could display the current time or the progress of a file download. Each panel displayed by the control is an instance of the class. The property enables you to obtain a reference to the collection of objects that are currently stored in the control. With this reference, you can add panels, remove panels, access a specific panel within the collection, and obtain a count of the panels in the control. For more information on the tasks that can be performed with the panel collection, see the class reference topics. + + + +## Examples + The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second object, named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1206,20 +1206,20 @@ This class is not available in .NET 5 and later versions. Use the if panels are displayed; otherwise, . The default is . - control displays the value of its property without any panels. When `ShowPanels` is set to `true`, any objects specified in the control are displayed. No panels are initially created when you create an instance of the class. You can add panels to a control by using the method of the class. This collection class can be accessed through the property of . - - - -## Examples - The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . - + control displays the value of its property without any panels. When `ShowPanels` is set to `true`, any objects specified in the control are displayed. No panels are initially created when you create an instance of the class. You can add panels to a control by using the method of the class. This collection class can be accessed through the property of . + + + +## Examples + The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1257,22 +1257,22 @@ This class is not available in .NET 5 and later versions. Use the if a sizing grip is displayed; otherwise, . The default is . - property of your is set to a border style that is not resizable, such as or , you should set the property to `false` to prevent the user from thinking that the form can be resized. - - - -## Examples - The following code example demonstrates how to use the , , , , and members and how to handle the event. - - To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event handler. - + property of your is set to a border style that is not resizable, such as or , you should set the property to `false` to prevent the user from thinking that the form can be resized. + + + +## Examples + The following code example demonstrates how to use the , , , , and members and how to handle the event. + + To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/.ctor/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1336,23 +1336,23 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the text associated with the control. The text associated with the control. - [!CAUTION] -> The control displays only the first 127 characters of a string. - - - -## Examples - The following code example demonstrates how to use the property. To run the example, paste the following code in a form. Call the `InitializeSimpleStatusBar` method in the form's constructor or `Load` method. - +> The control displays only the first 127 characters of a string. + + + +## Examples + The following code example demonstrates how to use the property. To run the example, paste the following code in a form. Call the `InitializeSimpleStatusBar` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/Text/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/VB/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/StatusBarPanel.xml b/xml/System.Windows.Forms/StatusBarPanel.xml index 64920f0340f..e71b2b1e005 100644 --- a/xml/System.Windows.Forms/StatusBarPanel.xml +++ b/xml/System.Windows.Forms/StatusBarPanel.xml @@ -35,32 +35,32 @@ Represents a panel in a control. - + This class is not available in .NET 5 and later versions. Use the control instead, which replaces and extends the control. - control instead. - A represents an individual panel in the of a control. A can contain text and/or an icon that can be used to reflect the status of an application. Use the , accessible through the property of a control, to retrieve, add, or remove an individual . - - The provides properties that enable you to modify the display behavior of a panel within a control. You can use the property to display an icon within a panel. This property can be used to provide a graphical representation of state in an application. The property enables you to specify how text and/or an icon is aligned within the panel. To ensure that your panel is sized properly to fit the text of the panel, you can use the property to automatically resize the panel to fit the text of the panel or to fill the remaining space within the control. The property enables you to specify a minimum width for the panel to ensure that it does not get smaller than the data it is intended to display. - - The control is typically used to display Help information or state information about your application. Often, it is important to display additional information about data that is presented in a panel. You can use the property to display information whenever the mouse pointer rests on a panel. - - Although the control is typically used to display textual information, you can also provide your own type of display to a . The property enables you to specify how the will be drawn. By default, the property is used to display the value of the property (and an icon, if specified in the property). If the property is set to , you can draw your own information into the panel. You can use this feature to draw a progress bar or an animated icon in the panel. - + A represents an individual panel in the of a control. A can contain text and/or an icon that can be used to reflect the status of an application. Use the , accessible through the property of a control, to retrieve, add, or remove an individual . + + The provides properties that enable you to modify the display behavior of a panel within a control. You can use the property to display an icon within a panel. This property can be used to provide a graphical representation of state in an application. The property enables you to specify how text and/or an icon is aligned within the panel. To ensure that your panel is sized properly to fit the text of the panel, you can use the property to automatically resize the panel to fit the text of the panel or to fill the remaining space within the control. The property enables you to specify a minimum width for the panel to ensure that it does not get smaller than the data it is intended to display. + + The control is typically used to display Help information or state information about your application. Often, it is important to display additional information about data that is presented in a panel. You can use the property to display information whenever the mouse pointer rests on a panel. + + Although the control is typically used to display textual information, you can also provide your own type of display to a . The property enables you to specify how the will be drawn. By default, the property is used to display the value of the property (and an icon, if specified in the property). If the property is set to , you can draw your own information into the panel. You can use this feature to draw a progress bar or an animated icon in the panel. + When you create an instance of the class, the read/write properties are set to initial values. For a list of these values, see the constructor. - -## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . - + +## Examples + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> @@ -83,34 +83,34 @@ This class is not available in .NET 5 and later versions. Use the Initializes a new instance of the class. - , the following read/write properties are set to initial values. - -|Property|Initial value| -|--------------|-------------------| -||| -||| -||| -||`null`| -||10| -||| -||A zero-length string.| -||A zero-length string.| -||100| - - You can change the value for any of these properties through a separate call to the property. - - - -## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . - + , the following read/write properties are set to initial values. + +|Property|Initial value| +|--------------|-------------------| +||| +||| +||| +||`null`| +||10| +||| +||A zero-length string.| +||A zero-length string.| +||100| + + You can change the value for any of these properties through a separate call to the property. + + + +## Examples + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> @@ -150,22 +150,22 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the alignment of text and icons within the status bar panel. One of the values. The default is . - property within the borders of the panel. Text and icons can be aligned to the left, right, or center of the . There is no way to independently position an icon within the . For example, you cannot position an icon to the left side of the while aligning the text on the right side. The icon is always positioned to the left side of the text regardless of how the text is aligned. - - - -## Examples - The following code example demonstrates how to use the , , , , and properties, and how to handle the event. - - To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-handling method. - + property within the borders of the panel. Text and icons can be aligned to the left, right, or center of the . There is no way to independently position an icon within the . For example, you cannot position an icon to the left side of the while aligning the text on the right side. The icon is always positioned to the left side of the text regardless of how the text is aligned. + + + +## Examples + The following code example demonstrates how to use the , , , , and properties, and how to handle the event. + + To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-handling method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/.ctor/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: + ]]> The value assigned to the property is not a member of the enumeration. @@ -208,22 +208,22 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets a value indicating whether the status bar panel is automatically resized. One of the values. The default is . - objects set to have precedence over those panels set to the value. For example, a that has its property set to is shortened if a with the property set to requires that space. - - You can use to ensure that the contents of a are properly displayed in a control that contains more than one panel. For example, you might want a panel that contains text to adjust automatically to the amount of text it is displaying (), while another panel on the that displays an owner-drawn progress bar would need to be a fixed size (). - - - -## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . - + objects set to have precedence over those panels set to the value. For example, a that has its property set to is shortened if a with the property set to requires that space. + + You can use to ensure that the contents of a are properly displayed in a control that contains more than one panel. For example, you might want a panel that contains text to adjust automatically to the amount of text it is displaying (), while another panel on the that displays an owner-drawn progress bar would need to be a fixed size (). + + + +## Examples + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> The value assigned to the property is not a member of the enumeration. @@ -254,11 +254,11 @@ This class is not available in .NET 5 and later versions. Use the Begins the initialization of a . - method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. - + method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. + ]]> @@ -299,20 +299,20 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the border style of the status bar panel. One of the values. The default is . - control. - - - -## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . - + control. + + + +## Examples + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> The value assigned to the property is not a member of the enumeration. @@ -344,20 +344,20 @@ This class is not available in .NET 5 and later versions. Use the to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -385,11 +385,11 @@ This class is not available in .NET 5 and later versions. Use the Ends the initialization of a . - method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. - + method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. + ]]> @@ -430,14 +430,14 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the icon to display within the status bar panel. An that represents the icon to display in the panel. - to indicate whether a file save operation is in progress or complete. - + to indicate whether a file save operation is in progress or complete. + > [!NOTE] -> There is no way to independently position an icon within the . For example, you cannot position an icon to the left side of the while aligning the text on the right side using the property. The icon is always positioned to the left side of the panel's text regardless of how the text is aligned. - +> There is no way to independently position an icon within the . For example, you cannot position an icon to the left side of the while aligning the text on the right side using the property. The icon is always positioned to the left side of the panel's text regardless of how the text is aligned. + ]]> @@ -483,11 +483,11 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the minimum allowed width of the status bar panel within the control. The minimum width, in pixels, of the . - property is used when the property is set to or to prevent the from automatically resizing to a width that is too small. When the property is set to , the property is automatically set to the same value as the property. - + property is used when the property is set to or to prevent the from automatically resizing to a width that is too small. When the property is set to , the property is automatically set to the same value as the property. + ]]> A value less than 0 is assigned to the property. @@ -521,11 +521,11 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the name to apply to the . The name of the . - property corresponds to the key for a in the . - + property corresponds to the key for a in the . + ]]> @@ -561,11 +561,11 @@ This class is not available in .NET 5 and later versions. Use the Gets the control that hosts the status bar panel. The that contains the panel. - control that a is contained within. objects are added to a control by calling the method of the class. The of a control is accessible through the property. - + control that a is contained within. objects are added to a control by calling the method of the class. The of a control is accessible through the property. + ]]> @@ -603,20 +603,20 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the style of the status bar panel. One of the values. The default is . - displays text or whether the panel is managed as an owner-drawn . To determine when a needs to be drawn, create an event handler for the event of the control. The passed as a parameter to an event handler of the event enables you to determine which panel needs to be drawn. The also provides a object you can use to perform drawing tasks on the . - - - -## Examples - The following code example demonstrates how to use the property, delegate, class, enumeration, and property. To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-method. - + displays text or whether the panel is managed as an owner-drawn . To determine when a needs to be drawn, create an event handler for the event of the control. The passed as a parameter to an event handler of the event enables you to determine which panel needs to be drawn. The also provides a object you can use to perform drawing tasks on the . + + + +## Examples + The following code example demonstrates how to use the property, delegate, class, enumeration, and property. To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/Text/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarDrawItemEventHandler/VB/form1.vb" id="Snippet2"::: + ]]> The value assigned to the property is not a member of the enumeration. @@ -702,20 +702,20 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the text of the status bar panel. The text displayed in the panel. - property is set to . You can use this property to display information about your application in a control. For example, you can use the property to display Help information when the user moves the mouse over a menu or to display the name and location of a file that is opened in an application. To align the text within a , use the property. - - - -## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . - + property is set to . You can use this property to display information about your application in a control. For example, you can use the property to display Help information when the user moves the mouse over a menu or to display the name and location of a file that is opened in an application. To align the text within a , use the property. + + + +## Examples + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> @@ -752,22 +752,22 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets ToolTip text associated with the status bar panel. The ToolTip text for the panel. - . For example, you can display a ToolTip that provides data transfer speed for a that displays the status of a file transfer. - - To display ToolTips for other controls in your application, use the control. - - - -## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . - + . For example, you can display a ToolTip that provides data transfer speed for a that displays the status of a file transfer. + + To display ToolTips for other controls in your application, use the control. + + + +## Examples + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/VB/form1.vb" id="Snippet1"::: + ]]> @@ -832,22 +832,22 @@ This class is not available in .NET 5 and later versions. Use the Gets or sets the width of the status bar panel within the control. The width, in pixels, of the . - property always reflects the actual width of a and cannot be smaller than the property. To automatically resize the width of the to the contents of the , you can use the property. - - - -## Examples - The following code example demonstrates how to use the , , , , and properties, and how to handle the event. - - To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-handling method. - + property always reflects the actual width of a and cannot be smaller than the property. To automatically resize the width of the to the contents of the , you can use the property. + + + +## Examples + The following code example demonstrates how to use the , , , , and properties, and how to handle the event. + + To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-handling method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar/.ctor/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusBarPanelExample/VB/form1.vb" id="Snippet1"::: + ]]> The width specified is less than the value of the property. diff --git a/xml/System.Windows.Forms/StatusStrip.xml b/xml/System.Windows.Forms/StatusStrip.xml index 4668fbc043f..3f499ec766e 100644 --- a/xml/System.Windows.Forms/StatusStrip.xml +++ b/xml/System.Windows.Forms/StatusStrip.xml @@ -40,36 +40,36 @@ Represents a Windows status bar control. - replaces the control, which was removed in .NET 5. - -Special features of include a custom table layout, support for the form's sizing and moving grips, and support for the property, which allows a to fill available space automatically. - -The following items are specifically designed to work seamlessly with both and in all orientations. They are available by default at design time for the control: - -- - -- - -- - -- - - A control displays information about an object being viewed on a , the object's components, or contextual information that relates to that object's operation within your application. Typically, a control consists of objects, each of which displays text, an icon, or both. The can also contain , , and controls. - - The default has no panels. To add panels to a , use the method, or use the [StatusStrip Items Collection Editor](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/ms233631(v=vs.100)) at design time to add, remove, or reorder items and modify properties. Use the [StatusStrip Tasks Dialog Box](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2008/ms233642(v=vs.90)) at design time to run common commands. - + +Special features of include a custom table layout, support for the form's sizing and moving grips, and support for the property, which allows a to fill available space automatically. + +The following items are specifically designed to work seamlessly with both and in all orientations. They are available by default at design time for the control: + +- + +- + +- + +- + + A control displays information about an object being viewed on a , the object's components, or contextual information that relates to that object's operation within your application. Typically, a control consists of objects, each of which displays text, an icon, or both. The can also contain , , and controls. + + The default has no panels. To add panels to a , use the method, or use the [StatusStrip Items Collection Editor](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/ms233631(v=vs.100)) at design time to add, remove, or reorder items and modify properties. Use the [StatusStrip Tasks Dialog Box](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2008/ms233642(v=vs.90)) at design time to run common commands. + replaces and extends the control. is not available in .NET 5 and later versions. - -## Examples - The following code example demonstrates a with various common properties set. - + +## Examples + The following code example demonstrates a with various common properties set. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusStrip/Overview/form1.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet0"::: + ]]> StatusStrip Items Collection Editor @@ -165,17 +165,17 @@ The following items are specifically designed to work seamlessly with both Creates a new accessibility object for the control. A new for the control. - method, it will be called when the property is referenced. - + method, it will be called when the property is referenced. + > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. -## Examples - For a code example demonstrating how to use , see . - +## Examples + For a code example demonstrating how to use , see . + ]]> @@ -220,11 +220,11 @@ The following items are specifically designed to work seamlessly with both Creates a default with the specified text, image, and event handler on a new instance. A , or a if the parameter is a hyphen (-). - method to add a with commonly used characteristics to a . - + method to add a with commonly used characteristics to a . + ]]> @@ -281,11 +281,11 @@ The following items are specifically designed to work seamlessly with both Gets the spacing, in pixels, between the left, right, top, and bottom edges of the from the edges of the form. A that represents the spacing. The default is {Left=6, Top=2, Right=0, Bottom=2}. - property to set the interior space between controls. When a control is a container of items, padding represents the space from the edge of the container. - + property to set the interior space between controls. When a control is a container of items, padding represents the space from the edge of the container. + ]]> @@ -374,20 +374,20 @@ The following items are specifically designed to work seamlessly with both to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -422,19 +422,19 @@ The following items are specifically designed to work seamlessly with both Gets or sets which borders are docked to its parent control and determines how a is resized with its parent. One of the values. The default is . - property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). - + property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). + A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. -## Examples - The following code example demonstrates a with various common properties set, including the property. - +## Examples + The following code example demonstrates a with various common properties set, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusStrip/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -470,17 +470,17 @@ The following items are specifically designed to work seamlessly with both Gets or sets the visibility of the grip used to reposition the control. One of the values. The default is . - property set to `true` and the property set to `Visible`, the sizing grip will not be displayed unless you also set the property to one of the overflow values. If the property is set to or , the sizing grip will not be displayed. -## Examples - The following code example demonstrates a with various common properties set, including the property. - +## Examples + The following code example demonstrates a with various common properties set, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusStrip/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -516,18 +516,18 @@ The following items are specifically designed to work seamlessly with both Gets or sets a value indicating how the lays out the items collection. One of the values. The default is . - . Its default value is . - -## Examples - The following code example demonstrates a with various common properties set, including the property. - + +## Examples + The following code example demonstrates a with various common properties set, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusStrip/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -590,13 +590,13 @@ Use the `LayoutStyle` property to get or set how items are arranged on the A that contains information about the to paint. Paints the background of the control. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -629,11 +629,11 @@ Use the `LayoutStyle` property to get or set how items are arranged on the Provides custom table layout for a . - to do custom table layouts. The default value of is . - + to do custom table layouts. The default value of is . + ]]> @@ -669,11 +669,11 @@ Use the `LayoutStyle` property to get or set how items are arranged on the This property is not relevant for this class. A value. - @@ -721,11 +721,11 @@ Use the `LayoutStyle` property to get or set how items are arranged on the This event is not relevant for this class. - @@ -789,17 +789,17 @@ Use the `LayoutStyle` property to get or set how items are arranged on the if ToolTips are shown for the ; otherwise, . The default is . - property to get or set display behavior. -## Examples - The following code example demonstrates a with various common properties set, including the property. - +## Examples + The following code example demonstrates a with various common properties set, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusStrip/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -869,19 +869,19 @@ Use the `LayoutStyle` property to get or set how items are arranged on the if a grip is displayed; otherwise, . The default is . - property to display a grip to provide an indication to the user of when a is resizable. - + property to display a grip to provide an indication to the user of when a is resizable. + Even with the property set to `true` and the property set to `Visible`, the sizing grip will not be displayed unless you also set the property to one of the overflow values. If the property is set to or , the sizing grip will not be displayed. -## Examples - The following code example demonstrates a with various common properties set, including the property. - +## Examples + The following code example demonstrates a with various common properties set, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusStrip/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -918,14 +918,14 @@ Use the `LayoutStyle` property to get or set how items are arranged on the if the stretches from end to end in its ; otherwise, . The default is . - with various common properties set, including the property. - + with various common properties set, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusStrip/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.StatusStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -958,13 +958,13 @@ Use the `LayoutStyle` property to get or set how items are arranged on the The Windows to process. Processes Windows messages. - structure wraps messages that Windows sends. You can use this structure to wrap a message and assign it to the window procedure to be dispatched. You can also use this structure to get information about a message the system sends to your application or controls. - - You cannot create the structure directly. To create a structure, use the method. To make creating structures more efficient, the structure uses its pool of existing structures instead of creating an instance of a new one, if possible. However, if a structure is not available in the pool, a new instance of the structure is created. - + structure wraps messages that Windows sends. You can use this structure to wrap a message and assign it to the window procedure to be dispatched. You can also use this structure to get information about a message the system sends to your application or controls. + + You cannot create the structure directly. To create a structure, use the method. To make creating structures more efficient, the structure uses its pool of existing structures instead of creating an instance of a new one, if possible. However, if a structure is not available in the pool, a new instance of the structure is created. + ]]> diff --git a/xml/System.Windows.Forms/TextBox.xml b/xml/System.Windows.Forms/TextBox.xml index f4f6aef47ed..a8d157c31ff 100644 --- a/xml/System.Windows.Forms/TextBox.xml +++ b/xml/System.Windows.Forms/TextBox.xml @@ -49,35 +49,35 @@ Represents a Windows text box control. - control, the user can enter text in an application. This control has additional functionality that is not found in the standard Windows text box control, including multiline editing and password character masking. - - Typically, a control is used to display, or accept as input, a single line of text. You can use the and properties to enable multiple lines of text to be displayed or entered. Set the and properties to `true` to enable greater text manipulation in a multiline control. - + control, the user can enter text in an application. This control has additional functionality that is not found in the standard Windows text box control, including multiline editing and password character masking. + + Typically, a control is used to display, or accept as input, a single line of text. You can use the and properties to enable multiple lines of text to be displayed or entered. Set the and properties to `true` to enable greater text manipulation in a multiline control. + > [!NOTE] -> You must set the property to `true` to adjust the height of the control. You can adjust the height by setting the property. - - You can limit the amount of text entered into a control by setting the property to a specific number of characters. controls can also be used to accept passwords and other sensitive information. You can use the property to mask characters entered in a single-line version of the control. Use the property to enable the user to type only uppercase, only lowercase, or a combination of uppercase and lowercase characters into the control. - - To scroll the contents of the until the cursor (caret) is within the visible region of the control, you can use the method. To select a range of text in the text box, you can use the method. - - To restrict text from being entered in a control, you can create an event handler for the event in order to validate each character entered in the control. You can also restrict all entry of data in a control by setting the property to `true`. - +> You must set the property to `true` to adjust the height of the control. You can adjust the height by setting the property. + + You can limit the amount of text entered into a control by setting the property to a specific number of characters. controls can also be used to accept passwords and other sensitive information. You can use the property to mask characters entered in a single-line version of the control. Use the property to enable the user to type only uppercase, only lowercase, or a combination of uppercase and lowercase characters into the control. + + To scroll the contents of the until the cursor (caret) is within the visible region of the control, you can use the method. To select a range of text in the text box, you can use the method. + + To restrict text from being entered in a control, you can create an event handler for the event in order to validate each character entered in the control. You can also restrict all entry of data in a control by setting the property to `true`. + > [!NOTE] -> Most of the functionality of the control is inherited from the class. -> -> Using the control with visual styles enabled will cause the incorrect handling of surrogate fonts. - - - -## Examples - The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. - +> Most of the functionality of the control is inherited from the class. +> +> Using the control with visual styles enabled will cause the incorrect handling of surrogate fonts. + + + +## Examples + The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -105,20 +105,20 @@ Initializes a new instance of the class. - . - - - -## Examples - The following code example creates a new instance of the control and assigns a string to the control's property. - + . + + + +## Examples + The following code example creates a new instance of the control and assigns a string to the control's property. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.TextBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.TextBox Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.TextBox Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -164,20 +164,20 @@ if the ENTER key creates a new line of text in a multiline version of the control; if the ENTER key activates the default button for the form. The default is . - control. If there is no default button for the form, the ENTER key will always create a new line of text in the control, regardless of the value of this property. - - - -## Examples - The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. - + control. If there is no default button for the form, the ENTER key will always create a new line of text in the control, regardless of the value of this property. + + + +## Examples + The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/AcceptsReturn/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -233,32 +233,32 @@ Gets or sets a custom to use when the property is set to . A to use with . - , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - - The use of the property is optional, but you must set the property to `CustomSource` in order to use . - - You must use the and properties together. - + , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + + The use of the property is optional, but you must set the property to `CustomSource` in order to use . + + You must use the and properties together. + > [!NOTE] -> The operating system might limit the number of custom strings that it can display at once. - - - -## Examples - The following code example demonstrates how to use a collection as the auto-complete custom source for a control. This example does the following: - -- Uses the property to enable the control to accept a custom source for its auto-complete behavior. - -- Uses the property to set the custom list of values. - -- Uses the property to set how the auto-complete candidates are displayed. - +> The operating system might limit the number of custom strings that it can display at once. + + + +## Examples + The following code example demonstrates how to use a collection as the auto-complete custom source for a control. This example does the following: + +- Uses the property to enable the control to accept a custom source for its auto-complete behavior. + +- Uses the property to set the custom list of values. + +- Uses the property to set how the auto-complete candidates are displayed. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/AutoCompleteCustomSource/form1.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.textbox.autocompletecustomsource/vb/form1.vb" id="Snippet10"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.textbox.autocompletecustomsource/vb/form1.vb" id="Snippet10"::: + ]]> @@ -306,46 +306,46 @@ Gets or sets an option that controls how automatic completion works for the . - One of the values of . The following are the values. - - - Appends the remainder of the most likely candidate string to the existing characters, highlighting the appended characters. - - - Displays the auxiliary drop-down list associated with the edit control. This drop-down is populated with one or more suggested completion strings. - - - Appends both and options. - - + One of the values of . The following are the values. + + + Appends the remainder of the most likely candidate string to the existing characters, highlighting the appended characters. + + + Displays the auxiliary drop-down list associated with the edit control. This drop-down is populated with one or more suggested completion strings. + + + Appends both and options. + + Disables automatic completion. This is the default. - , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - - The use of the property is optional, but you must set the property to `CustomSource` in order to use . - - You must use the and properties together. - + , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + + The use of the property is optional, but you must set the property to `CustomSource` in order to use . + + You must use the and properties together. + > [!NOTE] -> The operating system might limit the number of custom strings that it can display at once. - - - -## Examples - The following code example demonstrates how to use a collection as the auto-complete custom source for a control. This example does the following: - -- Uses the property to enable the control to accept a custom source for its auto-complete behavior. - -- Uses the property to set the custom list of values. - -- Uses the property to set how the auto-complete candidates are displayed. - +> The operating system might limit the number of custom strings that it can display at once. + + + +## Examples + The following code example demonstrates how to use a collection as the auto-complete custom source for a control. This example does the following: + +- Uses the property to enable the control to accept a custom source for its auto-complete behavior. + +- Uses the property to set the custom list of values. + +- Uses the property to set how the auto-complete candidates are displayed. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/AutoCompleteCustomSource/form1.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.textbox.autocompletecustomsource/vb/form1.vb" id="Snippet10"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.textbox.autocompletecustomsource/vb/form1.vb" id="Snippet10"::: + ]]> The specified value is not one of the values of . @@ -400,35 +400,35 @@ Gets or sets a value specifying the source of complete strings used for automatic completion. One of the values of . The options are , , , , , , and . The default is . - , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - - The use of the property is optional, but you must set the property to `CustomSource` in order to use . - - You must use the and properties together. - + , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + + The use of the property is optional, but you must set the property to `CustomSource` in order to use . + + You must use the and properties together. + > [!NOTE] -> does not work on multiline controls. - +> does not work on multiline controls. + > [!NOTE] -> The operating system might limit the number of custom strings that can be displayed at once. - - - -## Examples - The following code example demonstrates how to use a collection as the auto-complete custom source for a control. This example does the following: - -- Uses the property to enable the control to accept a custom source for its auto-complete behavior. - -- Uses the property to set the custom list of values. - -- Uses the property to set how the auto-complete candidates are displayed. - +> The operating system might limit the number of custom strings that can be displayed at once. + + + +## Examples + The following code example demonstrates how to use a collection as the auto-complete custom source for a control. This example does the following: + +- Uses the property to enable the control to accept a custom source for its auto-complete behavior. + +- Uses the property to set the custom list of values. + +- Uses the property to set how the auto-complete candidates are displayed. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/AutoCompleteCustomSource/form1.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.textbox.autocompletecustomsource/vb/form1.vb" id="Snippet10"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.textbox.autocompletecustomsource/vb/form1.vb" id="Snippet10"::: + ]]> The specified value is not one of the values of . @@ -472,20 +472,20 @@ Gets or sets whether the control modifies the case of characters as they are typed. One of the enumeration values that specifies whether the control modifies the case of characters. The default is . - property to change the case of characters as required by your application. For example, you could change the case of all characters entered in a control used for password entry to uppercase or lowercase to enforce a policy for passwords. - - - -## Examples - The following code example creates a control that is used to accept a password. This example uses the property to change all characters typed to lowercase, and the property to restrict the password length to eight characters. This example also uses the property to center the password in the control. - + property to change the case of characters as required by your application. For example, you could change the case of all characters entered in a control used for password entry to uppercase or lowercase to enforce a policy for passwords. + + + +## Examples + The following code example creates a control that is used to accept a password. This example uses the property to change all characters typed to lowercase, and the property to restrict the password length to eight characters. This example also uses the property to center the password in the control. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CharacterCasing/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/VB/source.vb" id="Snippet1"::: + ]]> A value that is not within the range of valid values for the enumeration was assigned to the property. @@ -594,20 +594,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -642,11 +642,11 @@ if the specified key is an input key; otherwise, . - method returns `true` when `keyData` includes the value and the property is `true`. - + method returns `true` when `keyData` includes the value and the property is `true`. + ]]> @@ -677,22 +677,22 @@ if the control is a multiline control; otherwise, . The default is . - does not work on multiline controls. - - When the font is changed, any indentation that you have defined does not appear. To get indentation, set to `true` and override WM_SETFONT without calling the base class so that SETMARGINS is not called. - - - -## Examples - The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. - + does not work on multiline controls. + + When the font is changed, any indentation that you have defined does not appear. To get indentation, set to `true` and override WM_SETFONT without calling the base class so that SETMARGINS is not called. + + + +## Examples + The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/AcceptsReturn/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -725,13 +725,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -767,13 +767,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -810,15 +810,15 @@ An that contains the event data. Raises the event. - control, the control saves the selection. When a control gets focus, the selection is the same as when the loses focus. When the gets focus for the first time, the entire text is selected. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + control, the control saves the selection. When a control gets focus, the selection is the same as when the loses focus. When the gets focus for the first time, the entire text is selected. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -885,13 +885,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1010,13 +1010,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1066,25 +1066,25 @@ Gets or sets the character used to mask characters of a password in a single-line control. The character used to mask characters entered in a single-line control. Set the value of this property to '0' (U+0000) if you do not want the control to mask characters as they are typed. The default value is '0' (U+0000). - property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. - - When the property is set, cut and copy actions in the control using the keyboard cannot be performed. - + property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. + + When the property is set, cut and copy actions in the control using the keyboard cannot be performed. + > [!IMPORTANT] -> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. - - - -## Examples - The following code example creates a control that is used to accept a password. This example uses the property to change all characters typed to lowercase and the property to restrict the password length to eight characters. This example also uses the property to center the password in the control. - +> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. + + + +## Examples + The following code example creates a control that is used to accept a password. This example uses the property to change all characters typed to lowercase and the property to restrict the password length to eight characters. This example also uses the property to center the password in the control. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CharacterCasing/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1124,11 +1124,11 @@ The text to replace. Sets the selected text to the specified text without clearing the undo buffer. - , does not affect the Clipboard. - + , does not affect the Clipboard. + ]]> @@ -1200,26 +1200,26 @@ if the command key was processed by the control; otherwise, . - failed to select all text when the and properties were both set to `true`.. This method enables the Ctrl-A shortcut key to select all text when the and properties are both set to `true`. - - Applications targeting .NET Framework versions 4.0 through 4.6 can take advantage of this method by adding the following to the `` section of the app.config file: - -```xml - -``` - - Applications targeting .NET Framework versions 4.6.1 or newer can opt out of this behavior by adding the following to the `` section of the app.config file: - -```xml - -``` - + failed to select all text when the and properties were both set to `true`.. This method enables the Ctrl-A shortcut key to select all text when the and properties are both set to `true`. + + Applications targeting .NET Framework versions 4.0 through 4.6 can take advantage of this method by adding the following to the `` section of the app.config file: + +```xml + +``` + + Applications targeting .NET Framework versions 4.6.1 or newer can opt out of this behavior by adding the following to the `` section of the app.config file: + +```xml + +``` + > [!NOTE] -> If the app.config file already contains an `AppContextSwitchOverrides` key, merge the new key value into the existing key. For example, ``. - +> If the app.config file already contains an `AppContextSwitchOverrides` key, merge the new key value into the existing key. For example, ``. + ]]> @@ -1264,20 +1264,20 @@ Gets or sets which scroll bars should appear in a multiline control. One of the enumeration values that indicates whether a multiline control appears with no scroll bars, a horizontal scroll bar, a vertical scroll bar, or both. The default is . - property is set to `true`, regardless of the value of the property. - - - -## Examples - The following code example creates a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline control useful for creating text documents. - + property is set to `true`, regardless of the value of the property. + + + +## Examples + The following code example creates a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline control useful for creating text documents. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.ScrollBars Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/ScrollBars/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.ScrollBars Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.ScrollBars Example/VB/source.vb" id="Snippet1"::: + ]]> A value that is not within the range of valid values for the enumeration was assigned to the property. @@ -1384,20 +1384,20 @@ Gets or sets how text is aligned in a control. One of the enumeration values that specifies how text is aligned in the control. The default is . - to match the layout of text on your form. For example, if your controls are all located on the right side of the form, you can set the property to `HorizontalAlignment.Right`, and the text will be aligned with the right side of the control instead of the default left alignment. - - - -## Examples - The following code example creates a control that is used to accept a password. This example uses the property to change all characters typed to lowercase, and the property to restrict the password length to eight characters. This example also uses the property to center the password in the control. - + to match the layout of text on your form. For example, if your controls are all located on the right side of the form, you can set the property to `HorizontalAlignment.Right`, and the text will be aligned with the right side of the control instead of the default left alignment. + + + +## Examples + The following code example creates a control that is used to accept a password. This example uses the property to change all characters typed to lowercase, and the property to restrict the password length to eight characters. This example also uses the property to center the password in the control. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CharacterCasing/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic TextBox.CharacterCasing Example/VB/source.vb" id="Snippet1"::: + ]]> A value that is not within the range of valid values for the enumeration was assigned to the property. @@ -1444,21 +1444,21 @@ Occurs when the value of the property has changed. - event. This report helps you find out when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TextBox1`. Then ensure that the event handler is associated with the event. - + event. This report helps you find out when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TextBox1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet249"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet249"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet249"::: + ]]> @@ -1505,14 +1505,14 @@ if the text in the control should appear as the default password character; otherwise, . - property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. - + property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. + > [!IMPORTANT] -> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. - +> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. + ]]> diff --git a/xml/System.Windows.Forms/ToolBar.xml b/xml/System.Windows.Forms/ToolBar.xml index 4c48b5b9013..4c42c5c3fb3 100644 --- a/xml/System.Windows.Forms/ToolBar.xml +++ b/xml/System.Windows.Forms/ToolBar.xml @@ -47,30 +47,30 @@ Represents a Windows toolbar. - + This class is not available in .NET Core 3.1 and later versions. Use instead, which replaces and extends the control. - instead. - controls are used to display controls that can appear as a standard button, a toggle-style button, or a drop-down style button. You can assign images to the buttons by creating an , assigning it to the property of the toolbar, and assigning the image index value to the property each . You can then assign text to be displayed underneath or to the right of the image by setting the property of the . - - Set the property of the toolbar to to give the toolbar and its buttons a flat appearance. As the mouse pointer moves over the buttons, their appearance changes to three-dimensional. Toolbar buttons can be divided into logical groups by using separators. A separator is a toolbar button with the property set to `ToolBarButtonStyle.Separator`. Button separators appear as lines rather than spaces between the buttons when the toolbar has a flat appearance. If the property is set to , the toolbar buttons appear raised and three-dimensional. - - If you specify a value for the property, all buttons in the tool bar are restricted to the specified size. Otherwise, the buttons adjust their size depending on their content, and the property returns the initial size of the largest button. - + controls are used to display controls that can appear as a standard button, a toggle-style button, or a drop-down style button. You can assign images to the buttons by creating an , assigning it to the property of the toolbar, and assigning the image index value to the property each . You can then assign text to be displayed underneath or to the right of the image by setting the property of the . + + Set the property of the toolbar to to give the toolbar and its buttons a flat appearance. As the mouse pointer moves over the buttons, their appearance changes to three-dimensional. Toolbar buttons can be divided into logical groups by using separators. A separator is a toolbar button with the property set to `ToolBarButtonStyle.Separator`. Button separators appear as lines rather than spaces between the buttons when the toolbar has a flat appearance. If the property is set to , the toolbar buttons appear raised and three-dimensional. + + If you specify a value for the property, all buttons in the tool bar are restricted to the specified size. Otherwise, the buttons adjust their size depending on their content, and the property returns the initial size of the largest button. + To create a collection of controls to display on the , add the buttons individually by using the or methods of the property. - -## Examples - The following code example creates a and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated, and the appropriate dialog box opened. This code requires that a , an , a , and a have been created. - + +## Examples + The following code example creates a and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated, and the appropriate dialog box opened. This code requires that a , an , a , and a have been created. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -93,20 +93,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Initializes a new instance of the class. - controls by setting the property. - - - -## Examples - The following code example creates a and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated, and the appropriate dialog box opened. This code requires that a , an , a , and a have been created. - + controls by setting the property. + + + +## Examples + The following code example creates a and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated, and the appropriate dialog box opened. This code requires that a , an , a , and a have been created. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -148,20 +148,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets or set the value that determines the appearance of a toolbar control and its buttons. One of the values. The default is . - property affects the appearance of the buttons assigned to the toolbar. When the appearance is set to `ToolBarAppearance.Normal`, the toolbar's buttons appear three-dimensional and raised. Set the property of the toolbar to `ToolBarAppearance.Flat` to give the toolbar's buttons a flat appearance. As the mouse pointer moves over the flat buttons, they appear raised and three-dimensional. Separators on a with the property set to appear as etched lines rather than spaces between the raised buttons. The flat style buttons give your application a more Web-like look. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + property affects the appearance of the buttons assigned to the toolbar. When the appearance is set to `ToolBarAppearance.Normal`, the toolbar's buttons appear three-dimensional and raised. Set the property of the toolbar to `ToolBarAppearance.Flat` to give the toolbar's buttons a flat appearance. As the mouse pointer moves over the flat buttons, they appear raised and three-dimensional. Separators on a with the property set to appear as etched lines rather than spaces between the raised buttons. The flat style buttons give your application a more Web-like look. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> The assigned value is not one of the values. @@ -215,20 +215,20 @@ This class is not available in .NET Core 3.1 and later versions. Use if the toolbar adjusts its size automatically, based on the size of the buttons and dock style; otherwise, . The default is . - is set to `true`, the control sizes itself to accommodate the toolbar buttons, based upon the button size, the number of objects it contains, and the of the toolbar. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + is set to `true`, the control sizes itself to accommodate the toolbar buttons, based upon the button size, the number of objects it contains, and the of the toolbar. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> @@ -264,21 +264,21 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the value of the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolBar1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolBar1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet564"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet564"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet564"::: + ]]> @@ -346,11 +346,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the property changes. - property is not meaningful for this control, although you can change its value and handle the event to detect the change. - + property is not meaningful for this control, although you can change its value and handle the event to detect the change. + ]]> @@ -418,11 +418,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the property changes. - property is not meaningful for this control, although you can change its value and handle the event to detect the change. - + property is not meaningful for this control, although you can change its value and handle the event to detect the change. + ]]> @@ -488,11 +488,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the property changes. - property is not meaningful for this control, although you can change its value and handle the event to detect the change. - + property is not meaningful for this control, although you can change its value and handle the event to detect the change. + ]]> @@ -532,20 +532,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets or sets the border style of the toolbar control. One of the values. The default is . - can take on a sunken, three-dimensional appearance when the property is set to `BorderStyle.Fixed3D`. To display a flat thin border around the toolbar control, set the property to `BorderStyle.FixedSingle`. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + can take on a sunken, three-dimensional appearance when the property is set to `BorderStyle.Fixed3D`. To display a flat thin border around the toolbar control, set the property to `BorderStyle.FixedSingle`. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> The assigned value is not one of the values. @@ -572,20 +572,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when a on the is clicked. - and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated, and the appropriate dialog box opened. This code requires that a , an , a , and a have been created. - + and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated, and the appropriate dialog box opened. This code requires that a , an , a , and a have been created. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -612,20 +612,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when a drop-down style or its down arrow is clicked. - control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> @@ -671,20 +671,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets the collection of controls assigned to the toolbar control. A that contains a collection of controls. - property is a zero-based indexed collection used to hold all the controls assigned to the toolbar. Because the property is read-only, it can not be assigned a collection of toolbar buttons directly. Toolbar buttons can be added or removed by using the methods inherited from the class. Use the method to add individual buttons and the method to delete a button. Call the method to remove all the buttons from the collection. - - - -## Examples - The following code example creates and initializes a and three controls. The toolbar buttons are assigned to the toolbar and the toolbar is added to the form. This code requires that a has already been created. - + property is a zero-based indexed collection used to hold all the controls assigned to the toolbar. Because the property is read-only, it can not be assigned a collection of toolbar buttons directly. Toolbar buttons can be added or removed by using the methods inherited from the class. Use the method to add individual buttons and the method to delete a button. Call the method to remove all the buttons from the collection. + + + +## Examples + The following code example creates and initializes a and three controls. The toolbar buttons are assigned to the toolbar and the toolbar is added to the form. This code requires that a has already been created. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.Buttons Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.Buttons Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.Buttons Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -721,20 +721,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets or sets the size of the buttons on the toolbar control. A object that represents the size of the controls on the toolbar. The default size has a width of 24 pixels and a height of 22 pixels, or large enough to accommodate the and text, whichever is greater. - is not set, it is set to its default. Alternatively, a is computed to accommodate the largest and text assigned to the controls. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + is not set, it is set to its default. Alternatively, a is computed to accommodate the largest and text assigned to the controls. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> The or property of the object is less than 0. @@ -809,11 +809,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets the default Input Method Editor (IME) mode supported by this control. One of the values. - class, this property always returns the value. - + class, this property always returns the value. + ]]> @@ -867,20 +867,20 @@ This class is not available in .NET Core 3.1 and later versions. Use to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -912,20 +912,20 @@ This class is not available in .NET Core 3.1 and later versions. Use if the toolbar displays a divider; otherwise, . The default is . - control. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + control. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> @@ -1023,20 +1023,20 @@ This class is not available in .NET Core 3.1 and later versions. Use if drop-down toolbar buttons display down arrows; otherwise, . The default is . - is set to `false`, no down arrows display on drop-down style toolbar buttons. When the user clicks the drop-down button on the toolbar, the menu drops down for selection. When the drop-down arrow is displayed, the user must press the down arrow to display the menu. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + is set to `false`, no down arrows display on drop-down style toolbar buttons. When the user clicks the drop-down button on the toolbar, the menu drops down for selection. When the drop-down arrow is displayed, the user must press the down arrow to display the menu. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> @@ -1106,11 +1106,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the property changes. - property is not meaningful for this control, although you can change its value and handle the event to detect the change. - + property is not meaningful for this control, although you can change its value and handle the event to detect the change. + ]]> @@ -1146,20 +1146,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets or sets the collection of images available to the toolbar button controls. An that contains images available to the controls. The default is . - and assign it to the property, you can assign an image from the collection to the controls by assigning the image's index value to the property of the toolbar button. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + and assign it to the property, you can assign an image from the collection to the controls by assigning the image's index value to the property of the toolbar button. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> @@ -1270,11 +1270,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the property changes. - property is not meaningful for this control, although you can change its value and handle the event to detect the change. - + property is not meaningful for this control, although you can change its value and handle the event to detect the change. + ]]> @@ -1303,13 +1303,13 @@ This class is not available in .NET Core 3.1 and later versions. Use A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1343,13 +1343,13 @@ This class is not available in .NET Core 3.1 and later versions. Use A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1383,11 +1383,11 @@ This class is not available in .NET Core 3.1 and later versions. Use An that contains the event data. Raises the event. - method resizes the toolbar buttons to fit the size of the new font. - + method resizes the toolbar buttons to fit the size of the new font. + ]]> @@ -1539,11 +1539,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the property changes. - property is not meaningful for this control, although you can change its value and handle the event to detect the change. - + property is not meaningful for this control, although you can change its value and handle the event to detect the change. + ]]> @@ -1640,11 +1640,11 @@ This class is not available in .NET Core 3.1 and later versions. Use A bitwise combination of the values. Sets the specified bounds of the control. - method ignores width if the property is set to or and the property is set to `true`. ignores height if the property is set to or and the property is set to `true`. - + method ignores width if the property is set to or and the property is set to `true`. ignores height if the property is set to or and the property is set to `true`. + ]]> @@ -1681,20 +1681,20 @@ This class is not available in .NET Core 3.1 and later versions. Use if the toolbar display a ToolTip for each button; otherwise, . The default is . - property of each on the . To cause the ToolTip to display as the user moves the mouse pointer over the toolbar button, set the property to `true`. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + property of each on the . To cause the ToolTip to display as the user moves the mouse pointer over the toolbar button, set the property to `true`. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> @@ -1806,20 +1806,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets or sets the alignment of text in relation to each image displayed on the toolbar button controls. One of the values. The default is . - can be aligned underneath or to the right of the image displayed on the controls. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + can be aligned underneath or to the right of the image displayed on the controls. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> The assigned value is not one of the values. @@ -1856,11 +1856,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Occurs when the property changes. - property is not meaningful for this control, although you can change its value and handle the event to detect the change. - + property is not meaningful for this control, although you can change its value and handle the event to detect the change. + ]]> @@ -1887,11 +1887,11 @@ This class is not available in .NET Core 3.1 and later versions. Use Returns a string that represents the control. A String that represents the current . - method returns a string that includes the type, the value of the property in the , and the string returned by the method of the toolbar's first button. - + method returns a string that includes the type, the value of the property in the , and the string returned by the method of the toolbar's first button. + ]]> @@ -1954,20 +1954,20 @@ This class is not available in .NET Core 3.1 and later versions. Use if the toolbar buttons wrap to another line if the toolbar becomes too small to display all the buttons on the same line; otherwise, . The default value is . - property set to `ToolBarButtonStyle.Separator`. If the property is set to `true` and the toolbar becomes too small to display all the buttons on the same line, the toolbar is broken into additional lines, with the breaks occurring at the separators. This ensures that button groups stay together. Toolbar buttons that are not in a group can be separated when the toolbar wraps. The toolbar can become too small to display all its buttons on the same line if its parent is resized. - - - -## Examples - The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. - + property set to `ToolBarButtonStyle.Separator`. If the property is set to `true` and the toolbar becomes too small to display all the buttons on the same line, the toolbar is broken into additional lines, with the breaks occurring at the separators. This ensures that button groups stay together. Toolbar buttons that are not in a group can be separated when the toolbar wraps. The toolbar can become too small to display all its buttons on the same line if its parent is resized. + + + +## Examples + The following code example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example requires that a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolBar/VB/mytoolbar.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolBarButton.xml b/xml/System.Windows.Forms/ToolBarButton.xml index f3d68b474ae..8b765b83754 100644 --- a/xml/System.Windows.Forms/ToolBarButton.xml +++ b/xml/System.Windows.Forms/ToolBarButton.xml @@ -43,30 +43,30 @@ Represents a Windows toolbar button. - + This class is not available in .NET Core 3.1 and later versions. Use instead, which replaces and extends the control. - instead. - controls are parented by controls. Common properties to set once the toolbar button has been created are and . Set the property of the button to display text beneath or to the right of the image. To assign images to the buttons by creating an , assigning it to the property of the toolbar; then assign the image index value to the property of the button. - - To change the appearance of the toolbar buttons assigned to the toolbar, set the property of the parent toolbar control. The `ToolBarAppearance.Flat` appearance gives the buttons a flat appearance. As the mouse pointer moves over the buttons, their appearance changes to three-dimensional. Button separators appear as lines rather than spaces between the buttons when the buttons have a flat appearance. If the property is set to `ToolBarAppearance.Normal`, the buttons appear raised and three-dimensional, and the separators appear as a gap between the buttons. - - You can assign a to a button if the property is set to `ToolBarButtonStyle.DropDown`. When the button is clicked, the assigned menu is displayed. - + controls are parented by controls. Common properties to set once the toolbar button has been created are and . Set the property of the button to display text beneath or to the right of the image. To assign images to the buttons by creating an , assigning it to the property of the toolbar; then assign the image index value to the property of the button. + + To change the appearance of the toolbar buttons assigned to the toolbar, set the property of the parent toolbar control. The `ToolBarAppearance.Flat` appearance gives the buttons a flat appearance. As the mouse pointer moves over the buttons, their appearance changes to three-dimensional. Button separators appear as lines rather than spaces between the buttons when the buttons have a flat appearance. If the property is set to `ToolBarAppearance.Normal`, the buttons appear raised and three-dimensional, and the separators appear as a gap between the buttons. + + You can assign a to a button if the property is set to `ToolBarButtonStyle.DropDown`. When the button is clicked, the assigned menu is displayed. + To create a collection of controls to display on a , add the buttons individually by using the method of the property. Alternatively, you can add several toolbar buttons using the method. - -## Examples - The following code example creates a and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated and the appropriate dialog box opened. This code requires that a , an , a , and a have all been created. - + +## Examples + The following code example creates a and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated and the appropriate dialog box opened. This code requires that a , an , a , and a have all been created. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBar.ToolBar Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -101,20 +101,20 @@ This class is not available in .NET Core 3.1 and later versions. Use Initializes a new instance of the class. - has no default or assigned to it. The button's default style is `ToolBarButtonStyle.PushButton`. - - - -## Examples - The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. - + has no default or assigned to it. The button's default style is `ToolBarButtonStyle.PushButton`. + + + +## Examples + The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -141,20 +141,20 @@ This class is not available in .NET Core 3.1 and later versions. Use The text to display on the new . Initializes a new instance of the class and displays the assigned text on the button. - has no assigned to it. The button's default style is . The `text` parameter is assigned to the property and is displayed on the new toolbar button control. - - - -## Examples - The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. - + has no assigned to it. The button's default style is . The `text` parameter is assigned to the property and is displayed on the new toolbar button control. + + + +## Examples + The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -186,20 +186,20 @@ This class is not available in .NET Core 3.1 and later versions. Use to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -238,23 +238,23 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets or sets the menu to be displayed in the drop-down toolbar button. A to be displayed in the drop-down toolbar button. The default is . - to be displayed when the drop-down button is clicked. This property is not used unless the property value is set to . - + to be displayed when the drop-down button is clicked. This property is not used unless the property value is set to . + > [!NOTE] -> Although the property is defined as a type, you must assign it a for it to display properly. If you are creating your own derived class you must assign that object to a and assign the to the property. - - - -## Examples - The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that an , and a have been created and the has at least one assigned to it. - +> Although the property is defined as a type, you must assign it a for it to display properly. If you are creating your own derived class you must assign that object to a and assign the to the property. + + + +## Examples + The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that an , and a have been created and the has at least one assigned to it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: + ]]> The assigned object is not a . @@ -297,11 +297,11 @@ This class is not available in .NET Core 3.1 and later versions. Use if the button is enabled; otherwise, . The default is . - property is set to `false`, the toolbar button cannot be clicked, and the button's appearance changes. The and assigned to the button appear grayed out. If the image or text has multiple colors, they display in a monochromatic gray. - + property is set to `false`, the toolbar button cannot be clicked, and the button's appearance changes. The and assigned to the button appear grayed out. If the image or text has multiple colors, they display in a monochromatic gray. + ]]> @@ -357,23 +357,23 @@ This class is not available in .NET Core 3.1 and later versions. Use Gets or sets the index value of the image assigned to the button. The index value of the assigned to the toolbar button. The default is -1. - value references the indexed value of the images in an assigned to the parent control. - + value references the indexed value of the images in an assigned to the parent control. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + + + +## Examples + The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. - - -## Examples - The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -428,13 +428,13 @@ If you set the property, t Gets or sets the name of the image assigned to the button. The name of the assigned to the toolbar button. - value indicates an image in the assigned to the parent control. - + value indicates an image in the assigned to the parent control. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -469,11 +469,11 @@ If you set the property, t The name of the button. The name of the button. - from the collection of a control. - + from the collection of a control. + ]]> @@ -540,20 +540,20 @@ If you set the property, t if a toggle-style toolbar button is partially pushed; otherwise, . The default is . - is set to `true`, the toolbar button appears to have its face grayed. This appearance is different from the dimmed appearance when the property is set to `false` since the partial-push appearance gives a haze to the entire button face. This property has no effect unless the is set to `ToggleButton`. - - - -## Examples - The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`.Call the `InitializeToolBar` method in the form's constructor or `Load` method. - + is set to `true`, the toolbar button appears to have its face grayed. This appearance is different from the dimmed appearance when the property is set to `false` since the partial-push appearance gives a haze to the entire button face. This property has no effect unless the is set to `ToggleButton`. + + + +## Examples + The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`.Call the `InitializeToolBar` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/PartialPush/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -587,20 +587,20 @@ If you set the property, t if a toggle-style toolbar button is currently in the pushed state; otherwise, . The default is . - is set to `true`, the toolbar button appears sunken or inset relative to the other buttons. This property has no effect unless the is set to `ToggleButton`. - - - -## Examples - The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. - + is set to `true`, the toolbar button appears sunken or inset relative to the other buttons. This property has no effect unless the is set to `ToggleButton`. + + + +## Examples + The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/PartialPush/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -627,11 +627,11 @@ If you set the property, t Gets the bounding rectangle for a toolbar button. The bounding for a toolbar button. - and the current button are both , then this property retrieves the bounding rectangle the button is currently contained in. - + and the current button are both , then this property retrieves the bounding rectangle the button is currently contained in. + ]]> @@ -673,20 +673,20 @@ If you set the property, t Gets or sets the style of the toolbar button. One of the values. The default is . - is set to you can specify a to be displayed when the drop-down button is pressed. If the style is set to `ToolBarButtonStyle.Separator`, the toolbar button appears as a button separator and not as a button. The `ToolBarButtonStyle.ToggleButton` style causes the toolbar button to act like a toggle button; it can be in an on or off state. - - - -## Examples - The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. - + is set to you can specify a to be displayed when the drop-down button is pressed. If the style is set to `ToolBarButtonStyle.Separator`, the toolbar button appears as a button separator and not as a button. The `ToolBarButtonStyle.ToggleButton` style causes the toolbar button to act like a toggle button; it can be in an on or off state. + + + +## Examples + The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: + ]]> The assigned value is not one of the values. @@ -740,20 +740,20 @@ If you set the property, t Gets or sets the object that contains data about the toolbar button. An that contains data about the toolbar button. The default is . - derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. - - - -## Examples - The following code example demonstrates how to use the , , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. - + derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. + + + +## Examples + The following code example demonstrates how to use the , , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/PartialPush/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -790,20 +790,20 @@ If you set the property, t Gets or sets the text displayed on the toolbar button. The text displayed on the toolbar button. The default is an empty string (""). - constructor that accepts the text string as a parameter. The orientation of the text on the toolbar button is determined by the property of the button's parent , which can be set to one of the enumeration values. The orientation is in relation to the image assigned to the button. If no image is assigned to the button, there will be space left for one on the surface of the toolbar button. - - - -## Examples - The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. - + constructor that accepts the text string as a parameter. The orientation of the text on the toolbar button is determined by the property of the button's parent , which can be set to one of the enumeration values. The orientation is in relation to the image assigned to the button. If no image is assigned to the button, there will be space left for one on the surface of the toolbar button. + + + +## Examples + The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -844,20 +844,20 @@ If you set the property, t Gets or sets the text that appears as a ToolTip for the button. The text that is displayed when the mouse pointer moves over the toolbar button. The default is an empty string (""). - property of the button's parent to `true`. - - - -## Examples - The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. - + property of the button's parent to `true`. + + + +## Examples + The following code example creates a and three controls, assigns the buttons to the toolbar, and sets some of the buttons' common properties. This code requires that a , , and a have been created and the has at least one assigned to it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/.ctor/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic ToolBarButton.Style Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -886,11 +886,11 @@ If you set the property, t Returns a string that represents the control. A string that represents the current . - method returns a string that includes the type and the value of the and properties. - + method returns a string that includes the type and the value of the and properties. + ]]> @@ -931,11 +931,11 @@ If you set the property, t if the toolbar button is visible; otherwise, . The default is . - diff --git a/xml/System.Windows.Forms/ToolStrip.xml b/xml/System.Windows.Forms/ToolStrip.xml index 7d08eb82e96..3da49a734f6 100644 --- a/xml/System.Windows.Forms/ToolStrip.xml +++ b/xml/System.Windows.Forms/ToolStrip.xml @@ -71,39 +71,39 @@ Provides a container for Windows toolbar objects. - is the base class for , , and . - - Use and its associated classes in new Windows Forms applications to create toolbars that can have a Windows, Office, Internet Explorer, or custom appearance and behavior, all with or without themes, and with support for overflow and run-time item reordering. controls also offer a rich design-time experience that includes in-place activation and editing, custom layout, and sharing of horizontal or vertical space within a specified . - - The class provides many members that manage painting, mouse and keyboard input, and drag-and-drop functionality. Use the class with the class to gain even more control and customizability over the painting and layout style of all controls on a Windows Form. - - The following items are specifically designed to work seamlessly with both and in all orientations. They are available by default at design time for the control: - -- -- -- -- -- -- -- - - You can join controls within a specified and merge controls with each other. Use rather than for Multiple Document Interface (MDI) applications. Typically, a does not participate in the tab order unless it is absolutely positioned rather than being docked or in a . - - Use the class to host any other Windows Forms control in a . - - By default, the is double buffered, taking advantage of the setting. - + is the base class for , , and . + + Use and its associated classes in new Windows Forms applications to create toolbars that can have a Windows, Office, Internet Explorer, or custom appearance and behavior, all with or without themes, and with support for overflow and run-time item reordering. controls also offer a rich design-time experience that includes in-place activation and editing, custom layout, and sharing of horizontal or vertical space within a specified . + + The class provides many members that manage painting, mouse and keyboard input, and drag-and-drop functionality. Use the class with the class to gain even more control and customizability over the painting and layout style of all controls on a Windows Form. + + The following items are specifically designed to work seamlessly with both and in all orientations. They are available by default at design time for the control: + +- +- +- +- +- +- +- + + You can join controls within a specified and merge controls with each other. Use rather than for Multiple Document Interface (MDI) applications. Typically, a does not participate in the tab order unless it is absolutely positioned rather than being docked or in a . + + Use the class to host any other Windows Forms control in a . + + By default, the is double buffered, taking advantage of the setting. + replaces and extends the control. -## Examples - The following code example demonstrates adding a and a to a Windows Forms, adding items to the , and adding the to the of the . - +## Examples + The following code example demonstrates adding a and a to a Windows Forms, adding items to the , and adding the to the of the . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.toolstripcontainer2/vb/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/system.windows.forms.toolstripcontainer2/vb/form1.vb" id="Snippet1"::: + ]]> @@ -246,21 +246,21 @@ to control drag-and-drop and item reordering through events that you implement; otherwise, . - property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. - - Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. - + property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. + + Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. + Setting both and to `true` throws an exception. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -307,21 +307,21 @@ to cause the class to handle drag-and-drop and item reordering automatically; otherwise, . The default value is . - property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. - - Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. - + property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. + + Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. + Setting both and to `true` throws an exception. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -369,17 +369,17 @@ if combining of types is allowed; otherwise, . The default is . - property to enable multiple-document interface (MDI) children to combine their respective menus in the MDI parent. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -409,20 +409,20 @@ Gets or sets the edges of the container to which a is bound and determines how a is resized with its parent. One of the values. - property to define how a is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized. - + property to define how a is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized. + > [!NOTE] > The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -467,11 +467,11 @@ to automatically scroll; otherwise, . - Automatic scrolling is not supported by controls. @@ -516,11 +516,11 @@ This property is not relevant for this class. A value. - @@ -564,11 +564,11 @@ This property is not relevant for this class. A value. - @@ -612,11 +612,11 @@ This property is not relevant for this class. A value. - @@ -665,27 +665,27 @@ if the control adjusts its width to closely fit its contents; otherwise, . The default is . - to `false` and the is embedded in a panel, the bounds of the are not translated when you move the to a different panel of the . To translate the bounds properly, synchronize the event, check the value of the property, and resize the . - - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - + to `false` and the is embedded in a panel, the bounds of the are not translated when you move the to a different panel of the . To translate the bounds properly, synchronize the event, check the value of the property, and resize the . + + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `false` and is , neither image nor scaling occurs. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -737,19 +737,19 @@ Occurs when the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet85"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet85"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet85"::: + ]]> @@ -779,13 +779,13 @@ Gets or sets the background color for the . A that represents the background color of the . The default is the value of the property. - property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. - - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. - + property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. + + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + ]]> @@ -832,17 +832,17 @@ Occurs when the user begins to drag the control. - and with a and a . - +## Examples + The following code example demonstrates the use of and with a and a . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/BeginDrag/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.BeginEndDrag/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.BeginEndDrag/VB/form1.vb" id="Snippet1"::: + ]]> @@ -887,13 +887,13 @@ Gets or sets the binding context for the . A for the . - of a returns a single for all data-bound controls contained by the . The keeps all controls that are bound to the same data source synchronized. For example, setting the property of the specifies the item in the underlying list that all data-bound controls point to. - - For more information about creating a new and assigning it to the property, see the constructor. - + of a returns a single for all data-bound controls contained by the . The keeps all controls that are bound to the same data source synchronized. For example, setting the property of the specifies the item in the underlying list that all data-bound controls point to. + + For more information about creating a new and assigning it to the property, see the constructor. + ]]> @@ -937,20 +937,20 @@ to send items to an overflow menu; otherwise, . The default value is . - property to `true` to send a item to an overflow menu when the item's content exceeds the width of the toolbar. - + property to `true` to send a item to an overflow menu when the item's content exceeds the width of the toolbar. + > [!NOTE] > If there are more overflow items than can be displayed on the form, use the ToolStrip Items Collection Editor to manage this situation. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> How to: Manage ToolStrip Overflow in Windows Forms @@ -1037,19 +1037,19 @@ Occurs when the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet87"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet87"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet87"::: + ]]> @@ -1101,11 +1101,11 @@ This event is not relevant for this class. - @@ -1157,11 +1157,11 @@ This event is not relevant for this class. - @@ -1201,11 +1201,11 @@ This property is not relevant for this class. A representing the collection of controls contained within the . - @@ -1381,17 +1381,17 @@ Gets or sets the cursor that is displayed when the mouse pointer is over the . A that represents the cursor to display when the mouse pointer is over the . - property to get or set a specific used with the . -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -1439,19 +1439,19 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet88"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet88"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet88"::: + ]]> @@ -1514,17 +1514,17 @@ Gets or sets a value representing the default direction in which a control is displayed relative to the . One of the values. - property to get or set where a control appears in relation to its container. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> The specified value is not one of the values. @@ -1616,11 +1616,11 @@ Gets the internal spacing, in pixels, of the contents of a . A value of (0, 0, 1, 0). - are padded one pixel from the right edge of the to prevent the right border from painting over a that is right-aligned. - + are padded one pixel from the right edge of the to prevent the right border from painting over a that is right-aligned. + ]]> @@ -1678,14 +1678,14 @@ Gets the default size of the . The default of the . - property represents the value of the when it is initially created. You can adjust the size of the by setting its property value. - + property represents the value of the when it is initially created. You can adjust the size of the by setting its property value. + > [!NOTE] -> To maintain better performance, do not set the of a in its constructor. Instead, override the property. - +> To maintain better performance, do not set the of a in its constructor. Instead, override the property. + ]]> @@ -1718,13 +1718,13 @@ Gets the subset of items that are currently displayed on the , including items that are automatically added into the . A representing the items that are currently displayed on the . - property to access only those items that are currently displayed. These are the items that are not currently in an overflow menu. - - Use the collection to retrieve all the items of a . - + property to access only those items that are currently displayed. These are the items that are not currently in an overflow menu. + + Use the collection to retrieve all the items of a . + ]]> @@ -1755,11 +1755,11 @@ Retrieves the current display rectangle. A representing the area for item layout. - display rectangle change during automatic scrolling. - + display rectangle change during automatic scrolling. + ]]> @@ -1793,20 +1793,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -1841,24 +1841,24 @@ Gets or sets which borders are docked to its parent control and determines how a is resized with its parent. One of the values. The default value is . - property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their z-order, which is the visual layering of controls on a form along the form's z-axis (depth). - - A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. - - If the control is in a , the can be repositioned within the and across s. The property is ignored, and if the property is `false`, the size of the grows as items are added to the . Typically, the does not participate in the tab order. - + property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their z-order, which is the visual layering of controls on a form along the form's z-axis (depth). + + A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. + + If the control is in a , the can be repositioned within the and across s. The property is ignored, and if the property is `false`, the size of the grows as items are added to the . Typically, the does not participate in the tab order. + > [!NOTE] > The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> How to: Define Z-Ordering of Docked ToolStrip Controls @@ -1903,17 +1903,17 @@ Occurs when the user stops dragging the control. - and with a and a . - +## Examples + The following code example demonstrates the use of and with a and a . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/BeginDrag/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.BeginEndDrag/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.BeginEndDrag/VB/form1.vb" id="Snippet1"::: + ]]> @@ -2021,19 +2021,19 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet90"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet90"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet90"::: + ]]> @@ -2087,11 +2087,11 @@ This method is not relevant for this class. The child that is located at the specified coordinates. - @@ -2138,11 +2138,11 @@ This method is not relevant for this class. The child that is located at the specified coordinates. - @@ -2273,11 +2273,11 @@ Retrieves the next from the specified reference point and moving in the specified direction. A that is specified by the parameter and is next in the order as specified by the parameter. - method to get the next of a . The enumeration coordinates with the property. - + method to get the next of a . The enumeration coordinates with the property. + ]]> The specified value of the parameter is not one of the values of . @@ -2341,17 +2341,17 @@ Gets or sets the space around the move handle. A , which represents the spacing. - property to get or set the space around the move handle. Because can take individual values for , , , and , you can adjust the space around the move handle as preferred. The margin can even be off the edge of the . -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -2388,11 +2388,11 @@ Gets the boundaries of the move handle. An object of type , representing the move handle boundaries. If the boundaries are not visible, the property returns . - property to get boundaries for painting, hit testing, and so on. - + property to get boundaries for painting, hit testing, and so on. + ]]> @@ -2432,11 +2432,11 @@ Gets or sets whether the move handle is visible or hidden. One of the values. The default value is . - movable by putting it in a and ensuring that its is set to . - + movable by putting it in a and ensuring that its is set to . + ]]> The specified value is not one of the values. @@ -2482,11 +2482,11 @@ if the has children; otherwise, . - @@ -2526,11 +2526,11 @@ This property is not relevant for this class. An instance of the class, which provides basic properties for an . - @@ -2587,19 +2587,19 @@ Gets or sets the image list that contains the image displayed on a item. An object of type . - , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - - If is `false` and is , neither image nor scaling occurs. - + , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + + - If is `false` and is , neither image nor scaling occurs. + ]]> @@ -2643,27 +2643,27 @@ Gets or sets the size, in pixels, of an image used on a . A value representing the size of the image, in pixels. The default is 16 x 16 pixels. - property to control the default size of an image. Use to make the size of the image on a to automatically adjust to fit on a while retaining the original image proportions. - - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - + property to control the default size of an image. Use to make the size of the image on a to automatically adjust to fit on a while retaining the original image proportions. + + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `false` and is , neither image nor scaling occurs. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -2774,11 +2774,11 @@ if the character should be sent directly to the item and not preprocessed; otherwise, . - method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. - + method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. + ]]> @@ -2854,19 +2854,19 @@ Occurs when a new is added to the . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet91"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet91"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet91"::: + ]]> @@ -2910,19 +2910,19 @@ Occurs when the is clicked. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet92"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet92"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet92"::: + ]]> @@ -2966,19 +2966,19 @@ Occurs when a is removed from the . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet93"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet93"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet93"::: + ]]> @@ -3022,19 +3022,19 @@ Gets all the items that belong to a . An object of type , representing all the elements contained by a . - collection to retrieve all the items that have been added to the , not just the items that are displayed. An item remains in the collection even if it is an overflow item and is therefore not currently visible. - + collection to retrieve all the items that have been added to the , not just the items that are displayed. An item remains in the collection even if it is an overflow item and is therefore not currently visible. + Use the property to retrieve only the items that are currently displayed on the . -## Examples - The following code example adds a collection of items to a . - +## Examples + The following code example adds a collection of items to a . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/Items/hvtsctoolstrip.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MainToolStripExample/vb/hvtsctoolstrip.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MainToolStripExample/vb/hvtsctoolstrip.vb" id="Snippet3"::: + ]]> @@ -3079,23 +3079,23 @@ Occurs when the layout of the is complete. - , an overflow button automatically appears. The property setting determines whether an item appears in the overflow area always, as needed, or never. - - Inspect the property in the event to determine whether an item was placed on the main , the overflow , or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main and its property was set to . - + , an overflow button automatically appears. The property setting determines whether an item appears in the overflow area always, as needed, or never. + + Inspect the property in the event to determine whether an item was placed on the main , the overflow , or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main and its property was set to . + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet94"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet94"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet94"::: + ]]> @@ -3226,19 +3226,19 @@ Gets or sets a value indicating how the lays out the items collection. One of the values. The default value is . - . The sizing grip will not be displayed unless you also set the property to one of the overflow values. If the property is set to or , the sizing grip will not be displayed. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> The value of is not one of the values. @@ -3283,19 +3283,19 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet95"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet95"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet95"::: + ]]> @@ -3355,13 +3355,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3397,13 +3397,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3439,13 +3439,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3481,13 +3481,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3553,13 +3553,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3595,13 +3595,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3662,13 +3662,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3704,13 +3704,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3746,13 +3746,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3788,13 +3788,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3830,13 +3830,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3872,13 +3872,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3918,13 +3918,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3960,13 +3960,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4032,13 +4032,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4074,13 +4074,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4116,13 +4116,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4158,13 +4158,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4200,13 +4200,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4248,13 +4248,13 @@ A that contains information about the control to paint. Raises the event for the background. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4290,15 +4290,15 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4334,13 +4334,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4386,13 +4386,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4458,13 +4458,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4500,15 +4500,15 @@ An that contains the event data. Raises the event. - property of a does not raise the various *Changed events of a . Raise those events with specific property settings. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + property of a does not raise the various *Changed events of a . Raise those events with specific property settings. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4629,19 +4629,19 @@ Occurs when the move handle is painted. - event. This report helps you to learn when the event occurs and can assist you in debugging. - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet96"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet96"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet96"::: + ]]> @@ -4710,11 +4710,11 @@ if the key was processed by the control; otherwise, . - method is called during message preprocessing to handle dialog characters such as TAB, RETURN, ESCAPE, and arrow keys. This method is called only if the method indicates that the control is not processing the key. The simply sends the character to the parent control's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or an ActiveX control. - + method is called during message preprocessing to handle dialog characters such as TAB, RETURN, ESCAPE, and arrow keys. This method is called only if the method indicates that the control is not processing the key. The simply sends the character to the parent control's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or an ActiveX control. + ]]> @@ -4752,15 +4752,15 @@ if the character was processed as a mnemonic by the control; otherwise, . - method is called to give a control the opportunity to process a mnemonic character. This method should determine whether the control is in a state to process mnemonics and whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. - - Implementations of this method often use the method to determine whether the given character matches a mnemonic in the control's text. - - This default implementation of the method simply returns `false`, to indicate that the control has no mnemonic. - + method is called to give a control the opportunity to process a mnemonic character. This method should determine whether the control is in a state to process mnemonics and whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. + + Implementations of this method often use the method to determine whether the given character matches a mnemonic in the control's text. + + This default implementation of the method simply returns `false`, to indicate that the control has no mnemonic. + ]]> @@ -4800,13 +4800,13 @@ Gets or sets a used to customize the look and feel of a . A used to customize the look and feel of a . - property and the class to customize the look and feel of any that does not have a window handle. - - To do this, derive a class from , assign it to the property, and call the method. - + property and the class to customize the look and feel of any that does not have a window handle. + + To do this, derive a class from , assign it to the property, and call the method. + ]]> How To: Create and Set a Custom Renderer for the ToolStrip Control in Windows Forms @@ -4854,19 +4854,19 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet97"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet97"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet97"::: + ]]> How To: Create and Set a Custom Renderer for the ToolStrip Control in Windows Forms @@ -4900,17 +4900,17 @@ Gets or sets a value that indicates which visual styles will be applied to the . A value that indicates the visual style to apply. The default is . - will use. You can use this property to specify a professional rendering style, a default system rendering style, or a style managed by the property value. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> The value being set is not one of the values. @@ -4952,10 +4952,10 @@ The new DPI value. When overridden in a derived class, handles the rescaling of any magic numbers that are used in control painting. - @@ -4992,11 +4992,11 @@ This method is not relevant for this class. - @@ -5032,11 +5032,11 @@ Controls the return location of the focus. - method to control where the focus returns to when the property is `false`. - + method to control where the focus returns to when the property is `false`. + ]]> @@ -5073,13 +5073,13 @@ to move forward in the tab order; to move backward in the tab order. Activates a child control. Optionally specifies the direction in the tab order to select the control from. - method activates the control if the control's style bit is set to `true`, it is contained in another control, and all its parent controls are both visible and enabled. - + method activates the control if the control's style bit is set to `true`, it is contained in another control, and all its parent controls are both visible and enabled. + ]]> @@ -5120,11 +5120,11 @@ An . This method is not relevant for this class. - @@ -5258,11 +5258,11 @@ The that is the parent of the referred to by the parameter. Enables you to change the parent of a . - property when creating a custom layout engine. - + property when creating a custom layout engine. + ]]> @@ -5296,11 +5296,11 @@ if the is visible; otherwise, . Retrieves a value that sets the to the specified visibility state. - @@ -5341,17 +5341,17 @@ if ToolTips are to be displayed; otherwise, . The default is . - property to determine whether ToolTips are displayed for the . -## Examples - The following code example turns off the automatic text for a and sets custom text. This example is part of a larger example available in the property. - +## Examples + The following code example turns off the automatic text for a and sets custom text. This example is part of a larger example available in the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/ShowItemToolTips/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripToolTip/vb/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripToolTip/vb/Form1.vb" id="Snippet2"::: + ]]> How to: Use ToolTips in ToolStrip Controls @@ -5393,17 +5393,17 @@ if the stretches from end to end in its ; otherwise, . The default is . - property to get or set whether the automatically fills its container. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -5444,17 +5444,17 @@ if the user can give the focus to an item in the using the TAB key; otherwise, . The default is . - in the tab order. Controls with a property value of `false` are not included in the collection of controls in the tab order. You can manipulate the tab order by changing the property value for controls in the collection. -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -5490,17 +5490,17 @@ Gets or sets the direction in which to draw text on a . One of the values. The default is . - property to get or set the direction of the display text of a , such as a or a . You can set the property on the itself, in which case the setting will apply to each you add to the , or you can set the property differently for each . -## Examples - The following code example demonstrates the syntax for setting common properties, including the property. - +## Examples + The following code example demonstrates the syntax for setting common properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/AllowDrop/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> The specified value is not one of the values. @@ -5569,11 +5569,11 @@ This property is not relevant for this class. An instance of the class, which provides basic properties for a . - @@ -5606,20 +5606,20 @@ The Windows to process. Processes Windows messages. - method after getting filtered through the method. - + method after getting filtered through the method. + The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)). -## Examples - The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the Platform SDK documentation reference located at . Actual constant values can be found in the windows.h header file included in the Platform SDK (Core SDK section) download, which is also available on Docs. - +## Examples + The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the Platform SDK documentation reference located at . Actual constant values can be found in the windows.h header file included in the Platform SDK (Core SDK section) download, which is also available on Docs. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/VB/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStripControlHost.xml b/xml/System.Windows.Forms/ToolStripControlHost.xml index f61d38761ae..cc53b8a041c 100644 --- a/xml/System.Windows.Forms/ToolStripControlHost.xml +++ b/xml/System.Windows.Forms/ToolStripControlHost.xml @@ -32,28 +32,28 @@ Hosts custom controls or Windows Forms controls. - is the base class for , , and . can host other controls, including custom controls, in two ways: - -- Construct a with a class that derives from . To fully access the hosted control and properties, you must cast the property back to the actual class it represents. - -- Extend , and in the inherited class's parameterless constructor, call the base class constructor passing a class that derives from . This option lets you wrap common control methods and properties for easy access in a . - - Use the class to host your customized controls or any other Windows Forms control. - - To customize a , derive from and create a custom implementation. You can override methods such as to handle events raised by the hosted controls, and you can put custom functionality into properties to enhance the hosted control. - - - -## Examples - The following code example demonstrates constructing a with a control, using to handle events, and exposing some of its members to the . - + is the base class for , , and . can host other controls, including custom controls, in two ways: + +- Construct a with a class that derives from . To fully access the hosted control and properties, you must cast the property back to the actual class it represents. + +- Extend , and in the inherited class's parameterless constructor, call the base class constructor passing a class that derives from . This option lets you wrap common control methods and properties for easy access in a . + + Use the class to host your customized controls or any other Windows Forms control. + + To customize a , derive from and create a custom implementation. You can override methods such as to handle events raised by the hosted controls, and you can put custom functionality into properties to enhance the hosted control. + + + +## Examples + The following code example demonstrates constructing a with a control, using to handle events, and exposing some of its members to the . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet13"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet13"::: + ]]> ToolStrip Control (Windows Forms) @@ -94,15 +94,15 @@ The hosted by this class. Initializes a new instance of the class that hosts the specified control. - control and setting several properties. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the event handler. - + control and setting several properties. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: + ]]> The control referred to by the parameter is . @@ -247,16 +247,16 @@ Gets or sets the background image layout as defined in the enumeration. - One of the values of : - -- - -- - -- - -- (default) - + One of the values of : + +- + +- + +- + +- (default) + - To be added. @@ -362,15 +362,15 @@ Gets the that this is hosting. The that this is hosting. - control and sets a property on the wrapped control using the property. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the `Load` event handler. - + control and sets a property on the wrapped control using the property. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: + ]]> @@ -414,11 +414,11 @@ Gets or sets the alignment of the control on the form. One of the values. The default is . - property to determine or define how hosted controls are to be laid out on the form. - + property to determine or define how hosted controls are to be laid out on the form. + ]]> The property is set to a value that is not one of the values. @@ -483,14 +483,14 @@ Gets the default size of the control. The default of the control. - property represents the of the control when it is initially created. If is `true`, the control is sized automatically in accordance with the orientation. You can manually adjust the size of the control by setting its property value to `false`. - + property represents the of the control when it is initially created. If is `true`, the control is sized automatically in accordance with the orientation. You can manually adjust the size of the control by setting its property value to `false`. + > [!NOTE] -> In order to maintain better performance, you should not set the of a control in its constructor. The preferred method is to override the property. - +> In order to maintain better performance, you should not set the of a control in its constructor. The preferred method is to override the property. + ]]> @@ -537,11 +537,11 @@ This property is not relevant to this class. The display style of the object. - @@ -593,11 +593,11 @@ This event is not relevant to this class. - @@ -631,20 +631,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -688,11 +688,11 @@ if double clicking is enabled; otherwise, . - @@ -764,21 +764,21 @@ Occurs when the hosted control is entered. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet569"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet569"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet569"::: + ]]> @@ -880,15 +880,15 @@ Gets or sets the font to be used on the hosted control. The for the hosted control. - control and setting several properties. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the `Load` event handler. - + control and setting several properties. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: + ]]> @@ -998,21 +998,21 @@ Occurs when the hosted control receives focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet570"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet570"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet570"::: + ]]> @@ -1070,11 +1070,11 @@ The image associated with the object. The image of the hosted control. - @@ -1118,11 +1118,11 @@ This property is not relevant to this class. The image alignment for the object. - @@ -1167,11 +1167,11 @@ if an image on a ToolStripItem is automatically resized to fit in a container; otherwise, . - @@ -1215,11 +1215,11 @@ This property is not relevant to this class. The transparent color of the image. - @@ -1263,21 +1263,21 @@ Occurs when a key is pressed and held down while the hosted control has focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet573"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet573"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet573"::: + ]]> @@ -1322,21 +1322,21 @@ Occurs when a key is pressed while the hosted control has focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet574"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet574"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet574"::: + ]]> @@ -1381,21 +1381,21 @@ Occurs when a key is released while the hosted control has focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet575"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet575"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet575"::: + ]]> @@ -1440,21 +1440,21 @@ Occurs when the input focus leaves the hosted control. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet571"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet571"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet571"::: + ]]> @@ -1507,21 +1507,21 @@ Occurs when the hosted control loses focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet572"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet572"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet572"::: + ]]> @@ -1552,13 +1552,13 @@ Occurs when the property changes. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1595,13 +1595,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1637,13 +1637,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1679,13 +1679,13 @@ An that contains the event data. Synchronizes the resizing of the control host with the resizing of the hosted control. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1721,13 +1721,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1763,13 +1763,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1805,13 +1805,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1877,13 +1877,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1919,13 +1919,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2038,26 +2038,26 @@ The control from which to subscribe events. Subscribes events from the hosted control. - method to add or prevent the synchronizing of control events. - - If you override and hook up events here, unhook them by using the method. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to set up event handling for an event exposed by the hosted control. This code example is part of a larger example provided for the class. - + method to add or prevent the synchronizing of control events. + + If you override and hook up events here, unhook them by using the method. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to set up event handling for an event exposed by the hosted control. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet14"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet14"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet14"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet14"::: + ]]> @@ -2100,24 +2100,24 @@ The control from which to unsubscribe events. Unsubscribes events from the hosted control. - method to unsubscribe events subscribed in . - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to unsubscribe from an event exposed by the hosted control. This code example is part of a larger example provided for the class. - + method to unsubscribe events subscribed in . + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to unsubscribe from an event exposed by the hosted control. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet15"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet15"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet15"::: + ]]> @@ -2153,13 +2153,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2195,13 +2195,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2337,11 +2337,11 @@ This method is not relevant to this class. - @@ -2377,11 +2377,11 @@ This method is not relevant to this class. - @@ -2453,11 +2453,11 @@ if the image is mirrored; otherwise, . - @@ -2626,15 +2626,15 @@ Gets or sets the text to be displayed on the hosted control. A representing the text. - control and setting several properties. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the `Load` event handler. - + control and setting several properties. To run this example, paste the code into a form that contains a named `toolStrip1` and call `InitializeDateTimePickerHost` from the form's constructor or the `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/VB/form1.vb" id="Snippet1"::: + ]]> @@ -2674,11 +2674,11 @@ This property is not relevant to this class. The text alignment property for the object. - @@ -2722,11 +2722,11 @@ This property is not relevant to this class. The text direction of the tool strip. - @@ -2766,11 +2766,11 @@ This property is not relevant to this class. The relation of a text image with the object. - @@ -2814,21 +2814,21 @@ Occurs after the hosted control has been successfully validated. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet577"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet577"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet577"::: + ]]> @@ -2873,21 +2873,21 @@ Occurs while the hosted control is validating. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet576"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet576"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet576"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStripDropDown.xml b/xml/System.Windows.Forms/ToolStripDropDown.xml index cf1d7ee2e50..e317d990505 100644 --- a/xml/System.Windows.Forms/ToolStripDropDown.xml +++ b/xml/System.Windows.Forms/ToolStripDropDown.xml @@ -49,26 +49,26 @@ Represents a control that allows the user to select a single item from a list that's displayed when the user clicks a . - to display drop-down lists of options, such as a color picker. and replace and extend the control, which was removed in .NET Core 3.1. -## Examples - The following code example uses the and classes to make a three-button color picker that changes the foreground color of the form. - +## Examples + The following code example uses the and classes to make a three-button color picker that changes the foreground color of the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet5"::: - - The following code example uses to show a as a . - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet5"::: + + The following code example uses to show a as a . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownTreeView/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownTreeView/VB/form1.vb" id="Snippet1"::: + ]]> @@ -135,11 +135,11 @@ Use the to display drop-down lists to enable item reordering; otherwise, . - @@ -180,11 +180,11 @@ Use the to display drop-down lists if the of the form can be adjusted; otherwise, . - @@ -224,11 +224,11 @@ Use the to display drop-down lists This property is not relevant to this class. One of the values. - @@ -269,20 +269,20 @@ Use the to display drop-down lists if the control automatically closes; otherwise, . The default is . - that always stays open, set to `false`. - + that always stays open, set to `false`. + > [!NOTE] > Consider handling the event instead of setting the property. Inspect the field in your handler to specify custom closing logic. -## Examples - The following code example demonstrates how to toggle the value of the property in response to a check box selection. - +## Examples + The following code example demonstrates how to toggle the value of the property in response to a check box selection. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet9"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet9"::: + ]]> @@ -356,19 +356,19 @@ Use the to display drop-down lists Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet171"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet171"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet171"::: + ]]> @@ -404,19 +404,19 @@ Use the to display drop-down lists Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet172"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet172"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet172"::: + ]]> @@ -452,19 +452,19 @@ Use the to display drop-down lists Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet173"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet173"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet173"::: + ]]> @@ -546,19 +546,19 @@ Use the to display drop-down lists Occurs when the focus or keyboard user interface (UI) cues change. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet174"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet174"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet174"::: + ]]> @@ -627,17 +627,17 @@ Use the to display drop-down lists One of the values. Closes the control for the specified reason. - method to close a control under specific conditions, such as when an application is started or an item is selected by clicking the control, if the focus changes, or if specified keyboard action occurs. -## Examples - The following code example demonstrates how to specify a close reason when explicitly closing a control with the method. - +## Examples + The following code example demonstrates how to specify a close reason when explicitly closing a control with the method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet8"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet8"::: + ]]> @@ -668,19 +668,19 @@ Use the to display drop-down lists Occurs when the is closed. - delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/). -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet177"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet177"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet177"::: + ]]> @@ -710,17 +710,17 @@ Use the to display drop-down lists Occurs when the control is about to close. - control by handling the event - +## Examples + The following code example demonstrates how to selectively close a control by handling the event + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet6"::: + ]]> @@ -755,11 +755,11 @@ Use the to display drop-down lists This property is not relevant to this class. The shortcut menu associated with the control. - @@ -793,11 +793,11 @@ Use the to display drop-down lists This event is not relevant to this class. - @@ -838,11 +838,11 @@ Use the to display drop-down lists This property is not relevant to this class. The shortcut menu associated with the control. - @@ -882,11 +882,11 @@ Use the to display drop-down lists This event is not relevant to this class. - @@ -1020,11 +1020,11 @@ Use the to display drop-down lists Gets parameters of a new window. An object of type used when creating a new window. - property to add extra functionality to inheriting classes, but you must first call the method of the base class to verify that the control continues to work correctly. - + property to add extra functionality to inheriting classes, but you must first call the method of the base class to verify that the control continues to work correctly. + ]]> @@ -1082,14 +1082,14 @@ Use the to display drop-down lists Gets or sets the direction in which the is displayed relative to the . One of the values. - property specified by a radio button setting. - + property specified by a radio button setting. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet11"::: + ]]> @@ -1179,20 +1179,20 @@ Use the to display drop-down lists to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -1235,11 +1235,11 @@ Use the to display drop-down lists This property is not relevant to this class. One of the values. - @@ -1279,11 +1279,11 @@ Use the to display drop-down lists This event is not relevant to this class. - @@ -1351,19 +1351,19 @@ Use the to display drop-down lists Occurs when the focus enters the . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet179"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet179"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet179"::: + ]]> @@ -1407,11 +1407,11 @@ Use the to display drop-down lists Gets or sets the font of the text displayed on the . The to apply to the text displayed by the control. - @@ -1451,19 +1451,19 @@ Use the to display drop-down lists Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet180"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet180"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet180"::: + ]]> @@ -1503,11 +1503,11 @@ Use the to display drop-down lists Occurs when the value of the property changes. - @@ -1547,11 +1547,11 @@ Use the to display drop-down lists This event is not relevant for this class. - @@ -1591,11 +1591,11 @@ Use the to display drop-down lists This property is not relevant to this class. One of the values. - @@ -1639,11 +1639,11 @@ Use the to display drop-down lists This property is not relevant to this class. A value. - @@ -1683,11 +1683,11 @@ Use the to display drop-down lists This property is not relevant to this class. The boundaries of the ToolStrip move handle. - @@ -1731,11 +1731,11 @@ Use the to display drop-down lists This property is not relevant to this class. One of the values. - @@ -1775,19 +1775,19 @@ Use the to display drop-down lists Occurs when the user requests help for a control. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet181"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet181"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet181"::: + ]]> @@ -1827,16 +1827,16 @@ Use the to display drop-down lists Occurs when the property has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet182"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet182"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet182"::: + ]]> @@ -1914,19 +1914,19 @@ Use the to display drop-down lists Occurs when a key is pressed and held down while the has focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet183"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet183"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet183"::: + ]]> @@ -1966,19 +1966,19 @@ Use the to display drop-down lists Occurs when a key is pressed while the has focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet184"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet184"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet184"::: + ]]> @@ -2018,19 +2018,19 @@ Use the to display drop-down lists Occurs when a key is released while the control has focus. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet185"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet185"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet185"::: + ]]> @@ -2070,19 +2070,19 @@ Use the to display drop-down lists Occurs when the input focus leaves the control. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet186"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet186"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet186"::: + ]]> @@ -2126,11 +2126,11 @@ Use the to display drop-down lists This property is not relevant to this class. The coordinates of the upper-left corner of the control relative to the upper-left corner of its container. - @@ -2196,13 +2196,13 @@ Use the to display drop-down lists A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2244,13 +2244,13 @@ Use the to display drop-down lists A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2292,13 +2292,13 @@ Use the to display drop-down lists An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2340,13 +2340,13 @@ Use the to display drop-down lists A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2388,13 +2388,13 @@ Use the to display drop-down lists A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2436,13 +2436,13 @@ Use the to display drop-down lists A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2484,13 +2484,13 @@ Use the to display drop-down lists An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2532,13 +2532,13 @@ Use the to display drop-down lists A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2580,13 +2580,13 @@ Use the to display drop-down lists An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2628,13 +2628,13 @@ Use the to display drop-down lists An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2685,11 +2685,11 @@ Use the to display drop-down lists Determines the opacity of the form. The level of opacity for the form. The default is 1.00. - @@ -2719,19 +2719,19 @@ Use the to display drop-down lists Occurs when the is opened. - delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/). -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet188"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet188"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet188"::: + ]]> @@ -2761,17 +2761,17 @@ Use the to display drop-down lists Occurs when the control is opening. - event. - +## Examples + The following example demonstrates how to handle the event. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet40"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet40"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet40"::: + ]]> @@ -2819,11 +2819,11 @@ Use the to display drop-down lists This property is not relevant to this class. The ToolStripItem that is the overflow button for a ToolStrip with overflow enabled. - @@ -2868,14 +2868,14 @@ Use the to display drop-down lists Gets or sets the that is the owner of this . The that is the owner of this . The default value is . - @@ -2948,11 +2948,11 @@ Use the to display drop-down lists if the key was processed by the control; otherwise, . - method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. - + method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. + ]]> @@ -2987,28 +2987,28 @@ Use the to display drop-down lists if the character was processed as a mnemonic by the control; otherwise, . - method to determine whether the given character matches a mnemonic in the control's text. - - For example: - -```csharp -if (CanSelect && IsMnemonic(charCode, MyControl.Text) { - // Perform action associated with mnemonic. - } -``` - + method to determine whether the given character matches a mnemonic in the control's text. + + For example: + +```csharp +if (CanSelect && IsMnemonic(charCode, MyControl.Text) { + // Perform action associated with mnemonic. + } +``` + This default implementation of the method simply returns `false` to indicate that the control has no mnemonic. -## Examples - The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example, paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. - +## Examples + The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example, paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/ProcessMnemonic/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/VB/form1.vb" id="Snippet1"::: + ]]> @@ -3088,19 +3088,19 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet189"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet189"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet189"::: + ]]> @@ -3211,11 +3211,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { The vertical scaling factor. This method is not relevant to this class. - @@ -3255,11 +3255,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { This event is not relevant for this class. - @@ -3377,14 +3377,14 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { Displays the control in its default position. - control at its default position. - + control at its default position. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet3"::: + ]]> @@ -3417,14 +3417,14 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { The horizontal and vertical location of the screen's upper-left corner, in pixels. Positions the relative to the specified screen location. - control at a fixed point. - + control at a fixed point. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet5"::: + ]]> @@ -3459,14 +3459,14 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { One of the values. Positions the relative to the specified control location and with the specified direction relative to the parent control. - control at a fixed point in the specified direction. - + control at a fixed point in the specified direction. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet4"::: + ]]> @@ -3580,14 +3580,14 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { One of the values. Positions the relative to the specified control at the specified location and with the specified direction relative to the parent control. - control relative to the parent control. - + control relative to the parent control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDown/VB/Form1.vb" id="Snippet2"::: + ]]> The control specified by the parameter is . @@ -3670,11 +3670,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { to enable stretching; otherwise, . - @@ -3714,19 +3714,19 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { Occurs when the style changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet190"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet190"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet190"::: + ]]> @@ -3770,11 +3770,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { This property is not relevant to this class. The tab order of the control within its container. - @@ -3814,11 +3814,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { This event is not relevant to this class. - @@ -3858,11 +3858,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { This event is not relevant for this class. - @@ -3902,11 +3902,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { This event is not relevant for this class. - @@ -4017,11 +4017,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { in all cases. - . - + . + ]]> @@ -4061,11 +4061,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { This event is not relevant for this class. - @@ -4105,11 +4105,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { This event is not relevant for this class. - diff --git a/xml/System.Windows.Forms/ToolStripDropDownItem.xml b/xml/System.Windows.Forms/ToolStripDropDownItem.xml index c9dde0e4a85..48b6f31c9bf 100644 --- a/xml/System.Windows.Forms/ToolStripDropDownItem.xml +++ b/xml/System.Windows.Forms/ToolStripDropDownItem.xml @@ -44,19 +44,19 @@ Provides basic functionality for controls that display a when a , , or control is clicked. - is the abstract base class for , , and , which can host items directly or host additional items in a drop-down container. You do this by setting the property to a and setting the property of the . Access these drop-down items directly through the property. - - - -## Examples - The following code example demonstrates how to show and hide controls. - + is the abstract base class for , , and , which can host items directly or host additional items in a drop-down container. You do this by setting the property to a and setting the property of the . Access these drop-down items directly through the property. + + + +## Examples + The following code example demonstrates how to show and hide controls. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet1"::: + ]]> MenuStrip Control (Windows Forms) @@ -72,11 +72,11 @@ Initializes a new instance of the class. - class in order to have any drop-down functionality for a , , or control. - + class in order to have any drop-down functionality for a , , or control. + ]]> @@ -102,19 +102,19 @@ Initializes a new instance of the class. - class in order to have any drop-down functionality for a , , or control. - - - -## Examples - The following code example demonstrates how to create and initialize controls. This code example is part of a larger example provided for the class. - + class in order to have any drop-down functionality for a , , or control. + + + +## Examples + The following code example demonstrates how to create and initialize controls. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet2"::: + ]]> @@ -155,11 +155,11 @@ The action to take when the drop-down control is clicked. Initializes a new instance of the class with the specified display text, image, and action to take when the drop-down control is clicked. - class in order to have any drop-down functionality for a , , or control. - + class in order to have any drop-down functionality for a , , or control. + ]]> @@ -211,11 +211,11 @@ A collection that the drop-down control contains. Initializes a new instance of the class with the specified display text, image, and collection that the drop-down control contains. - class in order to have any drop-down functionality for a , , or control. - + class in order to have any drop-down functionality for a , , or control. + ]]> @@ -315,11 +315,11 @@ Creates a generic for which events can be defined. The created object. - method is automatically called if the property finds no associated with the . - + method is automatically called if the property finds no associated with the . + ]]> @@ -353,20 +353,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -401,22 +401,22 @@ Gets or sets the that will be displayed when this is clicked. A that is associated with the . - is associated with the , a call to creates a generic drop-down control. - + is associated with the , a call to creates a generic drop-down control. + > [!NOTE] -> If a drop-down control is automatically generated, which means that items are added to the collection, and you then set the property to an explicit drop-down control, you might lose data. - - - -## Examples - The following code example demonstrates how to assign a control to a control's property. This code example is part of a larger example provided for the class. - +> If a drop-down control is automatically generated, which means that items are added to the collection, and you then set the property to an explicit drop-down control, you might lose data. + + + +## Examples + The following code example demonstrates how to assign a control to a control's property. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet2"::: + ]]> @@ -460,19 +460,19 @@ Occurs when the closes. - event for multiple controls. This code example is part of a larger example provided for the class. - + event for multiple controls. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet5"::: + ]]> @@ -550,19 +550,19 @@ Occurs when the is clicked. - event for multiple controls. This code example is part of a larger example provided for the class. - + event for multiple controls. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet4"::: + ]]> @@ -598,19 +598,19 @@ Gets the collection of items in the that is associated with this . A of controls. - property to get all the items in the that is referred to by the property. - - - -## Examples - The following code example demonstrates how to use the property to create a menu with sub-menus. For the complete code example, see [How to: Display Option Buttons in a MenuStrip](/dotnet/framework/winforms/controls/how-to-display-option-buttons-in-a-menustrip-windows-forms). - + property to get all the items in the that is referred to by the property. + + + +## Examples + The following code example demonstrates how to use the property to create a menu with sub-menus. For the complete code example, see [How to: Display Option Buttons in a MenuStrip](/dotnet/framework/winforms/controls/how-to-display-option-buttons-in-a-menustrip-windows-forms). + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/DropDownItems/ToolStripRadioButtonMenuItem.cs" id="Snippet200"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolStripRadioButtonMenuItem/vb/ToolStripRadioButtonMenuItem.vb" id="Snippet200"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/ToolStripRadioButtonMenuItem/vb/ToolStripRadioButtonMenuItem.vb" id="Snippet200"::: + ]]> @@ -681,21 +681,21 @@ Occurs when the has opened. - method. You can use this event to dynamically populate the . - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to handle the event for multiple controls. This code example is part of a larger example provided for the class. - + method. You can use this event to dynamically populate the . + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to handle the event for multiple controls. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet3"::: + ]]> @@ -739,21 +739,21 @@ Occurs as the is opening. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripDropDownItem1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripDropDownItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet492"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet492"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet492"::: + ]]> @@ -823,14 +823,14 @@ if the has controls; otherwise, . - property to conditionally show a control. This code example is part of a larger example provided for the class. - + property to conditionally show a control. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet6"::: + ]]> @@ -860,19 +860,19 @@ Makes a visible hidden. - method to prevent the user from choosing one of the options available on the associated control. - - - -## Examples - The following code example demonstrates how to hide a control when a button is pressed. This code example is part of a larger example provided for the class. - + method to prevent the user from choosing one of the options available on the associated control. + + + +## Examples + The following code example demonstrates how to hide a control when a button is pressed. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet7"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet7"::: + ]]> @@ -932,13 +932,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -974,13 +974,13 @@ An that contains the event data. Raised in response to the method. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1016,13 +1016,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1058,13 +1058,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1100,13 +1100,13 @@ An that contains the event data. Raised in response to the method. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1142,13 +1142,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1257,13 +1257,13 @@ in all cases. - implementation of this method calls the of the if there are items in the collection. Otherwise, this implementation calls the base class implementation. - + implementation of this method calls the of the if there are items in the collection. Otherwise, this implementation calls the base class implementation. + ]]> @@ -1301,11 +1301,11 @@ if the key was processed by the item; otherwise, . - @@ -1344,19 +1344,19 @@ Displays the control associated with this . - method to display the drop-down controls that have been set by the property. - - - -## Examples - The following code example demonstrates how to show a control when a button is pressed. This code example is part of a larger example provided for the class. - + method to display the drop-down controls that have been set by the property. + + + +## Examples + The following code example demonstrates how to show a control when a button is pressed. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDownItem/Overview/Form1.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripDropDownItem/VB/Form1.vb" id="Snippet6"::: + ]]> The is the same as the parent . diff --git a/xml/System.Windows.Forms/ToolStripItem.xml b/xml/System.Windows.Forms/ToolStripItem.xml index 4c28605722c..5d7796063b1 100644 --- a/xml/System.Windows.Forms/ToolStripItem.xml +++ b/xml/System.Windows.Forms/ToolStripItem.xml @@ -72,36 +72,36 @@ Represents the abstract base class that manages events and layout for all the elements that a or can contain. - is an element such as a button, combo box, text box, or label that can be contained in a control or a control, which is similar to a Windows shortcut menu. The class manages the painting and keyboard and mouse input, including drag-and-drop input, for these elements, and the class manages events and layout within the elements themselves. - - classes either inherit directly from , or they inherit indirectly from through or . - - controls must be contained in a , , , or and cannot be added directly to a form. The various container classes are designed to contain an appropriate subset of controls. - - **Note** A given cannot have more than one parent . You must copy of the and add it to other controls. - - The following table shows the elements that derive from the class and which therefore can be hosted in a or . - -|Element|Description| -|-------------|-----------------| -||A toolbar button that supports images and text.| -||A text label typically used in a status bar or as a comment or title.| -||A non-selectable space or space with a vertical bar that visually groups elements.| -||A that hosts a , , , other Windows Forms controls, or custom controls.

A is a text box in which the user can enter text, along with a list from which the user can select text to fill the text box.

A enables the user to enter text.

A represents a Windows progress bar control contained in a .| -||A that hosts a , , and .

A is a selectable option displayed on a menu or context menu.

A is a combination of a regular button and a drop-down button.

A is a button that supports drop-down functionality.| -||A panel in a control.| - - - -## Examples - The following code example demonstrates how to implement a custom control. - + is an element such as a button, combo box, text box, or label that can be contained in a control or a control, which is similar to a Windows shortcut menu. The class manages the painting and keyboard and mouse input, including drag-and-drop input, for these elements, and the class manages events and layout within the elements themselves. + + classes either inherit directly from , or they inherit indirectly from through or . + + controls must be contained in a , , , or and cannot be added directly to a form. The various container classes are designed to contain an appropriate subset of controls. + + **Note** A given cannot have more than one parent . You must copy of the and add it to other controls. + + The following table shows the elements that derive from the class and which therefore can be hosted in a or . + +|Element|Description| +|-------------|-----------------| +||A toolbar button that supports images and text.| +||A text label typically used in a status bar or as a comment or title.| +||A non-selectable space or space with a vertical bar that visually groups elements.| +||A that hosts a , , , other Windows Forms controls, or custom controls.

A is a text box in which the user can enter text, along with a list from which the user can select text to fill the text box.

A enables the user to enter text.

A represents a Windows progress bar control contained in a .| +||A that hosts a , , and .

A is a selectable option displayed on a menu or context menu.

A is a combination of a regular button and a drop-down button.

A is a button that supports drop-down functionality.| +||A panel in a control.| + + + +## Examples + The following code example demonstrates how to implement a custom control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet1"::: + ]]>
@@ -269,15 +269,15 @@ Gets the assigned to the control. The assigned to the control; if no is currently assigned to the control, a new instance is created when this property is first accessed. - property, you must add a reference to the Accessibility assembly installed with the .NET Framework. - + property, you must add a reference to the Accessibility assembly installed with the .NET Framework. + For more information about accessible objects, see the [Active Accessibility](/windows/desktop/winauto/microsoft-active-accessibility) section of the documentation. - - For samples, see the class. - + + For samples, see the class. + ]]> @@ -328,26 +328,26 @@ Gets or sets the default action description of the control for use by accessibility client applications. The default action description of the control, for use by accessibility client applications. - property describes the object's primary method of manipulation from the user's viewpoint. This property should be a verb or a short verb phrase. - + property describes the object's primary method of manipulation from the user's viewpoint. This property should be a verb or a short verb phrase. + > [!NOTE] -> Not all objects have default actions, and some objects might have a default action that is related to its property, such as in the following examples: - -- A selected check box has a default action of "Uncheck" and a value of "Checked." - -- A cleared check box has a default action of "Check" and a value of "Unchecked." - -- A button labeled **Print** has a default action of "Press," with no value. - -- A label or a text box control that shows **Printer** has no default action, but would have a value of "Printer." - - For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). - - For samples, see the class. - +> Not all objects have default actions, and some objects might have a default action that is related to its property, such as in the following examples: + +- A selected check box has a default action of "Uncheck" and a value of "Checked." + +- A cleared check box has a default action of "Check" and a value of "Unchecked." + +- A button labeled **Print** has a default action of "Press," with no value. + +- A label or a text box control that shows **Printer** has no default action, but would have a value of "Printer." + + For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). + + For samples, see the class. + ]]> @@ -393,17 +393,17 @@ Gets or sets the description that will be reported to accessibility client applications. The description of the control used by accessibility client applications. The default is . - property provides a textual description about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but can also be used for context searching or other applications. - - The property is needed if the description is not obvious, or if it is not redundant based on the object's , , , and properties. For example, a button labeled **OK** would not need additional information, but a button that shows a picture of a cactus would. The and and, perhaps, properties for the cactus button would describe its purpose, but the property would convey information that is less tangible, such as "A button that shows a picture of a cactus." - - For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). - - For samples, see the class. - + property provides a textual description about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but can also be used for context searching or other applications. + + The property is needed if the description is not obvious, or if it is not redundant based on the object's , , , and properties. For example, a button labeled **OK** would not need additional information, but a button that shows a picture of a cactus would. The and and, perhaps, properties for the cactus button would describe its purpose, but the property would convey information that is less tangible, such as "A button that shows a picture of a cactus." + + For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). + + For samples, see the class. + ]]> @@ -450,15 +450,15 @@ Gets or sets the name of the control for use by accessibility client applications. The name of the control, for use by accessibility client applications. The default is . - property is a label that briefly describes and identifies the object within its container, such as the text in a , the name of a , or a label displayed next to a control. - - For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). - - For samples, see the class. - + property is a label that briefly describes and identifies the object within its container, such as the text in a , the name of a , or a label displayed next to a control. + + For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). + + For samples, see the class. + ]]> @@ -500,15 +500,15 @@ Gets or sets the accessible role of the control, which specifies the type of user interface element of the control. One of the values. The default is . - property describes what kind of user interface element an object is. If the control's role cannot be determined, the property is set to . - - For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). - - For samples, see the class. - + property describes what kind of user interface element an object is. If the control's role cannot be determined, the property is set to . + + For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). + + For samples, see the class. + ]]> The value assigned is not one of the values. @@ -555,26 +555,26 @@ Gets or sets a value indicating whether the item aligns towards the beginning or end of the . One of the values. The default is . - property along with the property to control the end to which items are aligned in a , or to determine the end to which they are already aligned. - - If the property is , items marked as are aligned to the left side of the and items marked are aligned to the right. - - If the property is , items marked as are aligned to the right side of the and items marked are aligned to the left. - + property along with the property to control the end to which items are aligned in a , or to determine the end to which they are already aligned. + + If the property is , items marked as are aligned to the left side of the and items marked are aligned to the right. + + If the property is , items marked as are aligned to the right side of the and items marked are aligned to the left. + > [!NOTE] -> In flow and table layouts, the property is ignored. In flow or table layout, use the or property to align the items within the row or table cell. - - - -## Examples - The following code example demonstrates how to set the property. This code example is part of a larger example provided for the class. - +> In flow and table layouts, the property is ignored. In flow or table layout, use the or property to align the items within the row or table cell. + + + +## Examples + The following code example demonstrates how to set the property. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: + ]]> The value assigned is not one of the values. @@ -620,23 +620,23 @@ if drag-and-drop operations are allowed in the control; otherwise, . The default is . - property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. - - Set the property to `false` and set the property to `true` to cause the class to handle drag-and-drop and item reordering privately. - - Setting both the and the properties to `true` throws an exception. - - - -## Examples - The following code example demonstrates how to set the property. This code example is part of a larger example provided for the class. - + property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. + + Set the property to `false` and set the property to `true` to cause the class to handle drag-and-drop and item reordering privately. + + Setting both the and the properties to `true` throws an exception. + + + +## Examples + The following code example demonstrates how to set the property. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: + ]]> @@ -682,14 +682,14 @@ Gets or sets the edges of the container to which a is bound and determines how a is resized with its parent. One of the values. - property to define how a is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized. - + property to define how a is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized. + > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. - +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. + ]]> The value is not one of the values. @@ -739,22 +739,22 @@ if the is automatically sized; otherwise, . The default value is . - property to `true` to cause the to adjust either its height or width, depending on the orientation of the , to ensure that the uses only the required amount of space. - - A has a minimum size if the property is `true`. Set the property to `false` if you want a to be smaller than the system-defined minimum size or to have a size of zero. - - - -## Examples - The following code example demonstrates how to set the , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. - + property to `true` to cause the to adjust either its height or width, depending on the orientation of the , to ensure that the uses only the required amount of space. + + A has a minimum size if the property is `true`. Set the property to `false` if you want a to be smaller than the system-defined minimum size or to have a size of zero. + + + +## Examples + The following code example demonstrates how to set the , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: + ]]>
@@ -791,22 +791,22 @@ to use the property for the ToolTip; otherwise, . The default is . - uses the property as the default source for the content. Set to `false` to use as the source for content. - - To use this property, you must also set to `true`. - - - -## Examples - The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. - + uses the property as the default source for the content. Set to `false` to use as the source for content. + + To use this property, you must also set to `true`. + + + +## Examples + The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: + ]]>
@@ -851,11 +851,11 @@ if the is placed on a ; otherwise, . - property is different from the property in that indicates whether the is shown, while indicates whether the and its parent are shown. Setting either or to `true` or `false` sets the other property to `true` or `false`. - + property is different from the property in that indicates whether the is shown, while indicates whether the and its parent are shown. Setting either or to `true` or `false` sets the other property to `true` or `false`. + ]]> @@ -891,21 +891,21 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet98"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet98"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet98"::: + ]]> @@ -935,21 +935,21 @@ Gets or sets the background color for the item. A that represents the background color of the item. The default is the value of the property. - property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. - - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a has the same as its parent by default. For more information about ambient properties, see the class or the class overview. - - - -## Examples - The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. - + property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. + + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a has the same as its parent by default. For more information about ambient properties, see the class or the class overview. + + + +## Examples + The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet21"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet21"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet21"::: + ]]> @@ -982,26 +982,26 @@ Occurs when the value of the property changes. - property is changed by either a programmatic modification or user interaction. - + property is changed by either a programmatic modification or user interaction. + > [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet99"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet99"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet99"::: + ]]> @@ -1042,16 +1042,16 @@ Gets or sets the background image displayed in the item. An that represents the image to display in the background of the item. - property to place a graphic image onto an item. - + property to place a graphic image onto an item. + > [!NOTE] -> Images with translucent or transparent colors are not supported by Windows Forms controls as background images. -> -> This property is not supported on child controls whose property is `true`. - +> Images with translucent or transparent colors are not supported by Windows Forms controls as background images. +> +> This property is not supported on child controls whose property is `true`. + ]]> @@ -1094,14 +1094,14 @@ Gets or sets the background image layout used for the . One of the values. The default value is . - property. This code example is part of a larger example provided for the class. - + property. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: + ]]> @@ -1141,13 +1141,13 @@ Gets the size and location of the item. A that represents the size and location of the . - property to determine the size and location of a . - - Unlike other controls, a has no property that enables you to set the upper-left corner of a relative to the upper-left corner of the . If you need to set the absolute position of a , you must override the and define a custom implementation of the method. - + property to determine the size and location of a . + + Unlike other controls, a has no property that enables you to set the upper-left corner of a relative to the upper-left corner of the . If you need to set the absolute position of a , you must override the and define a custom implementation of the method. + ]]> @@ -1214,22 +1214,22 @@ Occurs when the is clicked. - event passes an to its event handler, so it only indicates that a click has occurred. If you need more specific mouse information (button, number of clicks, wheel rotation, or location), use the and events which pass a to the event handler. - - A double-click is determined by the mouse settings of the user's operating system. The user can set the time between clicks of a mouse button that should be considered a double-click rather than two clicks. The event is raised every time a control is double-clicked. For example, if you have two event handlers for the and events of a , the and events are raised when the form is double-clicked and both methods are called. If an item is double-clicked that does not support the event, the event might be raised twice. - - - -## Examples - The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. - + event passes an to its event handler, so it only indicates that a click has occurred. If you need more specific mouse information (button, number of clicks, wheel rotation, or location), use the and events which pass a to the event handler. + + A double-click is determined by the mouse settings of the user's operating system. The user can set the time between clicks of a mouse button that should be considered a double-click rather than two clicks. The event is raised every time a control is double-clicked. For example, if you have two event handlers for the and events of a , the and events are raised when the form is double-clicked and both methods are called. If an item is double-clicked that does not support the event, the event might be raised twice. + + + +## Examples + The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: + ]]> @@ -1452,19 +1452,19 @@ Gets the area where content, such as text and icons, can be placed within a without overwriting background borders. A containing four integers that represent the location and size of contents, excluding its border. - property to do custom painting of a . - - - -## Examples - The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. - + property to do custom painting of a . + + + +## Examples + The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet13"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet13"::: + ]]> @@ -1587,11 +1587,11 @@ Gets the default margin of an item. A representing the margin. - property to configure a default margin for a . - + property to configure a default margin for a . + ]]> @@ -1627,11 +1627,11 @@ Gets the internal spacing characteristics of the item. One of the values. - property to configure a default size for a . This is more efficient than setting the size in the constructor of the . - + property to configure a default size for a . This is more efficient than setting the size in the constructor of the . + ]]> @@ -1661,11 +1661,11 @@ Gets the default size of the item. The default of the . - property represents the of the when it is initially created. If the property is `true`, the is sized automatically in accordance with the orientation. You can manually adjust the size of the by setting its property value to `false`. - + property represents the of the when it is initially created. If the property is `true`, the is sized automatically in accordance with the orientation. You can manually adjust the size of the by setting its property value to `false`. + ]]> @@ -1732,19 +1732,19 @@ Gets or sets whether text and images are displayed on a . One of the values. The default is . - to set the values of an item's Text and Image properties while displaying only what you want. This is typically used to change only the display style when showing the same item in a different context. - - - -## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. - + to set the values of an item's Text and Image properties while displaying only what you want. This is typically used to change only the display style when showing the same item in a different context. + + + +## Examples + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: + ]]> @@ -1774,25 +1774,25 @@ Occurs when the has changed. - [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet101"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet101"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet101"::: + ]]> @@ -1826,20 +1826,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding , be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -1878,18 +1878,18 @@ Gets or sets which borders are docked to its parent control and determines how a is resized with its parent. One of the values. The default is . - property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). - - A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. - + property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). + + A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. + > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. - +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. + ]]> The value assigned is not one of the values. @@ -1936,11 +1936,11 @@ Begins a drag-and-drop operation. One of the values. - , , or ), an object that implements , or an object that implements . - + , , or ), an object that implements , or an object that implements . + ]]> @@ -2027,21 +2027,21 @@ Occurs when the item is double-clicked with the mouse. - event is raised every time a control is double-clicked. For example, if you have two event handlers for the and events of a , the and events are raised when the form is double-clicked and both methods are called. If an item is double-clicked that does not support the event, the event might be raised twice. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + event is raised every time a control is double-clicked. For example, if you have two event handlers for the and events of a , the and events are raised when the form is double-clicked and both methods are called. If an item is double-clicked that does not support the event, the event might be raised twice. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet102"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet102"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet102"::: + ]]> @@ -2115,19 +2115,19 @@ Occurs when the user drags an item and the user releases the mouse button, indicating that the item should be dropped into this item. - and properties of the are in screen coordinates, not client coordinates. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. - + and properties of the are in screen coordinates, not client coordinates. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/VB/GridStrip.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/VB/GridStrip.vb" id="Snippet3"::: + ]]> @@ -2167,48 +2167,48 @@ Occurs when the user drags an item into the client area of this item. - event is raised when the user first drags the mouse cursor over the item during a drag-and-drop operation. - - The following remarks describe how and when events related to drag-and-drop operations are raised. - - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. - - If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. - - Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: - -- If the user moves out of a window, the event is raised. - -- If the mouse enters another item, the for that control is raised. - -- If the mouse moves but stays within the same item, the event is raised. - - If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . - - If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. - - The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: - -- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. - -- If the value of is , the event is raised. - + event is raised when the user first drags the mouse cursor over the item during a drag-and-drop operation. + + The following remarks describe how and when events related to drag-and-drop operations are raised. + + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + + If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. + + Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: + +- If the user moves out of a window, the event is raised. + +- If the mouse enters another item, the for that control is raised. + +- If the mouse moves but stays within the same item, the event is raised. + + If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . + + If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. + + The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: + +- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. + +- If the value of is , the event is raised. + > [!NOTE] -> The and properties of the are in screen coordinates, not client coordinates. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. - +> The and properties of the are in screen coordinates, not client coordinates. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/VB/GridStrip.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.GridStrip/VB/GridStrip.vb" id="Snippet3"::: + ]]> @@ -2248,45 +2248,45 @@ Occurs when the user drags an item and the mouse pointer is no longer over the client area of this item. - event is raised when the user drags the cursor out of the control or the user cancels the current drag-and-drop operation. - - The following remarks describe how and when events related to drag-and-drop operations are raised. - - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. - - If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. - - Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: - -- If the user moves out of a window, the event is raised. - -- If the mouse enters another item, the for that control is raised. - -- If the mouse moves but stays within the same item, the event is raised. - - If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . - - If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. - - The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: - -- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. - -- If the value of is , the event is raised. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + event is raised when the user drags the cursor out of the control or the user cancels the current drag-and-drop operation. + + The following remarks describe how and when events related to drag-and-drop operations are raised. + + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + + If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. + + Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: + +- If the user moves out of a window, the event is raised. + +- If the mouse enters another item, the for that control is raised. + +- If the mouse moves but stays within the same item, the event is raised. + + If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . + + If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. + + The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: + +- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. + +- If the value of is , the event is raised. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet106"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet106"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet106"::: + ]]> @@ -2326,45 +2326,45 @@ Occurs when the user drags an item over the client area of this item. - event is raised when the mouse cursor moves within the bounds of the control during a drag-and-drop operation. - - The following remarks describe how and when events related to drag-and-drop operations are raised. - - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. - - If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. - - Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: - -- If the user moves out of a window, the event is raised. - -- If the mouse enters another item, the for that control is raised. - -- If the mouse moves but stays within the same item, the event is raised. - - If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . - - If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. - - The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: - -- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. - -- If the value of is , the event is raised. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + event is raised when the mouse cursor moves within the bounds of the control during a drag-and-drop operation. + + The following remarks describe how and when events related to drag-and-drop operations are raised. + + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + + If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. + + Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: + +- If the user moves out of a window, the event is raised. + +- If the mouse enters another item, the for that control is raised. + +- If the mouse moves but stays within the same item, the event is raised. + + If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . + + If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. + + The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: + +- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. + +- If the value of is , the event is raised. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet105"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet105"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet105"::: + ]]> @@ -2432,26 +2432,26 @@ Occurs when the property value has changed. - property is changed by either a programmatic modification or user interaction. - + property is changed by either a programmatic modification or user interaction. + > [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet107"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet107"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet107"::: + ]]> @@ -2499,11 +2499,11 @@ Gets or sets the font of the text displayed by the item. The to apply to the text displayed by the . The default is the value of the property. - property to get or set the font that will be used by default for painting and text in the . - + property to get or set the font that will be used by default for painting and text in the . + ]]> @@ -2533,14 +2533,14 @@ Gets or sets the foreground color of the item. The foreground of the item. The default is the value of the property. - property for custom rendering. This code example is part of a larger example provided for the class. - + property for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: + ]]> @@ -2570,26 +2570,26 @@ Occurs when the property value changes. - property is changed by either a programmatic modification or through interaction. - + property is changed by either a programmatic modification or through interaction. + > [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet108"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet108"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet108"::: + ]]> @@ -2627,11 +2627,11 @@ Retrieves the that is the container of the current . A that is the container of the current . - is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. - + is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. + ]]> @@ -2702,45 +2702,45 @@ Occurs during a drag operation. - event is raised when a drag-and-drop operation is started. The event allows the source of a drag event to modify the appearance of the mouse pointer in order to give the user visual feedback during a drag-and-drop operation. - - The following remarks describe how and when events related to drag-and-drop operations are raised. - - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. - - If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. - - Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: - -- If the user moves out of a window, the event is raised. - -- If the mouse enters another item, the for that control is raised. - -- If the mouse moves but stays within the same item, the event is raised. - - If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . - - If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. - - The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: - -- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. - -- If the value of is , the event is raised. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + event is raised when a drag-and-drop operation is started. The event allows the source of a drag event to modify the appearance of the mouse pointer in order to give the user visual feedback during a drag-and-drop operation. + + The following remarks describe how and when events related to drag-and-drop operations are raised. + + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + + If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. + + Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: + +- If the user moves out of a window, the event is raised. + +- If the mouse enters another item, the for that control is raised. + +- If the mouse moves but stays within the same item, the event is raised. + + If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . + + If the value of is , the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. + + The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: + +- If the value of is , the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. + +- If the value of is , the event is raised. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet109"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet109"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet109"::: + ]]> @@ -2818,27 +2818,27 @@ Gets or sets the image that is displayed on a . The to be displayed. - , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - - If is `false` and is , neither image nor scaling occurs. - - - -## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. - + , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + + - If is `false` and is , neither image nor scaling occurs. + + + +## Examples + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: + ]]> @@ -2882,29 +2882,29 @@ Gets or sets the alignment of the image on a . One of the values. The default is . - property to get or set image alignment on a . Use the property to get or set text alignment on a . - - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - - If is `false` and is , neither image nor scaling occurs. - - - -## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. - + property to get or set image alignment on a . Use the property to get or set text alignment on a . + + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + + - If is `false` and is , neither image nor scaling occurs. + + + +## Examples + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: + ]]> The value assigned is not one of the values. @@ -2971,25 +2971,25 @@ Gets or sets the index value of the image that is displayed on the item. The zero-based index of the image in the that is displayed for the item. The default is -1, signifying that the image list is empty. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - - If is `false` and is , neither image nor scaling occurs. - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + + - If is `false` and is , neither image nor scaling occurs. + If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. - +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. + ]]> @@ -3063,30 +3063,30 @@ For example, consider a button control whose Gets or sets the key accessor for the image in the that is displayed on a . A string representing the key of the image. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - - If is `false` and is , neither image nor scaling occurs. - - - -## Examples - The following code example demonstrates how to set the property. This code example is part of a larger example provided for the class. - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + + - If is `false` and is , neither image nor scaling occurs. + + + +## Examples + The following code example demonstrates how to set the property. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet2"::: + ]]> @@ -3130,28 +3130,28 @@ If you set the property, t Gets or sets a value indicating whether an image on a is automatically resized to fit in a container. One of the values. The default is . - , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. - - Image scaling is determined by the interaction of properties in both and , as follows: - -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - - If is `false` and is , neither image nor scaling occurs. - - - -## Examples - The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. - + , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + + Image scaling is determined by the interaction of properties in both and , as follows: + +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. + + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + + - If is `false` and is , neither image nor scaling occurs. + + + +## Examples + The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: + ]]> @@ -3191,15 +3191,15 @@ If you set the property, t Gets or sets the color to treat as transparent in a image. One of the values. - , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. - + , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: + ]]> @@ -3238,14 +3238,14 @@ If you set the property, t Invalidates the entire surface of the and causes it to be redrawn. - method for custom rendering. This code example is part of a larger example provided for the class. - + method for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet15"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet15"::: + ]]> @@ -3344,11 +3344,11 @@ If you set the property, t if the character should be sent directly to the item and not preprocessed; otherwise, . - . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. - + . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. + ]]> @@ -3384,11 +3384,11 @@ If you set the property, t if the specified key is a regular input key; otherwise, . - method during window-message preprocessing to determine whether the specified key is a regular input key that should be sent directly to the or a special key (such as PAGE UP, PAGE DOWN, ENTER, ESC, TAB, or arrow keys) that should be preprocessed. In the latter case, the key is sent to the only if it is not consumed by the preprocessing phase. - + method during window-message preprocessing to determine whether the specified key is a regular input key that should be sent directly to the or a special key (such as PAGE UP, PAGE DOWN, ENTER, ESC, TAB, or arrow keys) that should be preprocessed. In the latter case, the key is sent to the only if it is not consumed by the preprocessing phase. + ]]> @@ -3427,14 +3427,14 @@ If you set the property, t if the container of the current is a ; otherwise, . - property. This code example is part of a larger example provided for the class. - + property. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: + ]]> @@ -3498,26 +3498,26 @@ If you set the property, t Occurs when the location of a is updated. - is updated by either a programmatic modification or through interaction. - + is updated by either a programmatic modification or through interaction. + > [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet110"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet110"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet110"::: + ]]> @@ -3614,19 +3614,19 @@ If you set the property, t Gets or sets the position of a merged item within the current . An integer representing the index of the merged item, if a match is found, or -1 if a match is not found. - property to get or set the index of a so that you can access it for menu-merging operations. - - - -## Examples - The following example uses the property to insert a merged in a specific location. This example is part of a larger example available in the class overview. - + property to get or set the index of a so that you can access it for menu-merging operations. + + + +## Examples + The following example uses the property to insert a merged in a specific location. This example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/MergeIndex/form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ContextMenuStripMerge/VB/form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ContextMenuStripMerge/VB/form1.vb" id="Snippet5"::: + ]]> @@ -3656,33 +3656,33 @@ If you set the property, t Occurs when the mouse pointer is over the item and a mouse button is pressed. - - -2. - -3. or - -4. - -5. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + + +2. + +3. or + +4. + +5. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet111"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet111"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet111"::: + ]]> @@ -3718,33 +3718,33 @@ If you set the property, t Occurs when the mouse pointer enters the item. - - -2. - -3. or - -4. - -5. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + + +2. + +3. or + +4. + +5. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet112"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet112"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet112"::: + ]]> @@ -3780,33 +3780,33 @@ If you set the property, t Occurs when the mouse pointer hovers over the item. - - -2. - -3. or - -4. - -5. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + + +2. + +3. or + +4. + +5. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet114"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet114"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet114"::: + ]]> @@ -3842,33 +3842,33 @@ If you set the property, t Occurs when the mouse pointer leaves the item. - - -2. - -3. or - -4. - -5. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + + +2. + +3. or + +4. + +5. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet113"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet113"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet113"::: + ]]> @@ -3904,33 +3904,33 @@ If you set the property, t Occurs when the mouse pointer is moved over the item. - - -2. - -3. or - -4. - -5. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + + +2. + +3. or + +4. + +5. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet115"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet115"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet115"::: + ]]> @@ -3966,33 +3966,33 @@ If you set the property, t Occurs when the mouse pointer is over the item and a mouse button is released. - - -2. - -3. or - -4. - -5. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + + +2. + +3. or + +4. + +5. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet116"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet116"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet116"::: + ]]> @@ -4039,11 +4039,11 @@ If you set the property, t Gets or sets the name of the item. A string representing the name. The default value is . - property can be used as a key into the . - + property can be used as a key into the . + ]]> @@ -4082,13 +4082,13 @@ If you set the property, t An that contains the event data. Raises the AvailableChanged event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4134,13 +4134,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4173,13 +4173,13 @@ If you set the property, t Occurs when the property changes. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4222,21 +4222,21 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet11"::: + ]]> @@ -4402,13 +4402,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4450,21 +4450,21 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet14"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet14"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet14"::: + ]]> @@ -4510,13 +4510,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4562,13 +4562,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4614,13 +4614,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4666,13 +4666,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4714,13 +4714,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4766,13 +4766,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4818,13 +4818,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4870,13 +4870,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4918,13 +4918,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4968,13 +4968,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5016,13 +5016,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5064,21 +5064,21 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet15"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet15"::: + ]]> @@ -5120,13 +5120,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5168,21 +5168,21 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet16"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet16"::: + ]]> @@ -5224,13 +5224,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5272,13 +5272,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5320,13 +5320,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5372,15 +5372,15 @@ If you set the property, t A that contains the event data. Raises the event when the property has changed on the parent of the . - method to notify inheritors of the property that the font has changed. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method to notify inheritors of the property that the font has changed. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5422,21 +5422,21 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - - - -## Examples - The following code example demonstrates how to override the method for custom rendering. This code example is part of a larger example provided for the class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + + + +## Examples + The following code example demonstrates how to override the method for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: + ]]> @@ -5482,13 +5482,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5527,13 +5527,13 @@ If you set the property, t The new parent of the item. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5575,13 +5575,13 @@ If you set the property, t An that contains the event data. Raises the event when the property value of the item's container changes. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5627,13 +5627,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5679,13 +5679,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5731,13 +5731,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5815,13 +5815,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5897,13 +5897,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5945,13 +5945,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -5994,20 +5994,20 @@ If you set the property, t Gets or sets whether the item is attached to the or or can float between the two. One of the values. The default is . - property in stack layouts. In flow and table layouts, the overflow button is not rendered, and therefore the property is ignored. - - - -## Examples - The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. - + property in stack layouts. In flow and table layouts, the overflow button is not rendered, and therefore the property is ignored. + + + +## Examples + The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: + ]]> The value assigned is not one of the values. @@ -6053,21 +6053,21 @@ If you set the property, t Gets or sets the owner of this item. The that owns or is to own the . - returns the whose Items collection contains the current . This is the best way to reference or other properties in the top-level without writing special code to handle overflow. - - The remains the same even if the item falls into the . The can be `null` for certain elements that are in the collection but not in the collection. - - - -## Examples - The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. - + returns the whose Items collection contains the current . This is the best way to reference or other properties in the top-level without writing special code to handle overflow. + + The remains the same even if the item falls into the . The can be `null` for certain elements that are in the collection but not in the collection. + + + +## Examples + The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet12"::: + ]]> @@ -6097,24 +6097,24 @@ If you set the property, t Occurs when the property changes. - [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet117"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet117"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet117"::: + ]]> @@ -6155,11 +6155,11 @@ If you set the property, t Gets the parent of this . The parent of this . - of an **Open** would typically be a **File**. - + of an **Open** would typically be a **File**. + ]]> @@ -6222,21 +6222,21 @@ If you set the property, t Occurs when the item is redrawn. - event. This report helps you to learn when the event occurs and can assist you in debugging. - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet118"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet118"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet118"::: + ]]> @@ -6285,13 +6285,13 @@ If you set the property, t Gets or sets the parent container of the . A that is the parent container of the . - is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. - - The parent raises paint events and so on, while the owner contains shared data such as image lists. Typically, the property is set by the layout manager on the . - + is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. + + The parent raises paint events and so on, while the owner contains shared data such as image lists. Typically, the property is set by the layout manager on the . + ]]> @@ -6358,19 +6358,19 @@ If you set the property, t Gets the current layout of the item. One of the values. - property in a event to determine whether an item was placed on the main , the overflow , or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main and its property was set to . - - - -## Examples - The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. - + property in a event to determine whether an item was placed on the main , the overflow , or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main and its property was set to . + + + +## Examples + The following code example demonstrates how to use the property for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet22"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet22"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet22"::: + ]]> @@ -6445,13 +6445,13 @@ If you set the property, t in all cases. - method returns `false` in all cases. - + method returns `false` in all cases. + ]]> @@ -6489,11 +6489,11 @@ If you set the property, t if the key was processed by the item; otherwise, . - event. This method is called only if the method indicates that the item is not processing the key. - + event. This method is called only if the method indicates that the item is not processing the key. + ]]> @@ -6531,13 +6531,13 @@ If you set the property, t in all cases. - control to call the method to determine whether the given character matches a mnemonic in the item's text. In this case, the method raises the event and returns `true`. - + control to call the method to determine whether the given character matches a mnemonic in the item's text. In this case, the method raises the event and returns `true`. + ]]> @@ -6567,23 +6567,23 @@ If you set the property, t Occurs when an accessibility client application invokes help for the . - class to allow users to invoke help on your accessible object by pressing the F1 key. Using the provides you with complete information in the object. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + class to allow users to invoke help on your accessible object by pressing the F1 key. Using the provides you with complete information in the object. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet120"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet120"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet120"::: + ]]> @@ -6623,45 +6623,45 @@ If you set the property, t Occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled. - event is raised when there is a change in the keyboard or mouse button state during a drag-and-drop operation. The event allows the drag source to determine whether the drag-and-drop operation should be canceled. - - The following remarks describe how and when events related to drag-and-drop operations are raised. - - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. - - If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. - - Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: - -- If the user moves out of a window, the event is raised. - -- If the mouse enters another item, the for that control is raised. - -- If the mouse moves but stays within the same item, the event is raised. - - If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . - - If the value of is `Continue`, the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. - - The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: - -- If the value of is `Drop`, the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. - -- If the value of is `Cancel`, the event is raised. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - + event is raised when there is a change in the keyboard or mouse button state during a drag-and-drop operation. The event allows the drag source to determine whether the drag-and-drop operation should be canceled. + + The following remarks describe how and when events related to drag-and-drop operations are raised. + + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + + If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. + + Changes in the mouse cursor position, keyboard state, and mouse button state are tracked in the following manner: + +- If the user moves out of a window, the event is raised. + +- If the mouse enters another item, the for that control is raised. + +- If the mouse moves but stays within the same item, the event is raised. + + If there is a change in the keyboard or mouse button state, the event is raised and determines whether to continue the drag, to drop the data, or to cancel the operation based on the value of the property of the event's . + + If the value of is `Continue`, the event is raised to continue the operation and the event is raised with the new effect so appropriate visual feedback can be set. For a list of valid drop effects, see the enumeration. + + The and events are paired so that as the mouse moves across the drop target, the user is given the most up-to-date feedback on the mouse's position, as follows: + +- If the value of is `Drop`, the drop effect value is returned to the source, so the source application can perform the appropriate operation on the source data; for example, cut the data if the operation was a move. + +- If the value of is `Cancel`, the event is raised. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet119"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet119"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet119"::: + ]]> @@ -6718,11 +6718,11 @@ If you set the property, t This method is not relevant to this class. - @@ -6758,11 +6758,11 @@ If you set the property, t This method is not relevant to this class. - @@ -6802,11 +6802,11 @@ If you set the property, t This method is not relevant to this class. - @@ -6842,11 +6842,11 @@ If you set the property, t This method is not relevant to this class. - @@ -6886,11 +6886,11 @@ If you set the property, t This method is not relevant to this class. - @@ -6926,11 +6926,11 @@ If you set the property, t This method is not relevant to this class. - @@ -6966,11 +6966,11 @@ If you set the property, t This method is not relevant to this class. - @@ -7010,11 +7010,11 @@ If you set the property, t This method is not relevant to this class. - @@ -7054,11 +7054,11 @@ If you set the property, t This method is not relevant to this class. - @@ -7133,14 +7133,14 @@ If you set the property, t to automatically mirror the image; otherwise, . The default is . - properties, including the property. - + properties, including the property. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/RightToLeftAutoMirrorImage/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripStatusLabel.CommonProps/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripStatusLabel.CommonProps/VB/form1.vb" id="Snippet1"::: + ]]> @@ -7170,25 +7170,25 @@ If you set the property, t Occurs when the property value changes. - [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet121"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet121"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet121"::: + ]]> @@ -7218,14 +7218,14 @@ If you set the property, t Selects the item. - method. This code example is part of a larger example provided for the class. - + method. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet3"::: + ]]> @@ -7266,14 +7266,14 @@ If you set the property, t if the is selected; otherwise, . - property for custom rendering. This code example is part of a larger example provided for the class. - + property for custom rendering. This code example is part of a larger example provided for the class. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet22"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet22"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.ToolStripItem/VB/Form1.vb" id="Snippet22"::: + ]]> @@ -7358,14 +7358,14 @@ If you set the property, t to make the visible; otherwise, . Sets the to the specified visible state. - [!NOTE] -> When overriding in a derived class, be sure to call the base class's method to force the visibility of the control to change. - +> When overriding in a derived class, be sure to call the base class's method to force the visibility of the control to change. + ]]> @@ -7396,11 +7396,11 @@ If you set the property, t to show shortcut keys; otherwise, . The default is . - @@ -7479,13 +7479,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -7534,13 +7534,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -7589,13 +7589,13 @@ If you set the property, t An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -7644,13 +7644,13 @@ If you set the property, t A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -7702,14 +7702,14 @@ If you set the property, t Gets or sets the object that contains data about the item. An that contains data about the control. The default is . - with its property set to an active link. - + with its property set to an active link. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripLabel/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripLabel/VB/form1.vb" id="Snippet1"::: + ]]> @@ -7750,22 +7750,22 @@ If you set the property, t Gets or sets the text that is to be displayed on the item. A string representing the item's text. The default value is the empty string (""). - uses the property as the default source for the content. Set to `false` to use as the source for content. - - - -## Examples - The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. - + uses the property as the default source for the content. Set to `false` to use as the source for content. + + + +## Examples + The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: + ]]> @@ -7809,19 +7809,19 @@ If you set the property, t Gets or sets the alignment of the text on a . One of the values. The default is . - property to get or set text alignment on a . Use the property to get or set image alignment on a . - - - -## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. - + property to get or set text alignment on a . Use the property to get or set image alignment on a . + + + +## Examples + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripButton/vb/Form1.vb" id="Snippet2"::: + ]]> The value assigned is not one of the values. @@ -7854,24 +7854,24 @@ If you set the property, t Occurs when the value of the property changes. - [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet122"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet122"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet122"::: + ]]> @@ -7901,15 +7901,15 @@ If you set the property, t Gets the orientation of text used on a . One of the values. - , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. - + , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet4"::: + ]]> @@ -7953,11 +7953,11 @@ If you set the property, t Gets or sets the position of text and image relative to each other. One of the values. The default is . - property to define or determine the relative placement of the image with respect to the text on a . Items that lack an image, text, or both are treated as special cases so that the does not display a blank spot for the missing element or elements. - + property to define or determine the relative placement of the image with respect to the text on a . Items that lack an image, text, or both are treated as special cases so that the does not display a blank spot for the missing element or elements. + ]]> @@ -8006,20 +8006,20 @@ If you set the property, t Gets or sets the text that appears as a for a control. A string representing the ToolTip text. - works only if is set to `true`. If is set to `true`, the property for the item is used as the . - - - -## Examples - The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. - + works only if is set to `true`. If is set to `true`, the property for the item is used as the . + + + +## Examples + The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/VB/form1.vb" id="Snippet20"::: + ]]> @@ -8122,24 +8122,24 @@ If you set the property, t Occurs when the value of the property changes. - [!NOTE] -> Changing the property of a does not raise the event. Raise this event with specific property settings. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. - +> Changing the property of a does not raise the event. Raise this event with specific property settings. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet123"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet123"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet123"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStripMenuItem.xml b/xml/System.Windows.Forms/ToolStripMenuItem.xml index b116a27fccf..1a76d9d6753 100644 --- a/xml/System.Windows.Forms/ToolStripMenuItem.xml +++ b/xml/System.Windows.Forms/ToolStripMenuItem.xml @@ -48,23 +48,23 @@ Represents a selectable option displayed on a or . - is a that works with and to handle the special highlighting, layout, and column arrangement for menus. - - In order for a to be displayed, you must add it to a or . - - The class provides properties that enable you to configure the appearance and functionality of a menu item. To display a check mark next to a menu item, use the property. Use this feature to identify a menu item that is selected in a list of mutually exclusive menu items. For example, if you have a set of menu items for setting the color of text in a control, use the property to identify which color is currently selected. Use the property to define a keyboard combination that can be pressed to select the menu item. - + is a that works with and to handle the special highlighting, layout, and column arrangement for menus. + + In order for a to be displayed, you must add it to a or . + + The class provides properties that enable you to configure the appearance and functionality of a menu item. To display a check mark next to a menu item, use the property. Use this feature to identify a menu item that is selected in a list of mutually exclusive menu items. For example, if you have a set of menu items for setting the color of text in a control, use the property to identify which color is currently selected. Use the property to define a keyboard combination that can be pressed to select the menu item. + replaces and extends the control, which was removed in .NET Core 3.1. -## Examples - The following code example adds a to the specified menu items of a . This code example is part of a larger example available in the class overview. - +## Examples + The following code example adds a to the specified menu items of a . This code example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/MergeIndex/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ContextMenuStripMerge/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ContextMenuStripMerge/VB/form1.vb" id="Snippet2"::: + ]]> MenuStrip Control (Windows Forms) @@ -135,11 +135,11 @@ The to display on the control. Initializes a new instance of the class that displays the specified . - constructor to create a that displays an image in the margin alongside the text. - + constructor to create a that displays an image in the margin alongside the text. + ]]> @@ -176,19 +176,19 @@ The text to display on the menu item. Initializes a new instance of the class that displays the specified text. - constructor to create a with the specified name. - - - -## Examples - The following code example demonstrates a use of the constructor. - + constructor to create a with the specified name. + + + +## Examples + The following code example demonstrates a use of the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet12"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet12"::: + ]]> @@ -227,11 +227,11 @@ The to display on the control. Initializes a new instance of the class that displays the specified text and image. - constructor to create a with the specified name and image. - + constructor to create a with the specified name and image. + ]]> @@ -272,19 +272,19 @@ An event handler that raises the event when the control is clicked. Initializes a new instance of the class that displays the specified text and image and that does the specified action when the is clicked. - to create a that displays both text and an image and that does the specified action when the is clicked. - - - -## Examples - The following code example demonstrates a use of the constructor. - + to create a that displays both text and an image and that does the specified action when the is clicked. + + + +## Examples + The following code example demonstrates a use of the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet12"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet12"::: + ]]> @@ -336,11 +336,11 @@ The menu items to display when the control is clicked. Initializes a new instance of the class that displays the specified text and image and that contains the specified collection. - constructor to create a that displays text and an image and that contains the specified collection. - + constructor to create a that displays text and an image and that contains the specified collection. + ]]> @@ -383,14 +383,14 @@ The name of the menu item. Initializes a new instance of the class with the specified name that displays the specified text and image that does the specified action when the is clicked. - constructor. - + constructor. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet40"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet40"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet40"::: + ]]> @@ -433,11 +433,11 @@ One of the values of that represents the shortcut key for the . Initializes a new instance of the class that displays the specified text and image, does the specified action when the is clicked, and displays the specified shortcut keys. - constructor to create a that displays text and an image, performs the specified action when clicked, and has the specified shortcut key. - + constructor to create a that displays text and an image, performs the specified action when clicked, and has the specified shortcut key. + ]]> @@ -482,19 +482,19 @@ if the is checked or is in an indeterminate state; otherwise, . The default is . - property returns `false` if and only if the is unchecked. - - Starting with the .NET Framework 4.5.2, when an item is checked or indeterminate, the corresponding icon may be resized. Resizing is determined by the system DPI setting when the app.config file contains the following entry: - -``` - - -``` - + property returns `false` if and only if the is unchecked. + + Starting with the .NET Framework 4.5.2, when an item is checked or indeterminate, the corresponding icon may be resized. Resizing is determined by the system DPI setting when the app.config file contains the following entry: + +``` + + +``` + ]]> @@ -541,21 +541,21 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripMenuItem1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripMenuItem1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet495"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet495"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet495"::: + ]]> @@ -644,19 +644,19 @@ Gets or sets a value indicating whether a is in the checked, unchecked, or indeterminate state. One of the values. The default is . - property to control or determine whether a is initially checked, unchecked, or in an indeterminate state. - - Starting with the .NET Framework 4.5.2, if the property is set to or , the corresponding icon may be resized. Resizing is determined by the system DPI setting when the app.config file contains the following entry: - -``` - - -``` - + property to control or determine whether a is initially checked, unchecked, or in an indeterminate state. + + Starting with the .NET Framework 4.5.2, if the property is set to or , the corresponding icon may be resized. Resizing is determined by the system DPI setting when the app.config file contains the following entry: + +``` + + +``` + ]]> The property is not set to one of the values. @@ -704,21 +704,21 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripMenuItem1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripMenuItem1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet496"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet496"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet496"::: + ]]> @@ -762,17 +762,17 @@ Creates a new accessibility object for the . A new for the . - method to create an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - - This code example is part of a complete code example that can be found at the class overview. - + method to create an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + + This code example is part of a complete code example that can be found at the class overview. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/VB/chartcontrol.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/VB/chartcontrol.vb" id="Snippet2"::: + ]]> @@ -811,11 +811,11 @@ Creates a generic for which events can be defined. A generic for which can be defined. - method is automatically called if the property finds no associated with the . - + method is automatically called if the property finds no associated with the . + ]]> @@ -905,11 +905,11 @@ Gets the default size of the . The of the , measured in pixels. The default is 100 pixels horizontally. - in derived classes to configure a default size for a . This is more efficient than setting the size in the control's constructor. - + in derived classes to configure a default size for a . This is more efficient than setting the size in the control's constructor. + ]]> @@ -943,20 +943,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -1020,11 +1020,11 @@ if the appears on a MDI window list; otherwise, . - must be specified by the property. - + must be specified by the property. + ]]> How To: Create an MDI Window List with MenuStrip (Windows Forms) @@ -1066,13 +1066,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1114,13 +1114,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1162,13 +1162,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1210,13 +1210,13 @@ An that contains the event data. Raised in response to the method. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1258,13 +1258,13 @@ An that contains the event data. Raised in response to the method. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1342,13 +1342,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1390,13 +1390,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1438,13 +1438,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1486,13 +1486,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1534,13 +1534,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1582,13 +1582,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1777,19 +1777,19 @@ Gets or sets the shortcut key text. A representing the shortcut key. - . This example is part of a larger example available in the class overview. - + . This example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/MergeIndex/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ContextMenuStripMerge/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ContextMenuStripMerge/VB/form1.vb" id="Snippet2"::: + ]]> @@ -1829,19 +1829,19 @@ Gets or sets the shortcut keys associated with the . One of the values. The default is . - property to assign a key combination to a menu command, such as CTRL+C for the **Copy** command. You can use shortcut keys instead of or in addition to access keys, which are underscored letters in menus or menu items used with the ALT key. Define access keys in code by typing an ampersand (&) before the letter you want to use for an access key. - - - -## Examples - The following code example demonstrates how to use the property to assign the key combination CTRL+P to a menu item called `printToolStripMenuItem`. For the complete example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/framework/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). - + property to assign a key combination to a menu command, such as CTRL+C for the **Copy** command. You can use shortcut keys instead of or in addition to access keys, which are underscored letters in menus or menu items used with the ALT key. Define access keys in code by typing an ampersand (&) before the letter you want to use for an access key. + + + +## Examples + The following code example demonstrates how to use the property to assign the key combination CTRL+P to a menu item called `printToolStripMenuItem`. For the complete example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/framework/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripMenuItem/ShortcutKeys/form1.cs" id="Snippet100"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.WebBrowser/VB/form1.vb" id="Snippet100"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.WebBrowser/VB/form1.vb" id="Snippet100"::: + ]]> The property was not set to one of the values. diff --git a/xml/System.Windows.Forms/ToolStripPanel.xml b/xml/System.Windows.Forms/ToolStripPanel.xml index 29b76c89c15..7633cc4fa7d 100644 --- a/xml/System.Windows.Forms/ToolStripPanel.xml +++ b/xml/System.Windows.Forms/ToolStripPanel.xml @@ -63,25 +63,25 @@ Creates a container within which other controls can share horizontal or vertical space. - to hold one or more , , or user-defined controls. - - You might find that one or more controls meet the needs of your application better than a if you do not need the four panels and the central . - - You can use only one panel if you so choose, and works well in Multiple Document Interface (MDI) scenarios. - - Each is expandable and collapsible. - - - -## Examples - The following code example demonstrates how to use controls with a multiple document interface (MDI). - + to hold one or more , , or user-defined controls. + + You might find that one or more controls meet the needs of your application better than a if you do not need the four panels and the central . + + You can use only one panel if you so choose, and works well in Multiple Document Interface (MDI) scenarios. + + Each is expandable and collapsible. + + + +## Examples + The following code example demonstrates how to use controls with a multiple document interface (MDI). + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet10"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet10"::: + ]]> ToolStripPanel Control @@ -152,11 +152,11 @@ if enabled; otherwise, . - @@ -201,11 +201,11 @@ if enabled; otherwise, . - @@ -250,11 +250,11 @@ if enabled; otherwise, . - @@ -299,11 +299,11 @@ if enabled; otherwise, . - @@ -393,21 +393,21 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripPanel1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripPanel1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet606"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet606"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet606"::: + ]]> @@ -588,20 +588,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -697,14 +697,14 @@ The to add to the . Adds the specified to a . - constructor. This example is part of a larger example available in the class overview. - + constructor. This example is part of a larger example available in the class overview. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip.Misc/VB/Program.vb" id="Snippet11"::: + ]]> How to: Join ToolStripPanels @@ -913,15 +913,15 @@ A that contains the event data. Raises the event. - method is called when a child control is added to the . - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method is called when a child control is added to the . + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -957,15 +957,15 @@ A that contains the event data. Raises the event. - is called when a child control is removed from the . - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + is called when a child control is removed from the . + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1001,13 +1001,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1043,13 +1043,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1152,13 +1152,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1194,13 +1194,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -1355,21 +1355,21 @@ Occurs when the value of the property changes. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripPanel1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripPanel1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet607"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet607"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet607"::: + ]]> @@ -1510,11 +1510,11 @@ This property is not relevant to this class. An representing the tab index. - @@ -1566,11 +1566,11 @@ This event is not relevant for this class. - @@ -1615,11 +1615,11 @@ if enabled; otherwise, . - @@ -1671,11 +1671,11 @@ This event is not relevant for this class. - @@ -1719,11 +1719,11 @@ This property is not relevant to this class. A representing the display text. - @@ -1775,11 +1775,11 @@ This event is not relevant for this class. - diff --git a/xml/System.Windows.Forms/ToolStripPanelRow.xml b/xml/System.Windows.Forms/ToolStripPanelRow.xml index 39f02d8ddea..f0abb8f6126 100644 --- a/xml/System.Windows.Forms/ToolStripPanelRow.xml +++ b/xml/System.Windows.Forms/ToolStripPanelRow.xml @@ -109,11 +109,11 @@ Gets the size and location of the , including its nonclient elements, in pixels, relative to the parent control. A representing the size and location. - property gets only the client elements of the control, the property gets the nonclient and client elements. - + property gets only the client elements of the control, the property gets the nonclient and client elements. + ]]> @@ -272,11 +272,11 @@ Gets the display area of the control. A representing the size and location. - property gets the nonclient and client elements, the property gets only the client elements of the control. - + property gets the nonclient and client elements, the property gets only the client elements of the control. + ]]> @@ -310,20 +310,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -417,13 +417,13 @@ The new value of the property. Occurs when the property changes. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -461,13 +461,13 @@ The zero-based index representing the position of the added control. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -505,13 +505,13 @@ The zero-based index representing the position of the removed control. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -547,13 +547,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -586,13 +586,13 @@ Occurs when the value of the property changes. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> diff --git a/xml/System.Windows.Forms/TreeView.xml b/xml/System.Windows.Forms/TreeView.xml index 84e267b7e08..01cec218d69 100644 --- a/xml/System.Windows.Forms/TreeView.xml +++ b/xml/System.Windows.Forms/TreeView.xml @@ -65,54 +65,54 @@ Displays a hierarchical collection of labeled items, each represented by a . - collection holds all the objects that are assigned to the control. The tree nodes in this collection are referred to as the root tree nodes. Any tree node that is subsequently added to a root tree node is referred to as a child node. Because each can contain a collection of other objects, you might find it difficult to determine your location in the tree structure when you iterate through the collection. You can parse the string by using the string value to determine where a label begins and ends. - - You can display images next to the tree nodes by assigning an to the property and referencing the index value of an in the to assign that . Use the following properties to assign images: - -- Set the property to the index value of the that you want to display when a tree node is not selected. - -- Set the property to the index value of the that you want to display when a tree node is selected. - - The images referenced by the and property values are the default images displayed by all the tree nodes that are assigned to the collection. Individual tree nodes can override the default images by setting the and properties. - - The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: - -```xml - - - - -``` - - Tree nodes can be expanded to display the next level of child tree nodes. The user can expand the by clicking the plus-sign (+) button, if one is displayed next to the , or you can expand the by calling the method. To expand all the child tree node levels in the collection, call the method. You can collapse the child level by calling the method, or the user can press the minus-sign (-) button, if one is displayed next to the . You can also call the method to alternate between the expanded and collapsed states. - - Tree nodes can optionally display check boxes. To display the check boxes, set the property of the to `true`. The property is set to `true` for tree nodes that are in a checked state. - + collection holds all the objects that are assigned to the control. The tree nodes in this collection are referred to as the root tree nodes. Any tree node that is subsequently added to a root tree node is referred to as a child node. Because each can contain a collection of other objects, you might find it difficult to determine your location in the tree structure when you iterate through the collection. You can parse the string by using the string value to determine where a label begins and ends. + + You can display images next to the tree nodes by assigning an to the property and referencing the index value of an in the to assign that . Use the following properties to assign images: + +- Set the property to the index value of the that you want to display when a tree node is not selected. + +- Set the property to the index value of the that you want to display when a tree node is selected. + + The images referenced by the and property values are the default images displayed by all the tree nodes that are assigned to the collection. Individual tree nodes can override the default images by setting the and properties. + + The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: + +```xml + + + + +``` + + Tree nodes can be expanded to display the next level of child tree nodes. The user can expand the by clicking the plus-sign (+) button, if one is displayed next to the , or you can expand the by calling the method. To expand all the child tree node levels in the collection, call the method. You can collapse the child level by calling the method, or the user can press the minus-sign (-) button, if one is displayed next to the . You can also call the method to alternate between the expanded and collapsed states. + + Tree nodes can optionally display check boxes. To display the check boxes, set the property of the to `true`. The property is set to `true` for tree nodes that are in a checked state. + > [!NOTE] -> Setting the property from within the or event causes the event to be raised multiple times and can result in unexpected behavior. For example, you might set the property in the event handler when you are recursively updating the child nodes so that the user does not have to expand and check each one individually. To prevent the event from being raised multiple times, add logic to your event handler that only executes your recursive code if the property of the is not set to . For an example of how to do this, see the Example section of the or events. - - You can change the appearance of the control by setting some of its display and style properties. Setting to `true` displays a plus-sign or minus-sign button next to each that can be expanded or collapsed, respectively. Setting the property to `true` causes the to display lines that join all the root tree nodes together. You can display lines that connect child tree nodes to their root node by setting the property to `true`. Setting the property to `true` changes the appearance of the tree node labels as the mouse pointer passes over them. When hot-tracked, the tree node labels take on the appearance of a hyperlink. You can also completely customize the appearance of the control. To do this, set the property to a value other than and handle the event. - +> Setting the property from within the or event causes the event to be raised multiple times and can result in unexpected behavior. For example, you might set the property in the event handler when you are recursively updating the child nodes so that the user does not have to expand and check each one individually. To prevent the event from being raised multiple times, add logic to your event handler that only executes your recursive code if the property of the is not set to . For an example of how to do this, see the Example section of the or events. + + You can change the appearance of the control by setting some of its display and style properties. Setting to `true` displays a plus-sign or minus-sign button next to each that can be expanded or collapsed, respectively. Setting the property to `true` causes the to display lines that join all the root tree nodes together. You can display lines that connect child tree nodes to their root node by setting the property to `true`. Setting the property to `true` changes the appearance of the tree node labels as the mouse pointer passes over them. When hot-tracked, the tree node labels take on the appearance of a hyperlink. You can also completely customize the appearance of the control. To do this, set the property to a value other than and handle the event. + > [!NOTE] -> When setting the , , , and properties at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . - - - -## Examples - The following code example demonstrates the use of the control. - +> When setting the , , , and properties at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . + + + +## Examples + The following code example demonstrates the use of the control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/Overview/form1.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewMisc/vb/form1.vb" id="Snippet10"::: - - The following, more complex code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewMisc/vb/form1.vb" id="Snippet10"::: + + The following, more complex code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: + ]]> @@ -140,17 +140,17 @@ Initializes a new instance of the class. - so that all the checked nodes are visible. First, all the nodes are expanded, and a handler is added for the event. Next, all the nodes are collapsed. The event handler determines whether a given node has child nodes that are checked. If a node has checked children, the collapse is canceled for that node. In order to allow standard node collapse when the minus sign next to a node is clicked, the event handler is then removed. - - This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - + so that all the checked nodes are visible. First, all the nodes are expanded, and a handler is added for the event. Next, all the nodes are collapsed. The event handler determines whether a given node has child nodes that are checked. If a node has checked children, the collapse is canceled for that node. In order to allow standard node collapse when the minus sign next to a node is clicked, the event handler is then removed. + + This behavior can also be implemented by handling the event, as illustrated in the example for that topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes2/CPP/treeviewshowcheckednodes2.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/.ctor/treeviewshowcheckednodes2.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes2/VB/treeviewshowcheckednodes2.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes2/VB/treeviewshowcheckednodes2.vb" id="Snippet1"::: + ]]> @@ -182,22 +182,22 @@ Occurs after the tree node check box is checked. - property from within a or event handler causes the event to be raised multiple times and can result in unexpected behavior. To prevent the event from being raised multiple times, add logic to your event handler that only executes your recursive code if the property of the is not set to . - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example updates all the child tree nodes of a when the user changes its checked state. This code requires that you have a with a that has objects in its . The should have tree nodes with child nodes. - + property from within a or event handler causes the event to be raised multiple times and can result in unexpected behavior. To prevent the event from being raised multiple times, add logic to your event handler that only executes your recursive code if the property of the is not set to . + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example updates all the child tree nodes of a when the user changes its checked state. This code requires that you have a with a that has objects in its . The should have tree nodes with child nodes. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/CPP/tn_checked.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/AfterCheck/tn_checked.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/VB/tn_checked.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/VB/tn_checked.vb" id="Snippet1"::: + ]]> @@ -232,20 +232,20 @@ Occurs after the tree node is collapsed. - when the user changes its checked state. This code requires that you have a with a that has objects in its . The should have tree nodes with child nodes. - + when the user changes its checked state. This code requires that you have a with a that has objects in its . The should have tree nodes with child nodes. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/CPP/tn_checked.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/AfterCheck/tn_checked.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/VB/tn_checked.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/VB/tn_checked.vb" id="Snippet1"::: + ]]> @@ -279,21 +279,21 @@ Occurs after the tree node is expanded. - event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet631"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet631"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet631"::: + ]]> @@ -327,20 +327,20 @@ Occurs after the tree node label text is edited. - . When the user right clicks the mouse, the at that position is determined and stored in a variable named `mySelectedNode`. If a nonroot tree node was selected, it is put into an editable state, which allows the user to edit the node label. After the user stops editing the tree node label, the new label text is evaluated and saved. For this example, several characters are considered not valid in the label text. If one of the invalid characters is in the label string, or the string is empty, the user is notified of the error and the label is returned to its previous text. - + . When the user right clicks the mouse, the at that position is determined and stored in a variable named `mySelectedNode`. If a nonroot tree node was selected, it is put into an editable state, which allows the user to edit the node label. After the user stops editing the tree node label, the new label text is evaluated and saved. For this example, several characters are considered not valid in the label text. If one of the invalid characters is in the label string, or the string is empty, the user is notified of the error and the label is returned to its previous text. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NodeLabelEditEventArgs/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -374,22 +374,22 @@ Occurs after the tree node is selected. - property. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to use the enumeration. To run this example, paste the following code in a form that contains a control named `TreeView1`. This example requires that `TreeView1` is populated with items and the event is connected to the event handler defined in the sample. - + property. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to use the enumeration. To run this example, paste the following code in a form that contains a control named `TreeView1`. This example requires that `TreeView1` is populated with items and the event is connected to the event handler defined in the sample. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet2"::: + ]]> @@ -465,11 +465,11 @@ Gets or set the background image for the control. The that is the background image for the control. - @@ -547,11 +547,11 @@ Gets or sets the layout of the background image for the control. One of the values. The default is . - @@ -619,24 +619,24 @@ Occurs before the tree node check box is checked. - [!NOTE] -> Setting the property from within the or event causes the event to be raised multiple times and can result in unexpected behavior. For example, you might set the property in the event handler when you are recursively updating the child nodes, so that the user does not have to expand and check each one individually. To prevent the event from being raised multiple times, add logic to your event handler that only executes your recursive code if the property of the is not set to . - - For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example updates all the child tree nodes of a when the user changes its checked state. This code requires that you have a with a that has objects in its . The should have tree nodes with child nodes. - +> Setting the property from within the or event causes the event to be raised multiple times and can result in unexpected behavior. For example, you might set the property in the event handler when you are recursively updating the child nodes, so that the user does not have to expand and check each one individually. To prevent the event from being raised multiple times, add logic to your event handler that only executes your recursive code if the property of the is not set to . + + For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example updates all the child tree nodes of a when the user changes its checked state. This code requires that you have a with a that has objects in its . The should have tree nodes with child nodes. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/CPP/tn_checked.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/AfterCheck/tn_checked.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/VB/tn_checked.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView.AfterCheck_BeforeCheck/VB/tn_checked.vb" id="Snippet1"::: + ]]> @@ -671,24 +671,24 @@ Occurs before the tree node is collapsed. - so that all the checked nodes are visible. First, all the nodes are expanded, and a handler is added for the event. Next, all the nodes are collapsed. The event handler determines whether a given node has child nodes that are checked. If a node has checked children, the collapse is canceled for that node. In order to allow standard node collapse when the minus sign next to a node is clicked, the event handler is then removed. - - This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - - For the complete example, see the constructor reference topic. - + so that all the checked nodes are visible. First, all the nodes are expanded, and a handler is added for the event. Next, all the nodes are collapsed. The event handler determines whether a given node has child nodes that are checked. If a node has checked children, the collapse is canceled for that node. In order to allow standard node collapse when the minus sign next to a node is clicked, the event handler is then removed. + + This behavior can also be implemented by handling the event, as illustrated in the example for that topic. + + For the complete example, see the constructor reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes2/CPP/treeviewshowcheckednodes2.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/.ctor/treeviewshowcheckednodes2.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes2/VB/treeviewshowcheckednodes2.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes2/VB/treeviewshowcheckednodes2.vb" id="Snippet2"::: + ]]> @@ -722,24 +722,24 @@ Occurs before the tree node is expanded. - so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added for the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow standard node expansion when the plus sign next to a node is clicked, the event handler is then removed. - - This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - - For the complete example, see the reference topic. - + so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added for the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow standard node expansion when the plus sign next to a node is clicked, the event handler is then removed. + + This behavior can also be implemented by handling the event, as illustrated in the example for that topic. + + For the complete example, see the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/CPP/treeviewshowcheckednodes1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/VB/treeviewshowcheckednodes1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/VB/treeviewshowcheckednodes1.vb" id="Snippet2"::: + ]]> @@ -773,23 +773,23 @@ Occurs before the tree node label text is edited. - and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. - + and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet2"::: -:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet2"::: - +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet2"::: + ]]> @@ -823,21 +823,21 @@ Occurs before the tree node is selected. - event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet635"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet635"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet635"::: + ]]> @@ -871,22 +871,22 @@ Disables any redrawing of the tree view. - , call the method. The method prevents the control from painting until the method is called. - - The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow the control to resume painting, call the method when all the tree nodes have been added to the tree view. - - - -## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . - + , call the method. The method prevents the control from painting until the method is called. + + The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow the control to resume painting, call the method when all the tree nodes have been added to the tree view. + + + +## Examples + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: + ]]> @@ -932,20 +932,20 @@ Gets or sets the border style of the tree view control. One of the values. The default is . - property is set to , the has a sunken, three-dimensional appearance. To display a flat, thin border around the control, set the property to . - - - -## Examples - The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. - + property is set to , the has a sunken, three-dimensional appearance. To display a flat, thin border around the control, set the property to . + + + +## Examples + The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet1"::: + ]]> The assigned value is not one of the values. @@ -985,27 +985,27 @@ if a check box is displayed next to each tree node in the tree view control; otherwise, . The default is . - , if any. Check boxes allow the user to select more than one tree node at a time. - - When the property of a is set to `true`, and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. However, the displayed images may be different if the following situation occurs: If the of the node is set to a value other than 0 or 1, and the property of the parent is set to `false`, the will not automatically reset to -1 to indicate it is not set. In this case, the state image at the indicated index position is shown. If is set to `true` again, the first and second images of the are shown to indicate a checked or unchecked state, respectively. - + , if any. Check boxes allow the user to select more than one tree node at a time. + + When the property of a is set to `true`, and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. However, the displayed images may be different if the following situation occurs: If the of the node is set to a value other than 0 or 1, and the property of the parent is set to `false`, the will not automatically reset to -1 to indicate it is not set. In this case, the state image at the indicated index position is shown. If is set to `true` again, the first and second images of the are shown to indicate a checked or unchecked state, respectively. + > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . - - - -## Examples - The following code example demonstrates how to change the collapse state of a so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added for the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow standard node expansion when the plus sign next to a node is clicked, the event handler is then removed. - - This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . + + + +## Examples + The following code example demonstrates how to change the collapse state of a so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added for the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow standard node expansion when the plus sign next to a node is clicked, the event handler is then removed. + + This behavior can also be implemented by handling the event, as illustrated in the example for that topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/CPP/treeviewshowcheckednodes1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/VB/treeviewshowcheckednodes1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/VB/treeviewshowcheckednodes1.vb" id="Snippet1"::: + ]]> @@ -1037,27 +1037,27 @@ Collapses all the tree nodes. - method collapses all the objects, which includes all the child tree nodes, that are in the control. - + method collapses all the objects, which includes all the child tree nodes, that are in the control. + > [!NOTE] -> The state of a persists. For example, suppose that you call the method for a root tree node. If the child tree nodes were not previously collapsed, they will appear in their previously-expanded state. Calling the method ensures that all the tree nodes appear in the collapsed state. - - - -## Examples - The following code example demonstrates how to change the collapse state of a so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added for the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow standard node expansion when the plus sign next to a node is clicked, the event handler is then removed. - - This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - - For the complete example, see the reference topic. - +> The state of a persists. For example, suppose that you call the method for a root tree node. If the child tree nodes were not previously collapsed, they will appear in their previously-expanded state. Calling the method ensures that all the tree nodes appear in the collapsed state. + + + +## Examples + The following code example demonstrates how to change the collapse state of a so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added for the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow standard node expansion when the plus sign next to a node is clicked, the event handler is then removed. + + This behavior can also be implemented by handling the event, as illustrated in the example for that topic. + + For the complete example, see the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/CPP/treeviewshowcheckednodes1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/VB/treeviewshowcheckednodes1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/VB/treeviewshowcheckednodes1.vb" id="Snippet2"::: + ]]> @@ -1220,20 +1220,20 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources used by the and optionally releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + + When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. + ]]> - can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -1269,11 +1269,11 @@ if the control uses a secondary buffer; otherwise, . - property does not affect the control. If you want to reduce flicker when the is drawn, use the and methods. - + property does not affect the control. If you want to reduce flicker when the is drawn, use the and methods. + ]]> @@ -1313,24 +1313,24 @@ Gets or sets the mode in which the control is drawn. One of the values. The default is . - are typically drawn by the operating system. The property lets you customize the appearance of the nodes. To do this, set to or and provide a handler for the event. This is called owner drawing. - - - -## Examples - The following code example demonstrates how to customize a control using owner drawing. The control in the example displays optional node tags alongside the standard node labels. Node tags are specified by using the property. The control also uses custom colors, which include a custom highlight color. - - You can customize most of the colors by setting color properties, but the selection highlight color is not available as a property. Additionally, the default selection highlight rectangle extends only around a node label. Owner drawing must be used to draw the node tags and to draw a customized highlight rectangle large enough to include a node tag. - - For the complete example, see the reference topic. - + are typically drawn by the operating system. The property lets you customize the appearance of the nodes. To do this, set to or and provide a handler for the event. This is called owner drawing. + + + +## Examples + The following code example demonstrates how to customize a control using owner drawing. The control in the example displays optional node tags alongside the standard node labels. Node tags are specified by using the property. The control also uses custom colors, which include a custom highlight color. + + You can customize most of the colors by setting color properties, but the selection highlight color is not available as a property. Additionally, the default selection highlight rectangle extends only around a node label. Owner drawing must be used to draw the node tags and to draw a customized highlight rectangle large enough to include a node tag. + + For the complete example, see the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewOwnerDraw/CPP/treeviewownerdraw.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawTreeNodeEventArgs/Overview/treeviewownerdraw.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewOwnerDraw/VB/treeviewownerdraw.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewOwnerDraw/VB/treeviewownerdraw.vb" id="Snippet2"::: + ]]> The property value is not a valid value. @@ -1363,39 +1363,39 @@ Occurs when a is drawn and the property is set to a value other than . - control using owner drawing. - - This event is raised only when the property is set to values of or . The following table indicates how the can be customized when the property is set to these values. - -|DrawMode property value|TreeNode customization| -|-----------------------------|----------------------------| -||The label area can be customized. All other elements are drawn automatically.| -||The appearance of the entire can be customized. Icons, check boxes, plus and minus signs, and lines connecting the nodes must be drawn manually if they are desired.| - - The region that the value would occupy if it were drawn using the font specified by the control's property is the region in which a node can be clicked to select it. This is called the hit test region. If you draw outside this region, you should provide your own code that selects a node when its visible area is clicked. - - The hit test region corresponds to the property when using . When using , however, the property encompasses the entire width of the . In this case, you can access the hit test region by getting the value and accessing its property. You can then draw the hit test region of the node within these bounds, or you can provide your own hit test code. Note that setting the property does not change the size of the hit test region, which is calculated using the font specified for the entire . - - For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to customize a control using owner drawing. The control in the example displays optional node tags alongside the standard node labels. Node tags are specified by using the property. The control also uses custom colors, which include a custom highlight color. - - You can customize most of the colors by setting color properties, but the selection highlight color is not available as a property. Additionally, the default selection highlight rectangle extends only around a node label. Owner drawing must be used to draw the node tags and to draw a customized highlight rectangle large enough to include a node tag. - - In the example, a handler for the event draws the node tags and the custom selection highlight manually. Unselected nodes do not need customization. For these, the property is set to `true` so that they will be drawn by the operating system. - - Additionally, a handler for the event provides hit-testing. By default, a node can be selected only by clicking the region around its label. The event handler selects a node that is clicked anywhere within this region or within the region around a node tag, if present. - + control using owner drawing. + + This event is raised only when the property is set to values of or . The following table indicates how the can be customized when the property is set to these values. + +|DrawMode property value|TreeNode customization| +|-----------------------------|----------------------------| +||The label area can be customized. All other elements are drawn automatically.| +||The appearance of the entire can be customized. Icons, check boxes, plus and minus signs, and lines connecting the nodes must be drawn manually if they are desired.| + + The region that the value would occupy if it were drawn using the font specified by the control's property is the region in which a node can be clicked to select it. This is called the hit test region. If you draw outside this region, you should provide your own code that selects a node when its visible area is clicked. + + The hit test region corresponds to the property when using . When using , however, the property encompasses the entire width of the . In this case, you can access the hit test region by getting the value and accessing its property. You can then draw the hit test region of the node within these bounds, or you can provide your own hit test code. Note that setting the property does not change the size of the hit test region, which is calculated using the font specified for the entire . + + For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to customize a control using owner drawing. The control in the example displays optional node tags alongside the standard node labels. Node tags are specified by using the property. The control also uses custom colors, which include a custom highlight color. + + You can customize most of the colors by setting color properties, but the selection highlight color is not available as a property. Additionally, the default selection highlight rectangle extends only around a node label. Owner drawing must be used to draw the node tags and to draw a customized highlight rectangle large enough to include a node tag. + + In the example, a handler for the event draws the node tags and the custom selection highlight manually. Unselected nodes do not need customization. For these, the property is set to `true` so that they will be drawn by the operating system. + + Additionally, a handler for the event provides hit-testing. By default, a node can be selected only by clicking the region around its label. The event handler selects a node that is clicked anywhere within this region or within the region around a node tag, if present. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewOwnerDraw/CPP/treeviewownerdraw.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawTreeNodeEventArgs/Overview/treeviewownerdraw.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewOwnerDraw/VB/treeviewownerdraw.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewOwnerDraw/VB/treeviewownerdraw.vb" id="Snippet1"::: + ]]> @@ -1430,22 +1430,22 @@ Enables the redrawing of the tree view. - , call the method. The method prevents the control from painting until the method is called. - - The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow control the control to resume painting, call the method when all the tree nodes have been added to the tree view. - - - -## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . - + , call the method. The method prevents the control from painting until the method is called. + + The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow control the control to resume painting, call the method when all the tree nodes have been added to the tree view. + + + +## Examples + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: + ]]> @@ -1477,23 +1477,23 @@ Expands all the tree nodes. - method expands all the objects, which includes all the child tree nodes, that are in the control. - + method expands all the objects, which includes all the child tree nodes, that are in the control. + > [!NOTE] -> The state of a persists. For example, suppose that you call the method, and then the individual root tree nodes are collapsed. The child tree nodes have not been collapsed, and will appear in their previously-expanded state when the root tree nodes are expanded again. Calling the method ensures that all the tree nodes appear in the collapsed state. - - - -## Examples - The following code example expands all the tree nodes in a control when a is checked, and collapses the when the is cleared. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). - +> The state of a persists. For example, suppose that you call the method, and then the individual root tree nodes are collapsed. The child tree nodes have not been collapsed, and will appear in their previously-expanded state when the root tree nodes are expanded again. Calling the method ensures that all the tree nodes appear in the collapsed state. + + + +## Examples + The following code example expands all the tree nodes in a control when a is checked, and collapses the when the is cleared. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet1"::: + ]]> @@ -1562,22 +1562,22 @@ if the selection highlight spans the width of the tree view control; otherwise, . The default is . - is `true`, a selection highlight spans the entire width of the tree view, display instead of the width of just the tree node label. The property is ignored if is set to `true`. - - - -## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. - - A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. - + is `true`, a selection highlight spans the entire width of the tree view, display instead of the width of just the tree node label. The property is ignored if is set to `true`. + + + +## Examples + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. + + A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewCustomization/CPP/treeviewcustomization.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/FullRowSelect/treeviewcustomization.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: + ]]> @@ -1670,11 +1670,11 @@ Retrieves the tree node that is at the specified point. The at the specified point, in tree view (client) coordinates, or if there is no node at that location. - and coordinates of the event as the and values of a new . - + and coordinates of the event as the and values of a new . + ]]> @@ -1713,20 +1713,20 @@ Retrieves the tree node at the point with the specified coordinates. The at the specified location, in tree view (client) coordinates, or if there is no node at that location. - and coordinates of the event as the `x` and `y` parameters. - - - -## Examples - The following code example lets the user edit nonroot tree nodes by using a . When the user right clicks the mouse, the at that position is determined and stored in a variable named `mySelectedNode`. If a nonroot tree node was selected, it is put into an editable state, which allows the user to edit the node label. After the user stops editing the tree node label, the new label text is evaluated and saved. For this example, several characters are considered not valid in the label text. If one of the invalid characters is in the label string, or the string is empty, the user is notified of the error and the label is returned to its previous text. - + and coordinates of the event as the `x` and `y` parameters. + + + +## Examples + The following code example lets the user edit nonroot tree nodes by using a . When the user right clicks the mouse, the at that position is determined and stored in a variable named `mySelectedNode`. If a nonroot tree node was selected, it is put into an editable state, which allows the user to edit the node label. After the user stops editing the tree node label, the new label text is evaluated and saved. For this example, several characters are considered not valid in the label text. If one of the invalid characters is in the label string, or the string is empty, the user is notified of the error and the label is returned to its previous text. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NodeLabelEditEventArgs/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -1763,20 +1763,20 @@ Retrieves the number of tree nodes, optionally including those in all subtrees, assigned to the tree view control. The number of tree nodes, optionally including those in all subtrees, assigned to the tree view control. - property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). - + property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet2"::: + ]]> @@ -1815,23 +1815,23 @@ if the selected tree node is not highlighted when the tree view has lost the focus; otherwise, . The default is . - control remain highlighted in a different color than the current selection color when the control loses focus. You can use this property to keep items that are selected by the user visible when the user clicks a different control on the form or moves to a different window. - + control remain highlighted in a different color than the current selection color when the control loses focus. You can use this property to keep items that are selected by the user visible when the user clicks a different control on the form or moves to a different window. + > [!NOTE] -> If you are concerned with the accessibility of your applications, it is recommended that you set the property to `false`. - - - -## Examples - The following code example demonstrates how to use the property. To run this example, paste the following code in a form and call the `InitializeSelectedTreeView` method in the form's constructor or event handler. - +> If you are concerned with the accessibility of your applications, it is recommended that you set the property to `false`. + + + +## Examples + The following code example demonstrates how to use the property. To run this example, paste the following code in a form and call the `InitializeSelectedTreeView` method in the form's constructor or event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet2"::: + ]]> @@ -1881,11 +1881,11 @@ Provides node information, given a point. The node information. - and where within the node the point is located, such as on the label or image area. - + and where within the node the point is located, such as on the label or image area. + ]]> @@ -1927,20 +1927,20 @@ Provides node information, given x- and y-coordinates. The node information. - and where within the node the point is located, such as on the label or image area. - - - -## Examples - The following code example code demonstrates how to use the , , and members. To run this example, create a Windows Form that contains a named `treeView1` and populate it with several levels of nodes. Paste the following code into the form and associate the event of `treeView1` with the `treeView1_MouseDown` method in this example. - + and where within the node the point is located, such as on the label or image area. + + + +## Examples + The following code example code demonstrates how to use the , , and members. To run this example, create a Windows Form that contains a named `treeView1` and populate it with several levels of nodes. Paste the following code into the form and associate the event of `treeView1` with the `treeView1_MouseDown` method in this example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/cpp/Form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet3"::: + ]]> @@ -1978,25 +1978,25 @@ if a tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it; otherwise, . The default is . - property is set to `true`, the property has no effect. - + property is set to `true`, the property has no effect. + > [!NOTE] -> When the property is set to `true`, each tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it. The font style is applied to the and the is set to blue to make the label appear as a link. The appearance is not controlled by the Internet settings of the user's operating system. - - - -## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. - - A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. - +> When the property is set to `true`, each tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it. The font style is applied to the and the is set to blue to make the label appear as a link. The appearance is not controlled by the Internet settings of the user's operating system. + + + +## Examples + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + + A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewCustomization/CPP/treeviewcustomization.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/FullRowSelect/treeviewcustomization.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: + ]]> @@ -2069,26 +2069,26 @@ Gets or sets the image-list index value of the default image that is displayed by the tree nodes. A zero-based index that represents the position of an in an . The default is zero. - value is the index of an stored in the assigned to the property. - + value is the index of an stored in the assigned to the property. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . - - - -## Examples - The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that are displayed when in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. It is also assumed that the `Customer` and `Order` objects are defined. - +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . + + + +## Examples + The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that are displayed when in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. It is also assumed that the `Customer` and `Order` objects are defined. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_TreeNode/CPP/treenode_treenode.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_treenode.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_TreeNode/VB/treenode_treenode.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_TreeNode/VB/treenode_treenode.vb" id="Snippet1"::: + ]]> The specified index is less than 0. @@ -2161,15 +2161,15 @@ If you set the property, the Gets or sets the key of the default image for each node in the control when it is in an unselected state. The key of the default image shown for each node control when the node is in an unselected state. - property is case-insensitive. - - If a does not have an image set, the image specified by the property will be shown when the node is not selected. When the node is selected, the first item in the will be shown. - + property is case-insensitive. + + If a does not have an image set, the image specified by the property will be shown when the node is not selected. When the node is selected, the first item in the will be shown. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -2216,23 +2216,23 @@ If you set the property, the Gets or sets the that contains the objects that are used by the tree nodes. The that contains the objects that are used by the tree nodes. The default value is . - property value is anything other than `null`, all the tree nodes display the first stored in the . You can specify which images from the list are displayed for selected and unselected nodes by setting the and properties. Individual objects can specify which image is displayed by setting their and properties. These individual settings will override the settings in the corresponding properties. - + property value is anything other than `null`, all the tree nodes display the first stored in the . You can specify which images from the list are displayed for selected and unselected nodes by setting the and properties. Individual objects can specify which image is displayed by setting their and properties. These individual settings will override the settings in the corresponding properties. + > [!NOTE] -> In the .NET Framework version 1.1, there is an issue that prevents images from appearing on nodes when your application calls . To work around this issue, call in your `Main` method immediately after you call . This issue is fixed in the .NET Framework 2.0. - - - -## Examples - The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that are displayed when in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. - +> In the .NET Framework version 1.1, there is an issue that prevents images from appearing on nodes when your application calls . To work around this issue, call in your `Main` method immediately after you call . This issue is fixed in the .NET Framework 2.0. + + + +## Examples + The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that are displayed when in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_TreeNode/CPP/treenode_treenode.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_treenode.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_TreeNode/VB/treenode_treenode.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_TreeNode/VB/treenode_treenode.vb" id="Snippet1"::: + ]]> @@ -2269,28 +2269,28 @@ If you set the property, the Gets or sets the distance to indent each child tree node level. The distance, in pixels, to indent each child tree node level. The default value is 19. - . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. - - A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. - + . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + + A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewCustomization/CPP/treeviewcustomization.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/FullRowSelect/treeviewcustomization.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: + ]]> - The assigned value is less than 0. - - -or- - + The assigned value is less than 0. + + -or- + The assigned value is greater than 32,000. @@ -2325,11 +2325,11 @@ If you set the property, the if the specified key is a regular input key; otherwise, . - control treats keys such as ENTER, ESC, HOME, and END as input keys. - + control treats keys such as ENTER, ESC, HOME, and END as input keys. + ]]> @@ -2360,20 +2360,20 @@ If you set the property, the Occurs when the user begins dragging a node. - control. In this example, any node can be dragged to another node that is not a descendant of the dragged node. The dragged node, which includes all its descendant nodes, becomes a child of the destination node. When the left mouse button is used, the dragged node is moved to the destination node. When the right mouse button is used, the dragged node is copied to the destination node. - + control. In this example, any node can be dragged to another node that is not a descendant of the dragged node. The dragged node, which includes all its descendant nodes, becomes a child of the destination node. When the left mouse button is used, the dragged node is moved to the destination node. When the right mouse button is used, the dragged node is copied to the destination node. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewDragDrop/CPP/treeviewdragdrop.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemDragEventArgs/Overview/treeviewdragdrop.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewDragDrop/VB/treeviewdragdrop.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewDragDrop/VB/treeviewdragdrop.vb" id="Snippet1"::: + ]]> @@ -2411,26 +2411,26 @@ If you set the property, the Gets or sets the height of each tree node in the tree view control. The height, in pixels, of each tree node in the tree view. - method will have unexpected results. - - - -## Examples - The following code example changes the size to the specified size and adjusts the of the tree node's parent control. This example requires that you have a with a control with a collection of objects, and a that contains font sizes. - + method will have unexpected results. + + + +## Examples + The following code example changes the size to the specified size and adjusts the of the tree node's parent control. This example requires that you have a with a control with a collection of objects, and a that contains font sizes. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_Bounds/VB/treenode_bounds.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_Bounds/VB/treenode_bounds.vb" id="Snippet2"::: + ]]> - The assigned value is less than one. - - -or- - + The assigned value is less than one. + + -or- + The assigned value is greater than the Int16.MaxValue value. @@ -2468,20 +2468,20 @@ If you set the property, the if the label text of the tree nodes can be edited; otherwise, . The default is . - method works only if the property is `true`. If is `false` when you attempt to edit the label, an exception will be thrown and the tree node will not be put in to an editable state. - - - -## Examples - The following code example lets the user edit nonroot tree nodes by using a . When the user right clicks the mouse, the at that position is determined and stored in a variable named `mySelectedNode`. If a nonroot tree node was selected, it is put into an editable state, which allows the user to edit the node label. After the user stops editing the tree node label, the new label text is evaluated and saved. For this example, several characters are considered not valid in the label text. If one of the invalid characters is in the label string, or the string is empty, the user is notified of the error and the label is returned to its previous text. - + method works only if the property is `true`. If is `false` when you attempt to edit the label, an exception will be thrown and the tree node will not be put in to an editable state. + + + +## Examples + The following code example lets the user edit nonroot tree nodes by using a . When the user right clicks the mouse, the at that position is determined and stored in a variable named `mySelectedNode`. If a nonroot tree node was selected, it is put into an editable state, which allows the user to edit the node label. After the user stops editing the tree node label, the new label text is evaluated and saved. For this example, several characters are considered not valid in the label text. If one of the invalid characters is in the label string, or the string is empty, the user is notified of the error and the label is returned to its previous text. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NodeLabelEditEventArgs/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/VB/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic TreeNode.BeginEdit Example/VB/source.vb" id="Snippet1"::: + ]]> @@ -2519,15 +2519,15 @@ If you set the property, the Gets or sets the color of the lines connecting the nodes of the control. The of the lines connecting the tree nodes. - line color. To run this example, paste the code into a Windows Form. Call `InitializeLineTreeView` from the form's constructor or event handler. - + line color. To run this example, paste the code into a Windows Form. Call `InitializeLineTreeView` from the form's constructor or event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/cpp/Form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet2"::: + ]]> @@ -2557,22 +2557,22 @@ If you set the property, the Occurs when the user clicks a with the mouse. - event. - + event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/cpp/Form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet4"::: + ]]> @@ -2603,22 +2603,22 @@ If you set the property, the Occurs when the user double-clicks a with the mouse. - event and how to use the . To run this example, paste the code into a Windows Form that contains a named `treeView1`. Populate `treeView1` with the names of files located in the `c:\` directory of the system the sample is running on, and associate the event of `treeView1` with the `treeView1_NodeMouseDoubleClick` method in this example. This example requires that the user has administrator privileges on the machine running the example. - + event and how to use the . To run this example, paste the code into a Windows Form that contains a named `treeView1`. Populate `treeView1` with the names of files located in the `c:\` directory of the system the sample is running on, and associate the event of `treeView1` with the `treeView1_NodeMouseDoubleClick` method in this example. This example requires that the user has administrator privileges on the machine running the example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/cpp/Form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet5"::: + ]]> @@ -2649,23 +2649,23 @@ If you set the property, the Occurs when the mouse hovers over a . - , the event will occur before the event. - - For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. - + , the event will occur before the event. + + For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet634"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet634"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet634"::: + ]]> @@ -2718,20 +2718,20 @@ If you set the property, the Gets the collection of tree nodes that are assigned to the tree view control. A that represents the tree nodes assigned to the tree view control. - property holds a collection of objects, each of which has a property that can contain its own . This nesting of tree nodes can make it difficult to navigate a tree structure, but the property makes it easier to determine your location within the tree structure. - - - -## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . - + property holds a collection of objects, each of which has a property that can contain its own . This nesting of tree nodes can make it difficult to navigate a tree structure, but the property makes it easier to determine your location within the tree structure. + + + +## Examples + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeView/VB/treeview.vb" id="Snippet1"::: + ]]> @@ -2773,13 +2773,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2829,13 +2829,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2881,13 +2881,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2933,13 +2933,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -2985,13 +2985,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3037,13 +3037,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3093,13 +3093,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3145,13 +3145,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3197,13 +3197,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3249,13 +3249,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3300,13 +3300,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3384,13 +3384,13 @@ If you set the property, the An that contains the event data. Overrides . - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3433,13 +3433,13 @@ If you set the property, the An that contains the event data. Overrides . - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3482,13 +3482,13 @@ If you set the property, the An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3532,15 +3532,15 @@ If you set the property, the A that contains the event data. Raises the event. - property is set to `true` and the property is set to `false`, the method switches between selecting and clearing the check box when the user presses the SPACEBAR. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + property is set to `true` and the property is set to `false`, the method switches between selecting and clearing the check box when the user presses the SPACEBAR. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3583,15 +3583,15 @@ If you set the property, the A that contains the event data. Raises the event. - property is set to `false`, the control will select the first item that begins with the value of the property of `e`. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + property is set to `false`, the control will select the first item that begins with the value of the property of `e`. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3634,13 +3634,13 @@ If you set the property, the A that contains the event data. Overrides . - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3715,15 +3715,15 @@ If you set the property, the An that contains the event data. Raises the event. - method performs a hit test to see whether the mouse is located over a , and if it is, raises the event. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method performs a hit test to see whether the mouse is located over a , and if it is, raises the event. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3765,13 +3765,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3813,13 +3813,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3861,13 +3861,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3909,13 +3909,13 @@ If you set the property, the The that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -3961,13 +3961,13 @@ If you set the property, the A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -4014,11 +4014,11 @@ If you set the property, the Gets or sets the spacing between the control's contents and its edges. A indicating the space between the control edges and its contents. - @@ -4150,20 +4150,20 @@ If you set the property, the Gets or sets the delimiter string that the tree node path uses. The delimiter string that the tree node property uses. The default is the backslash character (\\). - delimiter strings. The labels range from the root tree node to the tree node that you want. - - - -## Examples - The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). - + delimiter strings. The labels range from the root tree node to the tree node that you want. + + + +## Examples + The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet2"::: + ]]> @@ -4209,11 +4209,11 @@ If you set the property, the if the control should be laid out from right-to-left; otherwise, . The default is . - property is for use with international applications where the language is read from right-to-left. If you set and to `true` the control's contents and text will be laid out from right-to-left. - + property is for use with international applications where the language is read from right-to-left. If you set and to `true` the control's contents and text will be laid out from right-to-left. + ]]> @@ -4243,21 +4243,21 @@ If you set the property, the Occurs when the value of the property changes. - event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet639"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet639"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet639"::: + ]]> @@ -4295,23 +4295,23 @@ If you set the property, the if the tree view control displays scroll bars when they are needed; otherwise, . The default is . - when any is located outside the control's client region. - + when any is located outside the control's client region. + > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . - - - -## Examples - The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. - +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . + + + +## Examples + The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -4380,25 +4380,25 @@ If you set the property, the Gets or sets the image list index value of the image that is displayed when a tree node is selected. A zero-based index value that represents the position of an in an . - value is the index of an stored in the assigned to the property. - + value is the index of an stored in the assigned to the property. + > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . - +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - - -## Examples - The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that are displayed when in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. It is also assumed that the `Customer` and `Order` objects are defined. - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + + +## Examples + The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that are displayed when in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. It is also assumed that the `Customer` and `Order` objects are defined. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_TreeNode/CPP/treenode_treenode.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_treenode.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_TreeNode/VB/treenode_treenode.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_TreeNode/VB/treenode_treenode.vb" id="Snippet1"::: + ]]> @@ -4474,14 +4474,14 @@ If you set the property Gets or sets the key of the default image shown when a is in a selected state. The key of the default image shown when a is in a selected state. - does not have a selected image set, the image specified by the property will be shown when the node is not selected. - + does not have a selected image set, the image specified by the property will be shown when the node is not selected. + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + ]]> @@ -4523,24 +4523,24 @@ If you set the property Gets or sets the tree node that is currently selected in the tree view control. The that is currently selected in the tree view control. - is currently selected, the property is `null`. - - When you set this property, the specified node is scrolled into view and any parent nodes are expanded so that the specified node is visible. - - When the parent node or any ancestor node of the selected node is collapsed either programmatically or through user action, the collapsed node becomes the selected node. - - - -## Examples - The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). - + is currently selected, the property is `null`. + + When you set this property, the specified node is scrolled into view and any parent nodes are expanded so that the specified node is visible. + + When the parent node or any ancestor node of the selected node is collapsed either programmatically or through user action, the collapsed node becomes the selected node. + + + +## Examples + The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeNode_ForeColor/VB/treenode_forecolor.vb" id="Snippet2"::: + ]]> @@ -4579,22 +4579,22 @@ If you set the property if lines are drawn between tree nodes in the tree view control; otherwise, . The default is . - is set to `true`, the property is ignored. - - - -## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. - - A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. - + is set to `true`, the property is ignored. + + + +## Examples + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + + A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewCustomization/CPP/treeviewcustomization.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/FullRowSelect/treeviewcustomization.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: + ]]> @@ -4631,19 +4631,19 @@ If you set the property if ToolTips are shown when the mouse pointer hovers over a ; otherwise, . The default is . - for a . - - - -## Examples - The following code example demonstrates how to use the and properties. To run this example, paste the following code into a Windows Form and call `InitializeTreeViewWithToolTips` from the form's constructor or event handler. - + for a . + + + +## Examples + The following code example demonstrates how to use the and properties. To run this example, paste the following code into a Windows Form and call `InitializeTreeViewWithToolTips` from the form's constructor or event handler. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet7"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet7"::: + ]]> @@ -4682,22 +4682,22 @@ If you set the property if plus sign and minus sign buttons are displayed next to tree nodes that contain child tree nodes; otherwise, . The default is . - property value is `true`. If the plus sign and minus sign buttons are not displayed, no visual cue exists to indicate that the tree node contains child tree nodes and is expandable. The user then must double-click a tree node to determine whether it contains child tree nodes, to expand it, or to collapse it. - - - -## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. - - A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. - + property value is `true`. If the plus sign and minus sign buttons are not displayed, no visual cue exists to indicate that the tree node contains child tree nodes and is expandable. The user then must double-click a tree node to determine whether it contains child tree nodes, to expand it, or to collapse it. + + + +## Examples + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + + A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewCustomization/CPP/treeviewcustomization.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/FullRowSelect/treeviewcustomization.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/TreeViewCustomization/VB/treeviewcustomization.vb" id="Snippet2"::: + ]]> @@ -4736,20 +4736,20 @@ If you set the property if lines are drawn between the tree nodes that are at the root of the tree view; otherwise, . The default is . - property is `false`, the plus-sign and minus-sign buttons will not appear next to the root tree nodes, and the property will have no effect. - - - -## Examples - The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. - + property is `false`, the plus-sign and minus-sign buttons will not appear next to the root tree nodes, and the property will have no effect. + + + +## Examples + The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/VB/form1.vb" id="Snippet1"::: + ]]> @@ -4780,14 +4780,14 @@ If you set the property Sorts the items in control. - property. You can use this method if the text of existing nodes is changed or nodes are moved by the user, and you want to sort the items again. - + property. You can use this method if the text of existing nodes is changed or nodes are moved by the user, and you want to sort the items again. + > [!NOTE] -> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. - +> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. + ]]> @@ -4833,14 +4833,14 @@ If you set the property if the tree nodes in the tree view are sorted; otherwise, . The default is . - is set to `true`, the objects are sorted in alphabetical order by their property values. You should always use and to maintain performance when you add a large quantity of items to a sorted . When the text of an existing node is changed, you must call to resort the items. - + is set to `true`, the objects are sorted in alphabetical order by their property values. You should always use and to maintain performance when you add a large quantity of items to a sorted . When the text of an existing node is changed, you must call to resort the items. + > [!NOTE] -> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. - +> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. + ]]> @@ -4881,31 +4881,31 @@ If you set the property Gets or sets the image list that is used to indicate the state of the and its nodes. The used for indicating the state of the and its nodes. - , set the property and also set the or property for each . - - The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: - -``` - - - - -``` - - When the property of a is set to `true` and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. You should set the property before you add nodes to the to prevent state images being shown at design time for nodes that do not have a state image set. - - - -## Examples - The following code example demonstrates the property. To run this example, paste the code into a Windows Form and call `InitializeCheckTreeView` from the form's constructor or event handler. - + , set the property and also set the or property for each . + + The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: + +``` + + + + +``` + + When the property of a is set to `true` and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. You should set the property before you add nodes to the to prevent state images being shown at design time for nodes that do not have a state image set. + + + +## Examples + The following code example demonstrates the property. To run this example, paste the code into a Windows Form and call `InitializeCheckTreeView` from the form's constructor or event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/cpp/Form1.cpp" id="Snippet8"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet8"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet8"::: + ]]> @@ -4963,11 +4963,11 @@ If you set the property in all cases. - @@ -5051,26 +5051,26 @@ If you set the property Gets or sets the first fully-visible tree node in the tree view control. A that represents the first fully-visible tree node in the tree view control. - returns the first root tree node, which is located at the top of the . However, if the user has scrolled the contents, another tree node might be at the top. - + returns the first root tree node, which is located at the top of the . However, if the user has scrolled the contents, another tree node might be at the top. + > [!NOTE] -> Setting this property has no effect when the property value is `false`. - - - -## Examples - The following code example demonstrates how to use the and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. - +> Setting this property has no effect when the property value is `false`. + + + +## Examples + The following code example demonstrates how to use the and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet2"::: -:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet2"::: - +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/VB/form1.vb" id="Snippet2"::: + ]]> @@ -5152,25 +5152,25 @@ If you set the property Gets or sets the implementation of to perform a custom sort of the nodes. The to perform the custom sort. - is set. - - If a label is changed, you can call the method to sort the items again with the custom sorter specified by the property. - + is set. + + If a label is changed, you can call the method to sort the items again with the custom sorter specified by the property. + > [!NOTE] -> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. - - - -## Examples - The following code example demonstrates how to use the property to sort nodes from smallest to largest. To run this example, paste the following code into a Windows Form and call `InitializeTreeView1` from the form's constructor or event handler. - +> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. + + + +## Examples + The following code example demonstrates how to use the property to sort nodes from smallest to largest. To run this example, paste the following code into a Windows Form and call `InitializeTreeView1` from the form's constructor or event handler. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/cpp/Form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/VB/Form1.vb" id="Snippet1"::: + ]]> @@ -5212,11 +5212,11 @@ If you set the property Gets the number of tree nodes that can be fully visible in the tree view control. The number of items that can be fully visible in the control. - value can be greater than the number of tree nodes in the tree view. The value is calculated by dividing the height of the client window by the height of a tree node item. The result is the total number of objects that the can display within its current dimensions. - + value can be greater than the number of tree nodes in the tree view. The value is calculated by dividing the height of the client window by the height of a tree node item. The result is the total number of objects that the can display within its current dimensions. + ]]> diff --git a/xml/System.Windows.Interop/HwndSourceParameters.xml b/xml/System.Windows.Interop/HwndSourceParameters.xml index 10cbb74abe7..455bd9c008f 100644 --- a/xml/System.Windows.Interop/HwndSourceParameters.xml +++ b/xml/System.Windows.Interop/HwndSourceParameters.xml @@ -22,16 +22,16 @@ Contains the parameters that are used to create an object using the constructor. - object constructor call. - - The properties whose values are established by this structure are not directly exposed on instances when an is constructed. However, the values of the structure typically affect general UI properties such as "Height" and "Width" that might exist in specific hosted objects and their APIs. - + object constructor call. + + The properties whose values are established by this structure are not directly exposed on instances when an is constructed. However, the values of the structure typically affect general UI properties such as "Height" and "Width" that might exist in specific hosted objects and their APIs. + > [!IMPORTANT] -> Do not construct instances of this structure using the default (parameterless) constructor. An instance that is created by the parameterless constructor results in that cannot be assigned a (even though the property appears to be settable). If such an instance is applied as the parameters for an constructor, the resulting cannot display a window. - +> Do not construct instances of this structure using the default (parameterless) constructor. An instance that is created by the parameterless constructor results in that cannot be assigned a (even though the property appears to be settable). If such an instance is applied as the parameters for an constructor, the resulting cannot display a window. + ]]> @@ -45,13 +45,13 @@ Initializes a new instance of the class. Do not use the parameterless constructor for ; see Remarks. - [!IMPORTANT] -> Do not construct instances of this structure using the default (parameterless) constructor. An instance that is created by the parameterless constructor results in that cannot be assigned a (even though the property appears to be settable). If such an instance is applied as the parameters for an constructor, the resulting cannot display a window. - +> Do not construct instances of this structure using the default (parameterless) constructor. An instance that is created by the parameterless constructor results in that cannot be assigned a (even though the property appears to be settable). If such an instance is applied as the parameters for an constructor, the resulting cannot display a window. + ]]> @@ -113,11 +113,11 @@ The window's height, in pixels. Initializes a new instance of the class with a specified window name and initial size. - @@ -186,11 +186,11 @@ if the layout manager sizing logic should include the nonclient area; otherwise, . The default is . - class sets this parameter to `true` when using this structure internally, as part of its Win32 window-creation process. - + class sets this parameter to `true` when using this structure internally, as part of its Win32 window-creation process. + ]]> @@ -237,11 +237,11 @@ if the comparison is equal; otherwise, . - @@ -276,11 +276,11 @@ if the structures are equal; otherwise, . - @@ -318,7 +318,7 @@ Gets or sets the extended Microsoft Windows styles for the window. - The extended window styles. See [CreateWindowEx](/windows/win32/api/winuser/nf-winuser-createwindowexa) for a list of these styles. The default is 0 (no extended window styles). + The extended window styles. See CreateWindowEx for a list of these styles. The default is 0 (no extended window styles). To be added. @@ -349,11 +349,11 @@ Returns the hash code for this instance. A 32-bit signed integer hash code. - @@ -390,13 +390,13 @@ if the window size was assigned; otherwise, . The default is , unless the structure was created with provided height and width, in which case the value is . - or setting or all result in this property being `true`. - + or setting or all result in this property being `true`. + ]]> @@ -433,13 +433,13 @@ Gets or sets a value that indicates the height of the window. The height of the window, in device pixels. The default value is 1. - to `true`. - - Do not set to 0 (zero). Doing so incurs a significant performance penalty in rendering. - + to `true`. + + Do not set to 0 (zero). Doing so incurs a significant performance penalty in rendering. + ]]> @@ -481,11 +481,11 @@ Gets or sets the message hook for the window. The message hook for the window. - @@ -523,11 +523,11 @@ if the structures are equal; otherwise, . - method. - + method. + ]]> @@ -564,11 +564,11 @@ if the structures are not equal; otherwise, . - method and inverts the result. - + method and inverts the result. + ]]> @@ -711,11 +711,11 @@ Gets or sets how WPF handles restoring focus to the window. One of the enumeration values that specifies how WPF handles restoring focus for the window. The default is . - is set to . - + is set to . + ]]> @@ -783,13 +783,13 @@ The height of the window, in device pixels. Sets the values that are used for the window size of the . - to `true`. - - Do not pass 0 (zero) for either the `width` or `height` parameters. Although the method eventually succeeds even if you do pass 0, a substantial performance penalty occurs. - + to `true`. + + Do not pass 0 (zero) for either the `width` or `height` parameters. Although the method eventually succeeds even if you do pass 0, a substantial performance penalty occurs. + ]]> @@ -887,15 +887,15 @@ if using per-pixel opacity; otherwise, . - ). - - applies only to top-level windows. - + ). + + applies only to top-level windows. + ]]> @@ -959,13 +959,13 @@ Gets or sets a value that indicates the width of the window. The window width, in device pixels. The default value is 1. - to `true`. - - Do not set to 0 (zero). Doing so incurs a substantial performance penalty in rendering. - + to `true`. + + Do not set to 0 (zero). Doing so incurs a substantial performance penalty in rendering. + ]]> @@ -1004,7 +1004,7 @@ Gets or sets the Microsoft Windows class style for the window. - The window class style. See [Window Class Styles](https://go.microsoft.com/fwlink/?LinkId=178417) for detailed information. The default is 0 (no window class style). + The window class style. See Window Class Styles for detailed information. The default is 0 (no window class style). To be added. @@ -1044,13 +1044,13 @@ Gets or sets the name of the window. The window name. - [!IMPORTANT] -> Do not construct instances of this structure using the default (parameterless) constructor. An instance that is created by the parameterless constructor results in that cannot be assigned a (even though the property appears to be settable). If such an instance is applied as the parameters for an constructor, the resulting cannot display a window. - +> Do not construct instances of this structure using the default (parameterless) constructor. An instance that is created by the parameterless constructor results in that cannot be assigned a (even though the property appears to be settable). If such an instance is applied as the parameters for an constructor, the resulting cannot display a window. + ]]> @@ -1085,15 +1085,15 @@ Gets or sets the style for the window. - The window style. See the [CreateWindowEx](/windows/win32/api/winuser/nf-winuser-createwindowexa) function for a complete list of style bits. Defaults: WS_VISIBLE, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, WS_MAXIMIZEBOX, WS_CLIPCHILDREN. + The window style. See the CreateWindowEx function for a complete list of style bits. Defaults: WS_VISIBLE, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, WS_MAXIMIZEBOX, WS_CLIPCHILDREN. - diff --git a/xml/System.Windows.Markup/INameScope.xml b/xml/System.Windows.Markup/INameScope.xml index a4f80f7c71f..beb8733937b 100644 --- a/xml/System.Windows.Markup/INameScope.xml +++ b/xml/System.Windows.Markup/INameScope.xml @@ -37,18 +37,18 @@ Defines a contract for how names of elements should be accessed within a particular XAML namescope, and how to enforce uniqueness of names within that XAML namescope. - is in the System.Xaml assembly. For more information, see [Types Migrated from WPF to System.Xaml](/dotnet/framework/xaml-services/types-migrated-from-wpf-to-system-xaml). - -## WPF Usage Notes - This interface is implemented by the WPF class . Most XAML namescope operations in WPF operate by using instances, but information is occasionally communicated internally by using references. - - Examples of WPF classes that use a factory or defer metaphor combined with XAML representation are and . These implementations usually rely on the explicit versions of the interface methods available from the class. - + is in the System.Xaml assembly. For more information, see [Types Migrated from WPF to System.Xaml](/dotnet/framework/xaml-services/types-migrated-from-wpf-to-system-xaml). + +## WPF Usage Notes + This interface is implemented by the WPF class . Most XAML namescope operations in WPF operate by using instances, but information is occasionally communicated internally by using references. + + Examples of WPF classes that use a factory or defer metaphor combined with XAML representation are and . These implementations usually rely on the explicit versions of the interface methods available from the class. + ]]> @@ -88,11 +88,11 @@ Returns an object that has the provided identifying name. The object, if found. Returns if no object of that name was found. - @@ -132,17 +132,17 @@ The specific element that the provided refers to. Registers the provided name into the current XAML namescope. - - Do not permit duplicate names to be registered. If the input is already assigned to an existing element in the internal collection representation of the XAML namescope (even if it is the same as ), throw an exception. - - Also consider throwing an exception if the provided name does not conform to [XamlName Grammar](/dotnet/framework/xaml-services/xamlname-grammar). + Do not permit duplicate names to be registered. If the input is already assigned to an existing element in the internal collection representation of the XAML namescope (even if it is the same as ), throw an exception. + + Also consider throwing an exception if the provided name does not conform to XamlName Grammar. @@ -179,8 +179,8 @@ Unregisters the provided name from the current XAML namescope. To be added. - If the input name does not exist, throw an exception. - + If the input name does not exist, throw an exception. + You should remove the name and the previously registered element it refers to from the collection representation of the XAML namescope, so that the same name could potentially be registered again in the future. diff --git a/xml/System.Windows.Markup/MarkupExtension.xml b/xml/System.Windows.Markup/MarkupExtension.xml index 7936eaa110c..323c627d3d5 100644 --- a/xml/System.Windows.Markup/MarkupExtension.xml +++ b/xml/System.Windows.Markup/MarkupExtension.xml @@ -39,17 +39,17 @@ Provides a base class for XAML markup extension implementations that can be supported by .NET XAML Services and other XAML readers and XAML writers. - attributed. From the XAML type system perspective, this means that a XAML type or a XAML member has a value for its `TypeConverter` property. The invocation of a type converter is tied to the type or property definition, and is always invoked by XAML processing for these cases. In contrast, a markup extension is more under the control of user code and user-produced markup, and can be applied whenever an application scenario demands it. A markup extension can be invoked and can be used for setting different type-member values, so long as the markup extension's return type is assignable to that value. - - For information on creating a custom markup extension, see . For more information on markup extensions in general, see [Markup Extensions for XAML Overview](/dotnet/framework/xaml-services/markup-extensions-for-xaml-overview). If you are building on WPF and using or creating markup extensions for XAML, other relevant information can be found in the topic [Markup Extensions and WPF XAML](/dotnet/framework/wpf/advanced/markup-extensions-and-wpf-xaml). - - The method of each markup extension implementation can use an at run time that can provide context. This is then queried for specific services that pass information, such as or . For more information on service contexts for a markup extension, see [Service Contexts Available to Type Converters and Markup Extensions](/dotnet/framework/xaml-services/service-contexts-available-to-type-converters-and-markup-extensions). - - Derived classes should be attributed with to inform consumers of the most specific return type available from the markup extension's implementation. - + attributed. From the XAML type system perspective, this means that a XAML type or a XAML member has a value for its `TypeConverter` property. The invocation of a type converter is tied to the type or property definition, and is always invoked by XAML processing for these cases. In contrast, a markup extension is more under the control of user code and user-produced markup, and can be applied whenever an application scenario demands it. A markup extension can be invoked and can be used for setting different type-member values, so long as the markup extension's return type is assignable to that value. + + For information on creating a custom markup extension, see . For more information on markup extensions in general, see [Markup Extensions for XAML Overview](/dotnet/framework/xaml-services/markup-extensions-for-xaml-overview). If you are building on WPF and using or creating markup extensions for XAML, other relevant information can be found in the topic [Markup Extensions and WPF XAML](/dotnet/framework/wpf/advanced/markup-extensions-and-wpf-xaml). + + The method of each markup extension implementation can use an at run time that can provide context. This is then queried for specific services that pass information, such as or . For more information on service contexts for a markup extension, see [Service Contexts Available to Type Converters and Markup Extensions](/dotnet/framework/xaml-services/service-contexts-available-to-type-converters-and-markup-extensions). + + Derived classes should be attributed with to inform consumers of the most specific return type available from the markup extension's implementation. + ]]> Type Converters and Markup Extensions for XAML @@ -86,15 +86,15 @@ Initializes a new instance of a class derived from . - abstract class does not hold any private values that require initialization. - + abstract class does not hold any private values that require initialization. + ]]> - A functional markup extension should define its own public parameterless constructor. Additionally, the markup extension should implement constructors that are appropriate for the extension's intended capabilities and markup usage. For more information, see [Markup Extensions for XAML Overview](/dotnet/framework/xaml-services/markup-extensions-for-xaml-overview). + A functional markup extension should define its own public parameterless constructor. Additionally, the markup extension should implement constructors that are appropriate for the extension's intended capabilities and markup usage. For more information, see Markup Extensions for XAML Overview. @@ -130,51 +130,51 @@ When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension. The object value to set on the property where the extension is applied. - method of that markup extension and writes the result into the object graph or serialization stream. The XAML object writer passes service context to each such implementation through the `serviceProvider` parameter. - - See "Notes to Implementers" section for more information on how to implement in a custom markup extension. - -## WPF Usage Notes - + method of that markup extension and writes the result into the object graph or serialization stream. The XAML object writer passes service context to each such implementation through the `serviceProvider` parameter. + + See "Notes to Implementers" section for more information on how to implement in a custom markup extension. + +## WPF Usage Notes + > [!IMPORTANT] -> WPF classes that have specific interactions with markup set operations should not rely on for a .NET Framework 4 implementation. Use -attributed callbacks instead. - +> WPF classes that have specific interactions with markup set operations should not rely on for a .NET Framework 4 implementation. Use -attributed callbacks instead. + ]]> - Common services returned by the default service provider that is typically available to a custom or existing implementation include the following primary services. - -- reports the object reference and a property identifier from the context where the markup extension is used - -- exposes a service that parallels the general XAML object writing behavior that can provide a based on a XAML type name. The name can optionally include a prefix for a mapped XAML namespace. - -- exposes the active XAML schema context directly. From the reported , you can obtain XAML schema context information such as how assemblies are mapped for type support, preferred prefix in assemblies, lists of each in an assembly, and so on. - -- Other services available for more specialized markup extension scenarios include: - - - - - - - - - - - - - - - - - - - - Potentially, implementations of can ignore the parameter. This is viable for some basic scenarios, where no context at all is required for returning a value. - - In typical usage, the .NET Framework XAML Services and the implemented XAML object writers will provide a service provider to all value converter methods that are invoked during XAML processing. However, for robustness, you should provide code paths for null values both for the service provider itself and for any requested service. Null values might occur if your markup extension is applied in a circumstance where the typical service support provided by a XAML processor infrastructure is not available. - - For more information on available services from the XAML service provider context and how to use them, see [Type Converters and Markup Extensions for XAML](/dotnet/framework/xaml-services/type-converters-and-markup-extensions-for-xaml). - - Implementations that require a certain service to be available in order to produce a useful result are expected to throw exceptions if that service is not available. The recommended exception to throw is . - + Common services returned by the default service provider that is typically available to a custom or existing implementation include the following primary services. + +- reports the object reference and a property identifier from the context where the markup extension is used + +- exposes a service that parallels the general XAML object writing behavior that can provide a based on a XAML type name. The name can optionally include a prefix for a mapped XAML namespace. + +- exposes the active XAML schema context directly. From the reported , you can obtain XAML schema context information such as how assemblies are mapped for type support, preferred prefix in assemblies, lists of each in an assembly, and so on. + +- Other services available for more specialized markup extension scenarios include: + + - + + - + + - + + - + + - + + - + + Potentially, implementations of can ignore the parameter. This is viable for some basic scenarios, where no context at all is required for returning a value. + + In typical usage, the .NET Framework XAML Services and the implemented XAML object writers will provide a service provider to all value converter methods that are invoked during XAML processing. However, for robustness, you should provide code paths for null values both for the service provider itself and for any requested service. Null values might occur if your markup extension is applied in a circumstance where the typical service support provided by a XAML processor infrastructure is not available. + + For more information on available services from the XAML service provider context and how to use them, see Type Converters and Markup Extensions for XAML. + + Implementations that require a certain service to be available in order to produce a useful result are expected to throw exceptions if that service is not available. The recommended exception to throw is . + The implementation may also throw exceptions if one of the arguments that the custom markup extension needs in order to provide a value is null, is invalid for its data type, or does not contain a value that the markup extension is capable of processing. The recommended exception to throw is . diff --git a/xml/System.Windows.Markup/UidPropertyAttribute.xml b/xml/System.Windows.Markup/UidPropertyAttribute.xml index f2ff87791df..d634150c024 100644 --- a/xml/System.Windows.Markup/UidPropertyAttribute.xml +++ b/xml/System.Windows.Markup/UidPropertyAttribute.xml @@ -43,14 +43,14 @@ Indicates the CLR property of a class that provides the x:Uid Directive value. - @@ -128,7 +128,7 @@ The `UidPropertyAttribute` is a XAML language attribute that identifies element Gets the name of the CLR property that represents the x:Uid Directive value. - The name of the CLR property that represents [x:Uid Directive](/dotnet/framework/xaml-services/x-uid-directive). + The name of the CLR property that represents x:Uid Directive. To be added. diff --git a/xml/System.Windows.Media.Animation/AnimationTimeline.xml b/xml/System.Windows.Media.Animation/AnimationTimeline.xml index bf172989cfc..08064df2241 100644 --- a/xml/System.Windows.Media.Animation/AnimationTimeline.xml +++ b/xml/System.Windows.Media.Animation/AnimationTimeline.xml @@ -22,29 +22,29 @@ Defines a segment of time over which output values are produced. These values are used to animate a target property. - is a type of object that generates output values based on its timing progress. All animation types inherit from . - - **Freezable Features:** Because it inherits from the class, the class provides several special features: objects can be declared as [resources](/dotnet/desktop-wpf/fundamentals/xaml-resources-define), shared among multiple objects, made read-only to improve performance, cloned, and made thread-safe. For more information about the different features provided by objects, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). - + is a type of object that generates output values based on its timing progress. All animation types inherit from . + + **Freezable Features:** Because it inherits from the class, the class provides several special features: objects can be declared as [resources](/dotnet/desktop-wpf/fundamentals/xaml-resources-define), shared among multiple objects, made read-only to improve performance, cloned, and made thread-safe. For more information about the different features provided by objects, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + ]]> - To create a custom animation, override or implement the following members: - -- - If your new class is concrete, you must override to return a new instance of your class. - -- - Override this method to return the current value of your animation. It takes three parameters: a default origin value, a default destination value, and an . Use the to obtain the current time or progress for the animation. You can choose whether to use the default origin and destination values. - -- - Override this property to indicate whether your animation uses the default destination value specified by the method. - -- - Override this property to indicate the of output your animation produces. - - If the class does not use dependency properties to store its data or it requires extra initialization after creation, you might need to override additional methods; see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview) for more information. - - For more information about creating custom animations, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + To create a custom animation, override or implement the following members: + +- - If your new class is concrete, you must override to return a new instance of your class. + +- - Override this method to return the current value of your animation. It takes three parameters: a default origin value, a default destination value, and an . Use the to obtain the current time or progress for the animation. You can choose whether to use the default origin and destination values. + +- - Override this property to indicate whether your animation uses the default destination value specified by the method. + +- - Override this property to indicate the of output your animation produces. + + If the class does not use dependency properties to store its data or it requires extra initialization after creation, you might need to override additional methods; see the Freezable Objects Overview for more information. + + For more information about creating custom animations, see the Custom Animations Overview. Custom Animation Sample @@ -104,11 +104,11 @@ Creates a for this . A clock for this . - method and should not be called directly by your code. - + method and should not be called directly by your code. + ]]> @@ -142,13 +142,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version. + + For more information, see . + ]]> @@ -179,11 +179,11 @@ Creates a new from this . A new clock, created from this . - method with a type-safe implementation. - + method with a type-safe implementation. + ]]> @@ -253,11 +253,11 @@ Returns the length of a single iteration of this . The animation's natural duration. This method always returns a of 1 second. - and should not be called directly from your code. - + and should not be called directly from your code. + ]]> diff --git a/xml/System.Windows.Media.Animation/BooleanAnimationBase.xml b/xml/System.Windows.Media.Animation/BooleanAnimationBase.xml index 89ebf6af970..9d3a481e056 100644 --- a/xml/System.Windows.Media.Animation/BooleanAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/BooleanAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class using Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/BooleanAnimationUsingKeyFramesExample.xaml" id="Snippetbooleananimationusingkeyframeswholepage"::: - + class using Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/BooleanAnimationUsingKeyFramesExample.xaml" id="Snippetbooleananimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/ByteAnimationBase.xml b/xml/System.Windows.Media.Animation/ByteAnimationBase.xml index a69e52402c4..f3e9bcd7ea5 100644 --- a/xml/System.Windows.Media.Animation/ByteAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/ByteAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -83,13 +83,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -136,25 +136,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -192,25 +192,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -248,25 +248,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/CharAnimationBase.xml b/xml/System.Windows.Media.Animation/CharAnimationBase.xml index 2ddcaffa4a9..797dab1e297 100644 --- a/xml/System.Windows.Media.Animation/CharAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/CharAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -83,13 +83,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -136,25 +136,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -192,25 +192,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -248,25 +248,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/ColorAnimationBase.xml b/xml/System.Windows.Media.Animation/ColorAnimationBase.xml index f48f23e19bc..30f3cc24563 100644 --- a/xml/System.Windows.Media.Animation/ColorAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/ColorAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class using Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/ColorAnimationUsingKeyFramesExample.xaml" id="Snippetcoloranimationusingkeyframeswholepage"::: - + class using Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/ColorAnimationUsingKeyFramesExample.xaml" id="Snippetcoloranimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/DecimalAnimationBase.xml b/xml/System.Windows.Media.Animation/DecimalAnimationBase.xml index d9b88c09f56..d0bb1e182bf 100644 --- a/xml/System.Windows.Media.Animation/DecimalAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/DecimalAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -83,13 +83,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -136,25 +136,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -192,25 +192,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -248,25 +248,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/DoubleAnimationBase.xml b/xml/System.Windows.Media.Animation/DoubleAnimationBase.xml index c8880173d3c..3f56ec89eb6 100644 --- a/xml/System.Windows.Media.Animation/DoubleAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/DoubleAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class using Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: - + class using Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/Int16AnimationBase.xml b/xml/System.Windows.Media.Animation/Int16AnimationBase.xml index 6ddd285b68c..af49fe707b2 100644 --- a/xml/System.Windows.Media.Animation/Int16AnimationBase.xml +++ b/xml/System.Windows.Media.Animation/Int16AnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML), but generically shows how to use other derived classes such as . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML), but generically shows how to use other derived classes such as . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,18 +92,18 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - - - -## Examples - [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview) - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + + + +## Examples + [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview) + ]]> @@ -150,25 +150,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -206,25 +206,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -262,25 +262,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/Int32AnimationBase.xml b/xml/System.Windows.Media.Animation/Int32AnimationBase.xml index 1c2483bd2cc..5d00bc41181 100644 --- a/xml/System.Windows.Media.Animation/Int32AnimationBase.xml +++ b/xml/System.Windows.Media.Animation/Int32AnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML), but generically shows how to use other derived classes such as . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML), but generically shows how to use other derived classes such as . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/Int64AnimationBase.xml b/xml/System.Windows.Media.Animation/Int64AnimationBase.xml index 520f7ea5eab..2bacb03adea 100644 --- a/xml/System.Windows.Media.Animation/Int64AnimationBase.xml +++ b/xml/System.Windows.Media.Animation/Int64AnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML), but generically shows how to use other derived classes such as . - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML), but generically shows how to use other derived classes such as . + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/AltDoubleAnimationUsingKeyFramesExample.xaml" id="Snippetaltdoubleanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/MatrixAnimationBase.xml b/xml/System.Windows.Media.Animation/MatrixAnimationBase.xml index ff07b2bdeea..c651230c008 100644 --- a/xml/System.Windows.Media.Animation/MatrixAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/MatrixAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/MatrixAnimationUsingKeyFramesExample.xaml" id="Snippetmatrixanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/MatrixAnimationUsingKeyFramesExample.xaml" id="Snippetmatrixanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ When implemented in a derived class, calculates the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/ObjectAnimationBase.xml b/xml/System.Windows.Media.Animation/ObjectAnimationBase.xml index 91485940832..005f38930db 100644 --- a/xml/System.Windows.Media.Animation/ObjectAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/ObjectAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/ObjectAnimationUsingKeyFramesExample.xaml" id="Snippetobjectanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/ObjectAnimationUsingKeyFramesExample.xaml" id="Snippetobjectanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -136,25 +136,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -192,25 +192,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/Point3DAnimationBase.xml b/xml/System.Windows.Media.Animation/Point3DAnimationBase.xml index 11b3c123900..46e9436b436 100644 --- a/xml/System.Windows.Media.Animation/Point3DAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/Point3DAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -82,13 +82,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -135,25 +135,25 @@ Gets the current value of the animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -191,25 +191,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -247,25 +247,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the . The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/PointAnimationBase.xml b/xml/System.Windows.Media.Animation/PointAnimationBase.xml index 21ab54823e1..a481f8b8853 100644 --- a/xml/System.Windows.Media.Animation/PointAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/PointAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/PointAnimationUsingKeyFramesExample.xaml" id="Snippetpointanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/PointAnimationUsingKeyFramesExample.xaml" id="Snippetpointanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The value this animation believes should be the current value for the property. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/QuaternionAnimationBase.xml b/xml/System.Windows.Media.Animation/QuaternionAnimationBase.xml index 9045c2bc99e..8006ca35f43 100644 --- a/xml/System.Windows.Media.Animation/QuaternionAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/QuaternionAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -82,13 +82,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -135,25 +135,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -191,25 +191,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -247,25 +247,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/RectAnimationBase.xml b/xml/System.Windows.Media.Animation/RectAnimationBase.xml index aaf58c7d454..09e9185a364 100644 --- a/xml/System.Windows.Media.Animation/RectAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/RectAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/RectAnimationUsingKeyFramesExample.xaml" id="Snippetrectanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/RectAnimationUsingKeyFramesExample.xaml" id="Snippetrectanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/Rotation3DAnimationBase.xml b/xml/System.Windows.Media.Animation/Rotation3DAnimationBase.xml index 06de021f3c1..19dedae82a8 100644 --- a/xml/System.Windows.Media.Animation/Rotation3DAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/Rotation3DAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -82,13 +82,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -205,13 +205,13 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The `defaultDestinationValue` is the base value if the animation is in the first composition layer of animations on a property; otherwise the value is the output value from the previous composition layer of animations for the property. - + that is not . + + The `defaultDestinationValue` is the base value if the animation is in the first composition layer of animations on a property; otherwise the value is the output value from the previous composition layer of animations for the property. + ]]> diff --git a/xml/System.Windows.Media.Animation/SingleAnimationBase.xml b/xml/System.Windows.Media.Animation/SingleAnimationBase.xml index d95b83134e2..30e0c3b2b40 100644 --- a/xml/System.Windows.Media.Animation/SingleAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/SingleAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -83,13 +83,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -136,25 +136,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -192,25 +192,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -248,25 +248,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/SizeAnimationBase.xml b/xml/System.Windows.Media.Animation/SizeAnimationBase.xml index c439706227e..c7d1cc1b882 100644 --- a/xml/System.Windows.Media.Animation/SizeAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/SizeAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/SizeAnimationUsingKeyFramesExample.xaml" id="Snippetsizeanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/SizeAnimationUsingKeyFramesExample.xaml" id="Snippetsizeanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/StringAnimationBase.xml b/xml/System.Windows.Media.Animation/StringAnimationBase.xml index 836d3658d3d..1e4e21f7b1c 100644 --- a/xml/System.Windows.Media.Animation/StringAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/StringAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/StringAnimationUsingKeyFramesExample.xaml" id="Snippetstringanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/StringAnimationUsingKeyFramesExample.xaml" id="Snippetstringanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/ThicknessAnimationBase.xml b/xml/System.Windows.Media.Animation/ThicknessAnimationBase.xml index f00b15fa12b..cc484ff296e 100644 --- a/xml/System.Windows.Media.Animation/ThicknessAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/ThicknessAnimationBase.xml @@ -22,17 +22,17 @@ Abstract class that, when implemented, animates a value. - class in Extensible Application Markup Language (XAML). - - :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/ThicknessAnimationUsingKeyFramesExample.xaml" id="Snippetthicknessanimationusingkeyframeswholepage"::: - + class in Extensible Application Markup Language (XAML). + + :::code language="xaml" source="~/snippets/csharp/System.Windows.Media.Animation/BooleanAnimationBase/Overview/ThicknessAnimationUsingKeyFramesExample.xaml" id="Snippetthicknessanimationusingkeyframeswholepage"::: + ]]> - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -92,13 +92,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -145,25 +145,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -201,25 +201,25 @@ Gets the current value of the animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -257,25 +257,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/Vector3DAnimationBase.xml b/xml/System.Windows.Media.Animation/Vector3DAnimationBase.xml index 9813ebc085c..af0b6c8e28d 100644 --- a/xml/System.Windows.Media.Animation/Vector3DAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/Vector3DAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that represents an animated value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -82,13 +82,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -135,25 +135,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -191,25 +191,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -247,25 +247,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media.Animation/VectorAnimationBase.xml b/xml/System.Windows.Media.Animation/VectorAnimationBase.xml index 384478d8c72..21b167b2fac 100644 --- a/xml/System.Windows.Media.Animation/VectorAnimationBase.xml +++ b/xml/System.Windows.Media.Animation/VectorAnimationBase.xml @@ -23,7 +23,7 @@ Abstract class that, when implemented, animates a value. To be added. - See the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview) for information about extending animation classes. + See the Custom Animations Overview for information about extending animation classes. @@ -83,13 +83,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -136,25 +136,25 @@ Gets the current value of the animation. The current value of the animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -192,25 +192,25 @@ Gets the current value of the animation. The current value of this animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> @@ -248,25 +248,25 @@ Calculates a value that represents the current value of the property being animated, as determined by the host animation. The calculated value of the property, as determined by the current animation. - that is not . - - The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. - -- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. - -- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. - - For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). - + that is not . + + The value of the `defaultDestinationValue` parameter depends on whether there is a previous property composition layer. + +- If there is a previous property composition layer, `defaultDestinationValue` is the output from that layer. + +- If there is no previous composition layer, `defaultDestinationValue` is the base value of the property that you are animating. + + For more information about animation composition, see the [Animation and Timing System Overview](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). For more information about creating custom animation types, see the [Custom Animations Overview](/dotnet/framework/wpf/graphics-multimedia/custom-animations-overview). + ]]> diff --git a/xml/System.Windows.Media/Brush.xml b/xml/System.Windows.Media/Brush.xml index fd2e8651059..803b0111f95 100644 --- a/xml/System.Windows.Media/Brush.xml +++ b/xml/System.Windows.Media/Brush.xml @@ -42,51 +42,51 @@ Defines objects used to paint graphical objects. Classes that derive from describe how the area is painted. - "paints" or "fills" an area with its output. Different brushes have different types of output. Some brushes paint an area with a solid color, others with a gradient, pattern, image, or drawing. The following list describes the different types of WPF brushes: - -- : Paints an area with a solid . - -- : Paints an area with a linear gradient. - -- : Paints an area with a radial gradient. - -- : Paints an area with an image (represented by an object). - -- : Paints an area with a . The drawing may include vector and bitmap objects. - -- : Paints an area with a object. A enables you to duplicate content from one portion of your application into another area; it's very useful for creating reflection effects and magnifying portions of the screen. - -## Predefined Brushes - Use the class to paint an object using a predefined solid color, such as or . - -## Brushes in XAML - The following table lists the different types that can be used in XAML and the syntax they support. For detailed syntax information for a specific brush, see that brush's type page. - -|Class|Attribute Syntax|Object Element Syntax| -|-----------|----------------------|---------------------------| -||Yes|Yes| -||No|Yes| -||No|Yes| -||No|Yes| -||No|Yes| -||No|Yes| - - For an example showing how to quickly paint an area with a solid color, see [How to: Paint an Area with a Solid Color](/dotnet/framework/wpf/graphics-multimedia/how-to-paint-an-area-with-a-solid-color). - -## Freezable Features - A brush is a type of object. For information about features, such as freezing and cloning, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). - - -## XAML Text Usage - For XAML information, see the **Remarks** section. - + "paints" or "fills" an area with its output. Different brushes have different types of output. Some brushes paint an area with a solid color, others with a gradient, pattern, image, or drawing. The following list describes the different types of WPF brushes: + +- : Paints an area with a solid . + +- : Paints an area with a linear gradient. + +- : Paints an area with a radial gradient. + +- : Paints an area with an image (represented by an object). + +- : Paints an area with a . The drawing may include vector and bitmap objects. + +- : Paints an area with a object. A enables you to duplicate content from one portion of your application into another area; it's very useful for creating reflection effects and magnifying portions of the screen. + +## Predefined Brushes + Use the class to paint an object using a predefined solid color, such as or . + +## Brushes in XAML + The following table lists the different types that can be used in XAML and the syntax they support. For detailed syntax information for a specific brush, see that brush's type page. + +|Class|Attribute Syntax|Object Element Syntax| +|-----------|----------------------|---------------------------| +||Yes|Yes| +||No|Yes| +||No|Yes| +||No|Yes| +||No|Yes| +||No|Yes| + + For an example showing how to quickly paint an area with a solid color, see [How to: Paint an Area with a Solid Color](/dotnet/framework/wpf/graphics-multimedia/how-to-paint-an-area-with-a-solid-color). + +## Freezable Features + A brush is a type of object. For information about features, such as freezing and cloning, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + + +## XAML Text Usage + For XAML information, see the **Remarks** section. + ]]> - When you inherit from the class, you must override the method. Depending on whether your class must perform additional initialization work or contains non-dependency property data members, you might need to override additional methods. For more information about inheriting from types, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + When you inherit from the class, you must override the method. Depending on whether your class must perform additional initialization work or contains non-dependency property data members, you might need to override additional methods. For more information about inheriting from types, see the Freezable Objects Overview. Brushes Sample @@ -147,13 +147,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -184,13 +184,13 @@ Creates a modifiable clone of this object, making deep copies of this object's current values. Resource references, data bindings, and animations are not copied, but their current values are. A modifiable clone of the current object. The cloned object's property will be even if the source's property was . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -220,19 +220,19 @@ Gets or sets the degree of opacity of a . The value of the property is expressed as a value between 0.0 and 1.0. The default value is 1.0. - value of 0 indicates that the brush is completely transparent, while a value of 1 indicates that the brush is completely opaque. A value of 0.5 indicates the brush is 50% opaque, a value of 0.725 indicates the brush is 72.5% opaque, and so on. Values less than 0 are treated as 0, while values greater than 1 are treated as 1. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + value of 0 indicates that the brush is completely transparent, while a value of 1 indicates that the brush is completely opaque. A value of 0.5 indicates the brush is 50% opaque, a value of 0.725 indicates the brush is 72.5% opaque, and so on. Values less than 0 are treated as 0, while values greater than 1 are treated as 1. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> Brushes Sample @@ -289,21 +289,21 @@ Gets or sets the transformation that is applied to the brush using relative coordinates. The transformation that is applied to the brush using relative coordinates. The default value is the transformation. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -364,15 +364,15 @@ - The format to use. - - -or- - + The format to use. + + -or- + A null reference ( in Visual Basic) to use the default format defined for the type of the implementation. - The provider to use to format the value. - - -or- - + The provider to use to format the value. + + -or- + A null reference ( in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system. Formats the value of the current instance using the specified format. The value of the current instance in the specified format. @@ -472,11 +472,11 @@ Gets or sets the transformation that is applied to the brush. This transformation is applied after the brush's output has been mapped and positioned. The transformation to apply to the brush. The default value is the transformation. - diff --git a/xml/System.Windows.Media/GradientBrush.xml b/xml/System.Windows.Media/GradientBrush.xml index 67ae7fe4c80..5f47477c408 100644 --- a/xml/System.Windows.Media/GradientBrush.xml +++ b/xml/System.Windows.Media/GradientBrush.xml @@ -29,15 +29,15 @@ An abstract class that describes a gradient, composed of gradient stops. Classes that inherit from describe different ways of interpreting gradient stops. - is a type of object and therefore can be frozen to improve performance. For information about features, such as freezing and cloning, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). - + is a type of object and therefore can be frozen to improve performance. For information about features, such as freezing and cloning, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + ]]> - When you inherit from the class, you must override the method. Depending on whether your class must perform additional initialization work or contains non-dependency property data members, you might need to override additional methods. For more information about inheriting from types, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + When you inherit from the class, you must override the method. Depending on whether your class must perform additional initialization work or contains non-dependency property data members, you might need to override additional methods. For more information about inheriting from types, see the Freezable Objects Overview. @@ -133,13 +133,13 @@ Creates a modifiable clone of this , making deep copies of this object's values. When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property is even if the source's property is . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -170,15 +170,15 @@ Creates a modifiable clone of this object, making deep copies of this object's current values. A modifiable clone of the current object. The cloned object's property is even if the source's property is . - objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - - Resource references, data bindings, and animations are not copied, but their current values are. - + objects (or any object). For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + + Resource references, data bindings, and animations are not copied, but their current values are. + ]]> @@ -208,29 +208,29 @@ Gets or sets a enumeration that specifies how the gradient's colors are interpolated. Specifies how the colors in a gradient are interpolated. The default is . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows two similar gradients that have different modes of color interpolation, which causes the interpolation to happen in different color spaces. - - :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/ColorInterpolationModeExample.xaml" id="Snippetcolorinterpolationmodeexamplewholepage"::: - - The following illustration shows what the preceding example produces. - - ![Two gradients showing different interpolation mode](~/add/media/graphicscolorinterpolationmode.gif "Two gradients showing different interpolation mode") - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows two similar gradients that have different modes of color interpolation, which causes the interpolation to happen in different color spaces. + + :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/ColorInterpolationModeExample.xaml" id="Snippetcolorinterpolationmodeexamplewholepage"::: + + The following illustration shows what the preceding example produces. + + ![Two gradients showing different interpolation mode](~/add/media/graphicscolorinterpolationmode.gif "Two gradients showing different interpolation mode") + ]]> @@ -286,18 +286,18 @@ Gets or sets the brush's gradient stops. A collection of the objects associated with the brush, each of which specifies a color and an offset along the brush's gradient axis. The default is an empty . - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -353,26 +353,26 @@ Gets or sets a enumeration that specifies whether the gradient brush's positioning coordinates are absolute or relative to the output area. A value that specifies how the gradient brush's positioning coordinates are interpreted. The default is . - indicates the gradient brush's coordinates are expressed using device independent pixels. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example shows how to use the property to specify what coordinate system to use for the and of the gradient. - - :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushMappingModeExample.xaml" id="Snippetgradientbrushmappingmodeexamplewholepage"::: - + indicates the gradient brush's coordinates are expressed using device independent pixels. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example shows how to use the property to specify what coordinate system to use for the and of the gradient. + + :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushMappingModeExample.xaml" id="Snippetgradientbrushmappingmodeexamplewholepage"::: + ]]> @@ -428,29 +428,29 @@ Gets or sets the type of spread method that specifies how to draw a gradient that starts or ends inside the bounds of the object to be painted. The type of spread method used to paint the gradient. The default is . - and . The red line indicates the gradient space. A defines its gradient space with its and properties. A defines its gradient space with its , , and properties. - - ![Different GradientSpread settings](~/add/media/img-mmgraphics-gradientspread.png "Different GradientSpread settings") -Gradient spread methods - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example applies different settings to several and objects. - - :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/GradientSpreadExample.xaml" id="Snippetgraphicsmmgradientspreadexamplewholepage"::: - + and . The red line indicates the gradient space. A defines its gradient space with its and properties. A defines its gradient space with its , , and properties. + + ![Different GradientSpread settings](~/add/media/img-mmgraphics-gradientspread.png "Different GradientSpread settings") +Gradient spread methods + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example applies different settings to several and objects. + + :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/GradientSpreadExample.xaml" id="Snippetgraphicsmmgradientspreadexamplewholepage"::: + ]]> diff --git a/xml/System.Windows.Media/TileBrush.xml b/xml/System.Windows.Media/TileBrush.xml index 272ad341b89..668eac16c3f 100644 --- a/xml/System.Windows.Media/TileBrush.xml +++ b/xml/System.Windows.Media/TileBrush.xml @@ -23,52 +23,52 @@ Describes a way to paint a region by using one or more tiles. - define the contents of the tiles that you use to paint a region. For example, use the class to paint an area by using an image. - - Use a to control how you paint an area. For example, Windows Presentation Foundation (WPF) provides several types of brushes: - -- To paint by using an image, use the . - -- To paint by drawing, use the . - -- To paint by using a , use the . - - When you use the to paint an area, instead of painting an area by using a single stretched image, you can paint an area by using a series of image tiles that create a pattern. - - When you paint an area by using a , you use three components: content, tiles, and the output area. The following illustrations show how these three components relate to each other. - - ![TileBrush components](~/add/media/wcpsdk-mmgraphics-defaultcontentprojection2.png "TileBrush components") -Components of a TileBrush with a single tile - - ![Components of a tiled TileBrush](~/add/media/graphicsmm-tiledprojection.png "Components of a tiled TileBrush") -Components of a TileBrush with a TileMode of Tile - - **Content**: A can have different types of content: - -- If the brush is an , this content is an image. The property specifies the contents of the . - -- If the brush is a , this content is a drawing. The property specifies the contents of the . - -- If the brush is a , this content is a visual. The property specifies the content of the . - - You can specify the position and dimensions of content by using the property. - - **Tiles**: A produces one or more tiles. By default, the content of the brush is stretched to fill a single tile and that tile is stretched to fill the output area. The property is used to specify the size and position of the base tile for the . The property determines whether the size and position of the are relative to the output area (the default behavior) or whether they are absolute values. - - **Output Area**: The output area is the area that the brush paints, such as the of an or the of a . - - For more information about the class, see [Painting with Images, Drawings, and Visuals](/dotnet/framework/wpf/graphics-multimedia/painting-with-images-drawings-and-visuals) . - -## Freezable Features - A is a type. For information about features, such as freezing and cloning, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). - + define the contents of the tiles that you use to paint a region. For example, use the class to paint an area by using an image. + + Use a to control how you paint an area. For example, Windows Presentation Foundation (WPF) provides several types of brushes: + +- To paint by using an image, use the . + +- To paint by drawing, use the . + +- To paint by using a , use the . + + When you use the to paint an area, instead of painting an area by using a single stretched image, you can paint an area by using a series of image tiles that create a pattern. + + When you paint an area by using a , you use three components: content, tiles, and the output area. The following illustrations show how these three components relate to each other. + + ![TileBrush components](~/add/media/wcpsdk-mmgraphics-defaultcontentprojection2.png "TileBrush components") +Components of a TileBrush with a single tile + + ![Components of a tiled TileBrush](~/add/media/graphicsmm-tiledprojection.png "Components of a tiled TileBrush") +Components of a TileBrush with a TileMode of Tile + + **Content**: A can have different types of content: + +- If the brush is an , this content is an image. The property specifies the contents of the . + +- If the brush is a , this content is a drawing. The property specifies the contents of the . + +- If the brush is a , this content is a visual. The property specifies the content of the . + + You can specify the position and dimensions of content by using the property. + + **Tiles**: A produces one or more tiles. By default, the content of the brush is stretched to fill a single tile and that tile is stretched to fill the output area. The property is used to specify the size and position of the base tile for the . The property determines whether the size and position of the are relative to the output area (the default behavior) or whether they are absolute values. + + **Output Area**: The output area is the area that the brush paints, such as the of an or the of a . + + For more information about the class, see [Painting with Images, Drawings, and Visuals](/dotnet/framework/wpf/graphics-multimedia/painting-with-images-drawings-and-visuals) . + +## Freezable Features + A is a type. For information about features, such as freezing and cloning, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + ]]> - When you inherit from the class, you must override the method. For more information about inheriting from types, see the [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + When you inherit from the class, you must override the method. For more information about inheriting from types, see the Freezable Objects Overview. @@ -132,25 +132,25 @@ Components of a TileBrush with a TileMode of Tile Gets or sets the horizontal alignment of content in the base tile. A value that specifies the horizontal position of content in its base tile. The default value is . - and properties of a are used when either of the following conditions is true: - -- The property is or and the and have different aspect ratios. - -- The property is and the and are different sizes. - - Note that you specify the dimensions of content by using the property; you specify the position and size of the base tile by using the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + and properties of a are used when either of the following conditions is true: + +- The property is or and the and have different aspect ratios. + +- The property is and the and are different sizes. + + Note that you specify the dimensions of content by using the property; you specify the position and size of the base tile by using the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -208,25 +208,25 @@ Components of a TileBrush with a TileMode of Tile Gets or sets the vertical alignment of content in the base tile. A value that specifies the vertical position of content in its base tile. The default value is . - and properties of a are used when either of the following conditions are true: - -- The property is or and the and have different aspect ratios. - -- The property is and the and are different sizes. - - Note that you specify the dimensions of content by using the property; you specify the position and size of the base tile by using the property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + and properties of a are used when either of the following conditions are true: + +- The property is or and the and have different aspect ratios. + +- The property is and the and are different sizes. + + Note that you specify the dimensions of content by using the property; you specify the position and size of the base tile by using the property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -285,15 +285,15 @@ Components of a TileBrush with a TileMode of Tile Creates a modifiable copy of this by making deep copies of its values. A modifiable deep copy of the current object. The property of the cloned object returns even if the property of the source is . - objects. For convenience, this method shadows the inherited version with a strongly typed implementation. - - When this method copies dependency properties, it copies resource references and data bindings although they might no longer resolve. It does not copy animations or their current values. - - For more information, see . - + objects. For convenience, this method shadows the inherited version with a strongly typed implementation. + + When this method copies dependency properties, it copies resource references and data bindings although they might no longer resolve. It does not copy animations or their current values. + + For more information, see . + ]]> @@ -324,13 +324,13 @@ Components of a TileBrush with a TileMode of Tile Creates a modifiable copy of this object by making deep copies of its values. This method does not copy resource references, data bindings, or animations, although it does copy their current values. A modifiable deep copy of the current object. The property of the cloned object is even if the property of the source is . - objects. For convenience, this method shadows the inherited version with a strongly typed implementation. - - For more information, see . - + objects. For convenience, this method shadows the inherited version with a strongly typed implementation. + + For more information, see . + ]]> @@ -390,42 +390,42 @@ Components of a TileBrush with a TileMode of Tile Gets or sets a value that specifies how the content of this stretches to fit its tiles. A value that specifies how this content is projected onto its base tile. The default value is . - property accepts the following values, which the enumeration defines: - -- : The content does not stretch to fill the tile. - -- : The content is scaled to fit the tile dimensions. However, the aspect ratio of the content is preserved. - -- : The content is scaled so that it completely fills the output area but preserves its original aspect ratio. - -- : The content is scaled to fit the tile. Because the content's height and width are scaled independently, the original aspect ratio of the content might not be preserved. That is, the content might be distorted in order to completely fill the output tile. - - The following image illustrates the different settings. - - ![Different TileBrush Stretch settings](~/add/media/img-mmgraphics-stretchenum.jpg "Different TileBrush Stretch settings") -Different stretch settings - - Note that you specify the dimensions of content by using the property; you specify the position and size of the base tile by using the property. - -## Viewbox Clipping - contents are never clipped to the . However, contents *are* clipped to the edges of the , which sets the dimensions for the base tile. - - The following illustration shows the effect of different settings on a that has a that is smaller than its . The parts of the image that are outside the are tinted gray. - - ![TileBrush with different Stretch settings](~/add/media/graphicsmm-viewbox-clipping.png "TileBrush with different Stretch settings") -TileBrush with different Stretch settings - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property accepts the following values, which the enumeration defines: + +- : The content does not stretch to fill the tile. + +- : The content is scaled to fit the tile dimensions. However, the aspect ratio of the content is preserved. + +- : The content is scaled so that it completely fills the output area but preserves its original aspect ratio. + +- : The content is scaled to fit the tile. Because the content's height and width are scaled independently, the original aspect ratio of the content might not be preserved. That is, the content might be distorted in order to completely fill the output tile. + + The following image illustrates the different settings. + + ![Different TileBrush Stretch settings](~/add/media/img-mmgraphics-stretchenum.jpg "Different TileBrush Stretch settings") +Different stretch settings + + Note that you specify the dimensions of content by using the property; you specify the position and size of the base tile by using the property. + +## Viewbox Clipping + contents are never clipped to the . However, contents *are* clipped to the edges of the , which sets the dimensions for the base tile. + + The following illustration shows the effect of different settings on a that has a that is smaller than its . The parts of the image that are outside the are tinted gray. + + ![TileBrush with different Stretch settings](~/add/media/graphicsmm-viewbox-clipping.png "TileBrush with different Stretch settings") +TileBrush with different Stretch settings + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -483,24 +483,24 @@ TileBrush with different Stretch settings Gets or sets a value that specifies how a fills the area that you are painting if the base tile is smaller than the output area. A value that specifies how the tiles fill the output area when the base tile, which is specified by the property, is smaller than the output area. The default value is . - enumeration. - - ![Different TileBrush TileMode settings](~/add/media/img-mmgraphics-tilemodes.gif "Different TileBrush TileMode settings") -Available tile modes for the TileMode enumeration - - For the property to have an effect, you must set the for the brush to a size that is smaller than the area that you are painting (the output area). If the size is equal to or exceeds the output area, the brush produces a single tile that expands to fill the output area, and no tile pattern occurs. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + enumeration. + + ![Different TileBrush TileMode settings](~/add/media/img-mmgraphics-tilemodes.gif "Different TileBrush TileMode settings") +Available tile modes for the TileMode enumeration + + For the property to have an effect, you must set the for the brush to a size that is smaller than the area that you are painting (the output area). If the size is equal to or exceeds the output area, the brush produces a single tile that expands to fill the output area, and no tile pattern occurs. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -556,76 +556,76 @@ Available tile modes for the TileMode enumeration Gets or sets the position and dimensions of the content in a tile. The position and dimensions of the content. The default value is a rectangle () that has a of (0,0), and a and of 1. - , you use three components: content, tiles, and the output area. The property specifies the size and position of content. The following illustration shows how these three components relate to each other. - - ![TileBrush components](~/add/media/wcpsdk-mmgraphics-defaultcontentprojection2.png "TileBrush components") -TileBrush components - - ![Components of a tiled TileBrush](~/add/media/graphicsmm-tiledprojection.png "Components of a tiled TileBrush") - - The property determines whether the value is interpreted as a relative or absolute value. By default, the property is set to . - -## Viewbox Clipping - contents are never clipped to the . However, contents *are* clipped to the edges of the , which sets the values for the base tile. - - The following illustration shows the effect of different settings on a that has a that is smaller than its . The parts of the image that are outside the are tinted gray. - - ![TileBrush with different Stretch settings](~/add/media/graphicsmm-viewbox-clipping.png "TileBrush with different Stretch settings") -TileBrush with different Stretch settings - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - You can specify the size and position of content by using the property. The property determines whether the value is relative to the bounds of the content or whether it is an absolute value. - - The first illustration shows a 100 by 100 pixel image and then uses this image to show the effects of different property settings. - - ![An image](~/add/media/graphicsmm-viewbox-sampleimage.jpg "An image") -Beginning sample image (100 by 100 device independent pixels) - - The following illustration shows the output of a that uses a of 0.0,0.0, 0.25,0.5. Other relevant property values include the following: - -- : (default) - -- : 0,0,1,1 - -- : - -- , : - - This illustration shows several different property settings. The property determines how a stretches its to fill its . - - ![TileBrush with a Viewbox of 0,0 0.25,0.5](~/add/media/graphicsmm-0-0-025-05-viewbox.png "TileBrush with a Viewbox of 0,0 0.25,0.5") -TileBrush with a relative Viewbox of 0.0,0.0, 0.25,0.5 - - The next illustration shows a similar but with a relative of 0.5,0.25, 0.25,0.5. - - ![TileBrush with a Viewbox of 0.5,0.25 0.25,0.5](~/add/media/graphicsmm-05-0-025-05-viewbox.png "TileBrush with a Viewbox of 0.5,0.25 0.25,0.5") -Similar TileBrush but with a different Viewbox setting - - The next illustration shows the same but with a relative value of 0.0,0.0, 0.5,0.5 and a of . - - ![TiledTileBrush with a Viewbox of 0.5,0.25 0.25,0.5](~/add/media/graphicsmm-05-0-025-05-viewbox-tiled.png "TiledTileBrush with a Viewbox of 0.5,0.25 0.25,0.5") -Similar TileBrush but with tiling and a different Viewport setting - - The following example shows how to create a tiled that has a of 0.5,0.25, 0.25,0.5. - - :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/ViewboxExample.xaml" id="Snippetgraphicsmmtilebrushviewboxwithstretchtiling"::: - + , you use three components: content, tiles, and the output area. The property specifies the size and position of content. The following illustration shows how these three components relate to each other. + + ![TileBrush components](~/add/media/wcpsdk-mmgraphics-defaultcontentprojection2.png "TileBrush components") +TileBrush components + + ![Components of a tiled TileBrush](~/add/media/graphicsmm-tiledprojection.png "Components of a tiled TileBrush") + + The property determines whether the value is interpreted as a relative or absolute value. By default, the property is set to . + +## Viewbox Clipping + contents are never clipped to the . However, contents *are* clipped to the edges of the , which sets the values for the base tile. + + The following illustration shows the effect of different settings on a that has a that is smaller than its . The parts of the image that are outside the are tinted gray. + + ![TileBrush with different Stretch settings](~/add/media/graphicsmm-viewbox-clipping.png "TileBrush with different Stretch settings") +TileBrush with different Stretch settings + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + You can specify the size and position of content by using the property. The property determines whether the value is relative to the bounds of the content or whether it is an absolute value. + + The first illustration shows a 100 by 100 pixel image and then uses this image to show the effects of different property settings. + + ![An image](~/add/media/graphicsmm-viewbox-sampleimage.jpg "An image") +Beginning sample image (100 by 100 device independent pixels) + + The following illustration shows the output of a that uses a of 0.0,0.0, 0.25,0.5. Other relevant property values include the following: + +- : (default) + +- : 0,0,1,1 + +- : + +- , : + + This illustration shows several different property settings. The property determines how a stretches its to fill its . + + ![TileBrush with a Viewbox of 0,0 0.25,0.5](~/add/media/graphicsmm-0-0-025-05-viewbox.png "TileBrush with a Viewbox of 0,0 0.25,0.5") +TileBrush with a relative Viewbox of 0.0,0.0, 0.25,0.5 + + The next illustration shows a similar but with a relative of 0.5,0.25, 0.25,0.5. + + ![TileBrush with a Viewbox of 0.5,0.25 0.25,0.5](~/add/media/graphicsmm-05-0-025-05-viewbox.png "TileBrush with a Viewbox of 0.5,0.25 0.25,0.5") +Similar TileBrush but with a different Viewbox setting + + The next illustration shows the same but with a relative value of 0.0,0.0, 0.5,0.5 and a of . + + ![TiledTileBrush with a Viewbox of 0.5,0.25 0.25,0.5](~/add/media/graphicsmm-05-0-025-05-viewbox-tiled.png "TiledTileBrush with a Viewbox of 0.5,0.25 0.25,0.5") +Similar TileBrush but with tiling and a different Viewport setting + + The following example shows how to create a tiled that has a of 0.5,0.25, 0.25,0.5. + + :::code language="xaml" source="~/snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/ViewboxExample.xaml" id="Snippetgraphicsmmtilebrushviewboxwithstretchtiling"::: + :::code language="csharp" source="~/snippets/csharp/System.Windows.Media/TileBrush/Viewbox/ViewboxExample.cs" id="Snippetgraphicsmmtilebrushviewboxwithstretchtiling"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/BrushOverviewExamples_procedural_snip/visualbasic/viewboxexample.vb" id="Snippetgraphicsmmtilebrushviewboxwithstretchtiling"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/BrushOverviewExamples_procedural_snip/visualbasic/viewboxexample.vb" id="Snippetgraphicsmmtilebrushviewboxwithstretchtiling"::: + ]]> @@ -684,23 +684,23 @@ Similar TileBrush but with tiling and a different Viewport setting Gets or sets a value that specifies whether the value is relative to the bounding box of the contents or whether the value is absolute. A value that indicates whether the value is relative to the bounding box of the contents or whether it is an absolute value. The default value is . - indicates that the are relative to the bounding box of the content. Note that a value of specifies device independent pixels instead of device pixels, which are device dependent. Therefore, when a value of applies, each pixel represents 1/96th of an inch. - - You must remember this pixel distinction when you specify the of an that has a as its source. For example, when you use the standard pixel as a measure, a 300 by 300 pixel image is only one inch in width if the image resolution is 300 dots per inch. However, when you want to set an absolute value, you must set the to (0, 0, 96, 96) in order to include the whole image. - - You can specify the size and position of content by using the property. The property determines whether the value is relative to the bounds of the content or whether it is an absolute value. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + indicates that the are relative to the bounding box of the content. Note that a value of specifies device independent pixels instead of device pixels, which are device dependent. Therefore, when a value of applies, each pixel represents 1/96th of an inch. + + You must remember this pixel distinction when you specify the of an that has a as its source. For example, when you use the standard pixel as a measure, a 300 by 300 pixel image is only one inch in width if the image resolution is 300 dots per inch. However, when you want to set an absolute value, you must set the to (0, 0, 96, 96) in order to include the whole image. + + You can specify the size and position of content by using the property. The property determines whether the value is relative to the bounds of the content or whether it is an absolute value. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -758,34 +758,34 @@ Similar TileBrush but with tiling and a different Viewport setting Gets or sets the position and dimensions of the base tile for a . The position and dimensions of the base tile for a . The default value is a rectangle () with a of (0,0) and a and of 1. - , you use three components: content, tiles, and the output area. The following illustration shows how these three components relate to each other. - - ![TileBrush components](~/add/media/wcpsdk-mmgraphics-defaultcontentprojection2.png "TileBrush components") -Components of a TileBrush with a single tile - - ![Components of a tiled TileBrush](~/add/media/graphicsmm-tiledprojection.png "Components of a tiled TileBrush") -Components of a TileBrush with a TileMode of Tile - - The property determines the size and position of the tiles in a . By default, a has a single tile that fills the whole output area. The property controls how the content fits into that tile. You can override this default behavior and specify the tile size by using the property. - - Use the property to specify whether the uses absolute or relative coordinates. If the coordinates are relative, they are relative to the size of the output area. The point (0,0) represents the upper-left corner of the output area, and (1,1) represents the lower-right corner of the output area. To specify that the property uses absolute coordinates, set the property to . - - The following illustration shows the difference in output when you set the property of a to either relative or absolute. - - ![Absolute and Relative Viewport Units](~/add/media/absolute-and-relative-viewports.png "Absolute and Relative Viewport Units") -Relative and absolute ViewportUnits - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + , you use three components: content, tiles, and the output area. The following illustration shows how these three components relate to each other. + + ![TileBrush components](~/add/media/wcpsdk-mmgraphics-defaultcontentprojection2.png "TileBrush components") +Components of a TileBrush with a single tile + + ![Components of a tiled TileBrush](~/add/media/graphicsmm-tiledprojection.png "Components of a tiled TileBrush") +Components of a TileBrush with a TileMode of Tile + + The property determines the size and position of the tiles in a . By default, a has a single tile that fills the whole output area. The property controls how the content fits into that tile. You can override this default behavior and specify the tile size by using the property. + + Use the property to specify whether the uses absolute or relative coordinates. If the coordinates are relative, they are relative to the size of the output area. The point (0,0) represents the upper-left corner of the output area, and (1,1) represents the lower-right corner of the output area. To specify that the property uses absolute coordinates, set the property to . + + The following illustration shows the difference in output when you set the property of a to either relative or absolute. + + ![Absolute and Relative Viewport Units](~/add/media/absolute-and-relative-viewports.png "Absolute and Relative Viewport Units") +Relative and absolute ViewportUnits + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -845,26 +845,26 @@ Relative and absolute ViewportUnits Gets or sets a enumeration that specifies whether the value of the , which indicates the size and position of the base tile, is relative to the size of the output area. Indicates whether the value of the , which describes the size and position of the tiles, is relative to the size of the whole output area. The default value is . - property determines the size and position of the tiles in a . By default, a has a single tile that fills the whole output area. The property controls how the content fits into that tile. You can override this default behavior and specify the tile size by using the property. - - Use the property to specify whether the uses absolute or relative coordinates. If the coordinates are relative, they are relative to the size of the output area. The point (0,0) represents the upper-left corner of the output area, and (1,1) represents the lower-right corner of the output area. To specify that the property uses absolute coordinates, set the property to . - - The following illustration shows the difference in output when you set the property of a to either relative or absolute. - - ![Absolute and Relative Viewport Units](~/add/media/absolute-and-relative-viewports.png "Absolute and Relative Viewport Units") -Relative and absolute ViewportUnits - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property determines the size and position of the tiles in a . By default, a has a single tile that fills the whole output area. The property controls how the content fits into that tile. You can override this default behavior and specify the tile size by using the property. + + Use the property to specify whether the uses absolute or relative coordinates. If the coordinates are relative, they are relative to the size of the output area. The point (0,0) represents the upper-left corner of the output area, and (1,1) represents the lower-right corner of the output area. To specify that the property uses absolute coordinates, set the property to . + + The following illustration shows the difference in output when you set the property of a to either relative or absolute. + + ![Absolute and Relative Viewport Units](~/add/media/absolute-and-relative-viewports.png "Absolute and Relative Viewport Units") +Relative and absolute ViewportUnits + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Shell/WindowChrome.xml b/xml/System.Windows.Shell/WindowChrome.xml index 0d991440dc3..2c796ed118a 100644 --- a/xml/System.Windows.Shell/WindowChrome.xml +++ b/xml/System.Windows.Shell/WindowChrome.xml @@ -21,124 +21,124 @@ Represents an object that describes the customizations to the non-client area of a window. - class enables you to extend Windows Presentation Foundation (WPF) content into the non-client area of a window that is typically reserved for the operating system's window manager. - -## Standard Windows - Standard windows are composed of two overlapping rectangles. The outer rectangle is the *non-client area*, which is often referred to as *chrome*. It is drawn and managed by the operating system's window manager. Its dimensions are determined by standard operating system settings. The non-client frame provides standard window features and behaviors. These include caption buttons (Minimize, Maximize, and Close), the window border, resize and move behaviors, the application icon and title, and the system menu. The inner rectangle is the *client area*. It contains the contents of your application, and it is drawn and managed by the application. For more information about windows in WPF applications, see [WPF Windows Overview](/dotnet/framework/wpf/app-development/wpf-windows-overview). - - The following illustration shows the parts of a standard window. - - ![Window elements](~/add/media/windowoverviewfigure1.PNG "Window elements") - -## Custom Windows - You can customize a window border by setting the property to or by using the class. - -### WindowStyle.None - One way to customize the appearance of a WPF application window is to set the property to . This removes the non-client frame from the window and leaves only the client area, to which you can apply a custom style. However, when the non-client frame is removed, you also lose the system features and behaviors that it provides, such as caption buttons and window resizing. Another side effect is that the window will cover the Windows taskbar when it is maximized. Setting enables you to create a completely custom application, but also requires that you implement custom logic in your application to emulate standard window behavior. - -### WindowChrome - To customize a window while retaining its standard functionality, you can use the class. The class separates the functionality of the window frame from the visuals, and lets you control the boundary between the client and non-client areas of your application window. The class lets you put WPF content in the window frame by extending the client area to cover the non-client area. At the same time, it retains system behaviors through two invisible areas; the *resize border* and *caption* areas. - - There are two main parts to creating a custom window using the class. First, you customize the non-client part of the window by setting properties exposed on the object. Then you provide a template for the window that defines the part of your application that is extended into the non-client area. The properties exposed on the object are , , , and . - - The property specifies an invisible border around the outside of the application window that the user can click-and-drag to resize the window. - - The property specifies an invisible area at the top of the window that enables system behaviors typically associated with the title bar. These behaviors include: click and drag to move the window, double-click to maximize the window, and right-click to show the system menu. - - The resize border and caption area do not have any visual elements; they only define areas that respond to input and enable standard system-provided window behaviors. - - The property specifies the amount that the corners of the window are rounded. This property does not have any effect if the glass frame is enabled for a window. - - The property specifies the width of the glass frame around the window. By default, it uses the system value specified by the property to emulate the appearance of a standard window. When the glass frame is used, the caption buttons for Minimize, Maximize, and Close are visible and interactive. The application is responsible for displaying the application icon and caption text. You can set the property to make the glass frame wider or narrower than the default. - + class enables you to extend Windows Presentation Foundation (WPF) content into the non-client area of a window that is typically reserved for the operating system's window manager. + +## Standard Windows + Standard windows are composed of two overlapping rectangles. The outer rectangle is the *non-client area*, which is often referred to as *chrome*. It is drawn and managed by the operating system's window manager. Its dimensions are determined by standard operating system settings. The non-client frame provides standard window features and behaviors. These include caption buttons (Minimize, Maximize, and Close), the window border, resize and move behaviors, the application icon and title, and the system menu. The inner rectangle is the *client area*. It contains the contents of your application, and it is drawn and managed by the application. For more information about windows in WPF applications, see [WPF Windows Overview](/dotnet/framework/wpf/app-development/wpf-windows-overview). + + The following illustration shows the parts of a standard window. + + ![Window elements](~/add/media/windowoverviewfigure1.PNG "Window elements") + +## Custom Windows + You can customize a window border by setting the property to or by using the class. + +### WindowStyle.None + One way to customize the appearance of a WPF application window is to set the property to . This removes the non-client frame from the window and leaves only the client area, to which you can apply a custom style. However, when the non-client frame is removed, you also lose the system features and behaviors that it provides, such as caption buttons and window resizing. Another side effect is that the window will cover the Windows taskbar when it is maximized. Setting enables you to create a completely custom application, but also requires that you implement custom logic in your application to emulate standard window behavior. + +### WindowChrome + To customize a window while retaining its standard functionality, you can use the class. The class separates the functionality of the window frame from the visuals, and lets you control the boundary between the client and non-client areas of your application window. The class lets you put WPF content in the window frame by extending the client area to cover the non-client area. At the same time, it retains system behaviors through two invisible areas; the *resize border* and *caption* areas. + + There are two main parts to creating a custom window using the class. First, you customize the non-client part of the window by setting properties exposed on the object. Then you provide a template for the window that defines the part of your application that is extended into the non-client area. The properties exposed on the object are , , , and . + + The property specifies an invisible border around the outside of the application window that the user can click-and-drag to resize the window. + + The property specifies an invisible area at the top of the window that enables system behaviors typically associated with the title bar. These behaviors include: click and drag to move the window, double-click to maximize the window, and right-click to show the system menu. + + The resize border and caption area do not have any visual elements; they only define areas that respond to input and enable standard system-provided window behaviors. + + The property specifies the amount that the corners of the window are rounded. This property does not have any effect if the glass frame is enabled for a window. + + The property specifies the width of the glass frame around the window. By default, it uses the system value specified by the property to emulate the appearance of a standard window. When the glass frame is used, the caption buttons for Minimize, Maximize, and Close are visible and interactive. The application is responsible for displaying the application icon and caption text. You can set the property to make the glass frame wider or narrower than the default. + > [!CAUTION] -> The size of the caption buttons does not change when the property is changed. If the height of the top of the glass frame is less than the height of the caption buttons, the caption buttons will not be completely visible. - - To make a custom window that does not have a glass frame, set the property to a uniform value of 0. This will disable and hide the standard caption buttons. - - To extend the glass frame to cover the entire window, set the property to a negative value on any side. When the property is set to a negative value for any side, its coerced value will be equal to . - +> The size of the caption buttons does not change when the property is changed. If the height of the top of the glass frame is less than the height of the caption buttons, the caption buttons will not be completely visible. + + To make a custom window that does not have a glass frame, set the property to a uniform value of 0. This will disable and hide the standard caption buttons. + + To extend the glass frame to cover the entire window, set the property to a negative value on any side. When the property is set to a negative value for any side, its coerced value will be equal to . + > [!NOTE] -> Aero is a set of visual enhancements to the look and functionality of the Windows desktop that was introduced in Windows Vista. One of the more visually obvious features of Aero is translucent glass window borders. Windows Aero is enabled by the desktop composition feature of the Desktop Window Manager (DWM). - - Windows Aero glass effects are not supported on all operating systems, and can be disabled on supported operating systems. If Windows Aero is not available, the glass frame will not be displayed regardless of the property value. The border area specified by this property will appear black instead.Check the property to verify that Windows Aero glass effects are available. If glass effects are not available, you should provide an alternate window style that does not use the glass frame or use the standard window by setting the window style to null. - - You extend your WPF content into the window frame by specifying a ControlTemplate that defines the appearance and behavior of the frame content. You set the TargetType of the ControlTemplate to the type of the window that you are customizing. - +> Aero is a set of visual enhancements to the look and functionality of the Windows desktop that was introduced in Windows Vista. One of the more visually obvious features of Aero is translucent glass window borders. Windows Aero is enabled by the desktop composition feature of the Desktop Window Manager (DWM). + + Windows Aero glass effects are not supported on all operating systems, and can be disabled on supported operating systems. If Windows Aero is not available, the glass frame will not be displayed regardless of the property value. The border area specified by this property will appear black instead.Check the property to verify that Windows Aero glass effects are available. If glass effects are not available, you should provide an alternate window style that does not use the glass frame or use the standard window by setting the window style to null. + + You extend your WPF content into the window frame by specifying a ControlTemplate that defines the appearance and behavior of the frame content. You set the TargetType of the ControlTemplate to the type of the window that you are customizing. + ```xaml - -``` - - By default, the parts of any visual elements that are within the non-client area of the window are not interactive. To enable interactive elements in the non-client area, attach the WindowsChrome.IsHitTestVisibleInChrome attached property to the element and set it to true. - - The following XAML markup shows the main elements needed to customize a window using the WindowChrome class. - + +``` + + By default, the parts of any visual elements that are within the non-client area of the window are not interactive. To enable interactive elements in the non-client area, attach the WindowsChrome.IsHitTestVisibleInChrome attached property to the element and set it to true. + + The following XAML markup shows the main elements needed to customize a window using the WindowChrome class. + ```xaml - -``` - - The first setter attaches the WindowChrome to the window. It uses all default values for the WindowChrome properties, which makes the window look like a standard window. - + +``` + + The first setter attaches the WindowChrome to the window. It uses all default values for the WindowChrome properties, which makes the window look like a standard window. + ```xaml - - - - - -``` - - The window template must specify a content presenter to display the contents of the window specified in your application. By default the WindowChrome class extends the client area to cover the non-client border. In order to uncover the glass frame, you need to specify a margin around the ContentPresenter. This markup specifies a border with a white background around the content presenter to emulate the appearance of a standard window. It also specifies a margin that is bound to the WindowNonClientFrameThickness property, which gets the default system width for the frame. - + + + + + +``` + + The window template must specify a content presenter to display the contents of the window specified in your application. By default the WindowChrome class extends the client area to cover the non-client border. In order to uncover the glass frame, you need to specify a margin around the ContentPresenter. This markup specifies a border with a white background around the content presenter to emulate the appearance of a standard window. It also specifies a margin that is bound to the WindowNonClientFrameThickness property, which gets the default system width for the frame. + ```xaml - - - -``` - - The application icon and title are not displayed by the WindowChrome class; they have to be added to the border as custom content. The following XAML adds an image and a textblock to display the icon and title. Both elements are bound to the corresponding properties on the window. The image width is bound to the SmallIconSize width, which gets the default system size for the icon. The IsHitTestVisibleInChrome attached property is set on the image so that it can receive mouse events. - + + + +``` + + The application icon and title are not displayed by the WindowChrome class; they have to be added to the border as custom content. The following XAML adds an image and a textblock to display the icon and title. Both elements are bound to the corresponding properties on the window. The image width is bound to the SmallIconSize width, which gets the default system size for the icon. The IsHitTestVisibleInChrome attached property is set on the image so that it can receive mouse events. + ```xaml - - - -``` - + + + +``` + ]]> @@ -189,21 +189,21 @@ Gets or sets the height of the caption area at the top of a window. The height of the caption area. - property to specify the area at the top of the window that enables the system behaviors typically associated with the title bar. These behaviors include double-click to maximize the window, right-click to open the system menu, and click-and-drag to move the window. This property can be set to any non-negative double value. - - The area defined by the property starts at the bottom edge of the top resize border and extends downward the specified amount. It spans the width of the window inside the right and left resize borders. This area does not have any visual elements associated with it; it is only used to define the region that responds to the title bar behaviors. By default, the parts of any visual elements that are within the caption area of the window are not interactive. To enable interactive elements in the caption area, attach the attached property to the element and set it to `true`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the area at the top of the window that enables the system behaviors typically associated with the title bar. These behaviors include double-click to maximize the window, right-click to open the system menu, and click-and-drag to move the window. This property can be set to any non-negative double value. + + The area defined by the property starts at the bottom edge of the top resize border and extends downward the specified amount. It spans the width of the window inside the right and left resize borders. This area does not have any visual elements associated with it; it is only used to define the region that responds to the title bar behaviors. By default, the parts of any visual elements that are within the caption area of the window are not interactive. To enable interactive elements in the caption area, attach the attached property to the element and set it to `true`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -257,21 +257,21 @@ Gets or sets a value that indicates the amount that the corners of a window are rounded. A value that describes the amount that corners are rounded. - property to specify the amount of rounding at the corners of a window. This property can be set to any non-negative double value. The values can be non-uniform. - - This property does not affect maximized windows or windows that have a Windows Aero glass frame. It only has an effect when Windows Aero (also called Desktop Window Manager) is not enabled or the property is set to 0. Hit testing in the non-client area does not take the into account when determining whether the mouse is over a resize border. If the radius is too large relative to the then it is possible that the user cannot perform a diagonal resize using the mouse. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the amount of rounding at the corners of a window. This property can be set to any non-negative double value. The values can be non-uniform. + + This property does not affect maximized windows or windows that have a Windows Aero glass frame. It only has an effect when Windows Aero (also called Desktop Window Manager) is not enabled or the property is set to 0. Hit testing in the non-client area does not take the into account when determining whether the mouse is over a resize border. If the radius is too large relative to the then it is possible that the user cannot perform a diagonal resize using the mouse. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -453,11 +453,11 @@ Gets a uniform thickness of -1. A uniform thickness of -1 in all cases. - property is provided as a utility to enable you to set the thickness of the glass frame to a named property. You set the property equal to to extend the glass frame over the entire window. If the property is set to a negative value for any side, its coerced value will be equal to . - + property is provided as a utility to enable you to set the thickness of the glass frame to a named property. You set the property equal to to extend the glass frame over the entire window. If the property is set to a negative value for any side, its coerced value will be equal to . + ]]> @@ -486,23 +486,23 @@ Gets or sets a value that indicates the width of the glass border around a window. The width of the glass border around a window. - property to specify the amount that the Windows Aero glass frame extends into the client area of a window. By default, the glass frame will use system values to emulate the look of a standard window. If Windows Aero is enabled, then the standard caption buttons (Maximize, Minimize, Close) are enabled and interactive. To make a custom window that does not have a glass frame, set this thickness to a uniform value of 0. This will disable the standard caption buttons. - - To extend the glass frame to cover the entire window, set the property to a negative value on any side. If the property is set to a negative value for any side, its coerced value will be equal to . The property is provided as a utility to enable you to set the thickness of the glass frame to a named property that extends the glass over the entire window. - - Windows Aero glass effects are not supported on all operating systems, and can be disabled on supported operating systems. If Windows Aero is not available, the glass frame will not be displayed regardless of the property value. You should check the property to verify that Windows Aero glass effects are available. If glass effects are not available, you should provide an alternate window style that does not use the glass frame. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the amount that the Windows Aero glass frame extends into the client area of a window. By default, the glass frame will use system values to emulate the look of a standard window. If Windows Aero is enabled, then the standard caption buttons (Maximize, Minimize, Close) are enabled and interactive. To make a custom window that does not have a glass frame, set this thickness to a uniform value of 0. This will disable the standard caption buttons. + + To extend the glass frame to cover the entire window, set the property to a negative value on any side. If the property is set to a negative value for any side, its coerced value will be equal to . The property is provided as a utility to enable you to set the thickness of the glass frame to a named property that extends the glass over the entire window. + + Windows Aero glass effects are not supported on all operating systems, and can be disabled on supported operating systems. If Windows Aero is not available, the glass frame will not be displayed regardless of the property value. You should check the property to verify that Windows Aero glass effects are available. If glass effects are not available, you should provide an alternate window style that does not use the glass frame. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -602,22 +602,22 @@ Gets or sets a value that indicates which edges of the window frame are not owned by the client. - A bitwise combination of the enumeration values that specify which edges of the frame are not owned by the client. - - The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + A bitwise combination of the enumeration values that specify which edges of the frame are not owned by the client. + + The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> 'Left, Right, Top, Bottom' is not a valid value. At least one edge must belong to the client. @@ -672,23 +672,23 @@ Gets or sets a value that indicates the width of the border that is used to resize a window. The width of the border that is used to resize a window. - property to specify the width of the area where a user can click-and-drag to resize a window. The mouse pointer changes to resize arrows when it is moved over the resize border. - - This property can be set to any non-negative double value. The values can be non-uniform. By default, the resize border will use system values to emulate the behavior of a standard window. - - This area is only used to define the region that is used to resize the window; it does not have any visual elements associated with it. However, it does affect the layout of elements inside the resize border. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + property to specify the width of the area where a user can click-and-drag to resize a window. The mouse pointer changes to resize arrows when it is moved over the resize border. + + This property can be set to any non-negative double value. The values can be non-uniform. By default, the resize border will use system values to emulate the behavior of a standard window. + + This area is only used to define the region that is used to resize the window; it does not have any visual elements associated with it. However, it does affect the layout of elements inside the resize border. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -892,21 +892,21 @@ Gets or sets a value that indicates whether hit-testing is enabled on the Windows Aero caption buttons. - if hit-testing is enabled on the caption buttons; otherwise, . The registered default is . For more information about what can influence the value, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + if hit-testing is enabled on the caption buttons; otherwise, . The registered default is . For more information about what can influence the value, see Dependency Property Value Precedence. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -959,18 +959,18 @@ Gets or sets the instance of that is attached to a window. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> diff --git a/xml/System.Windows.Xps.Packaging/XpsDocument.xml b/xml/System.Windows.Xps.Packaging/XpsDocument.xml index b9ce7807455..fa9a94a8b53 100644 --- a/xml/System.Windows.Xps.Packaging/XpsDocument.xml +++ b/xml/System.Windows.Xps.Packaging/XpsDocument.xml @@ -26,23 +26,23 @@ Provides a that holds the content of an XPS document. - contains a that comprises one or more elements. - - The constructor is passed a reference to a for writing, storing, and reading the content elements of the document. - - A new empty XPS is created by using the constructor. - - An existing XPS is opened by using the method. - - A root is added to an empty XPS by calling the method. - - elements with printer information and control can also be associated with the , or on individual and elements that are stored in the . - - For more information about XPS, see the [XML Paper Specification (XPS)](https://www.ecma-international.org/publications-and-standards/standards/ecma-388/). - + contains a that comprises one or more elements. + + The constructor is passed a reference to a for writing, storing, and reading the content elements of the document. + + A new empty XPS is created by using the constructor. + + An existing XPS is opened by using the method. + + A root is added to an empty XPS by calling the method. + + elements with printer information and control can also be associated with the , or on individual and elements that are stored in the . + + For more information about XPS, see the [XML Paper Specification (XPS)](https://www.ecma-international.org/publications-and-standards/standards/ecma-388/). + ]]> @@ -58,19 +58,19 @@ Initializes a new instance of the class. - . - + . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreatepackageopen"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreatepackageopen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: - - The following example also shows how to create and close an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: + + The following example also shows how to create and close an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -106,19 +106,19 @@ The target XPS package for the . Initializes a new instance of the class with access to a specified XML Paper Specification (XPS) and default interleaving, resource, and compression options. - . - + . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreatepackageopen"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreatepackageopen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: - - The following example also shows how to create and close an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: + + The following example also shows how to create and close an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -156,19 +156,19 @@ The package compression option. Initializes a new instance of the class that is contained in a specified with specified default interleaving, resource, and compression options. - . - + . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreatepackageopen"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreatepackageopen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: - - The following example also shows how to create and close an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: + + The following example also shows how to create and close an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -206,19 +206,19 @@ The file I/O mode in which to open the . Initializes a new instance of the class that is contained in a specified file with default interleaving, resource, and compression options. - . - + . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreatepackageopen"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreatepackageopen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: - - The following example also shows how to create and close an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: + + The following example also shows how to create and close an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -252,19 +252,19 @@ The uniform resource identifier (URI) for the document as a string. Initializes a new instance of the class that is contained in a specified with the specified default interleaving, resource, and compression options. - . - + . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreatepackageopen"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreatepackageopen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: - - The following example also shows how to create and close an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: + + The following example also shows how to create and close an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -298,19 +298,19 @@ The package compression option. Initializes a new instance of the class that is contained in a specified file with default interleaving, resource, and compression options. - . - + . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreatepackageopen"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreatepackageopen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: - - The following example also shows how to create and close an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: + + The following example also shows how to create and close an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -341,20 +341,20 @@ Adds a root to the package and returns a writer. The XML Paper Specification (XPS) fixed-document sequence writer for this . - can be a set (sequence) of one or multiple documents. - - - -## Examples - The following example shows how to use the method to insert content into an . - + can be a set (sequence) of one or multiple documents. + + + +## Examples + The following example shows how to use the method to insert content into an . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreateaddpkgcontent"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreateaddpkgcontent"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreateaddpkgcontent"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreateaddpkgcontent"::: + ]]> @@ -422,26 +422,26 @@ Closes the XPS document . - was opened for write access, data buffers are written to the store and the physical document is closed. - - After has been called, no parts of the document can be accessed with this instance. - - - -## Examples - The following example shows how to open, insert content, and close an . - + was opened for write access, data buffers are written to the store and the physical document is closed. + + After has been called, no parts of the document can be accessed with this instance. + + + +## Examples + The following example shows how to open, insert content, and close an . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Wpf/XpsCreate/CPP/XpsCreate.cpp" id="Snippetxpscreatepackageopen"::: :::code language="csharp" source="~/snippets/csharp/System.Printing/Collation/Overview/XpsCreate.cs" id="Snippetxpscreatepackageopen"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: - - The following example also shows how to open, write to, and close an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsCreate/visualbasic/xpscreate.vb" id="Snippetxpscreatepackageopen"::: + + The following example also shows how to open, write to, and close an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -502,13 +502,13 @@ Creates an for writing an . The to use for writing the XML Paper Specification (XPS) document. - method in order to write an . - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: - + method in order to write an . + + :::code language="csharp" source="~/snippets/csharp/System.Windows.Annotations.Storage/AnnotationStore/DeleteAnnotation/ThumbViewer.cs" id="Snippetdocserializelinked"::: + ]]> @@ -542,19 +542,19 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources that are used by the and optionally, releases the managed resources. - method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. - - When the `disposing` parameter is true, this method releases all resources that are held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. - + + When the `disposing` parameter is true, this method releases all resources that are held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. + ]]> - Other objects can call multiple times. When you override , be careful not to reference objects that were previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - - For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + Other objects can call multiple times. When you override , be careful not to reference objects that were previously disposed of in an earlier call to . For more information about how to implement , see Implementing a Dispose Method. + + For more information about and , see Cleaning Up Unmanaged Resources and Overriding the Finalize Method. @@ -583,19 +583,19 @@ Gets an for reading the document. An for reading the document. - can be a set (sequence) of one or multiple documents. - - - -## Examples - The following example shows how to get a in order to access parts in an . - + can be a set (sequence) of one or multiple documents. + + + +## Examples + The following example shows how to get a in order to access parts in an . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Documents.DocumentStructures/FigureStructure/Overview/Window1.xaml.cs" id="Snippetdocstrucfixeddoc"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DocumentStructure/visualbasic/window1.xaml.vb" id="Snippetdocstrucfixeddoc"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/DocumentStructure/visualbasic/window1.xaml.vb" id="Snippetdocstrucfixeddoc"::: + ]]> @@ -628,11 +628,11 @@ Returns the fixed-document sequence at the root of the package. The of the package. - can be a set (sequence) of one or multiple documents. - + can be a set (sequence) of one or multiple documents. + ]]> @@ -778,11 +778,11 @@ Gets a collection of XML Paper Specification (XPS) signatures that are associated with the package. A of objects that represent the signatures that are associated with the package. - list identifies what parts are signed and whether the signatures are valid. - + list identifies what parts are signed and whether the signatures are valid. + ]]> @@ -795,14 +795,14 @@ Signs a collection of package parts by using a specified X.509 certificate. - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/SignatureDefinitionsAndSigning.cs" id="Snippetsignxpsdocument"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: + ]]> @@ -841,19 +841,19 @@ Signs a collection of package parts with a specified X.509 certificate. An that contains information about the signature. - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/SignatureDefinitionsAndSigning.cs" id="Snippetsignxpsdocument"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: + ]]> @@ -894,19 +894,19 @@ Signs a collection of package parts by using a specified X.509 certificate. An that contains information about the signature. - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/SignatureDefinitionsAndSigning.cs" id="Snippetsignxpsdocument"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: + ]]> @@ -950,21 +950,21 @@ Signs a collection of package parts with a specified X.509 certificate. An that contains information about the signature. - is thrown if `certificate` is `null` and no certificates are installed. - - - -## Examples - The following example shows how to use the method. - + is thrown if `certificate` is `null` and no certificates are installed. + + + +## Examples + The following example shows how to use the method. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/SignatureDefinitionsAndSigning.cs" id="Snippetsignxpsdocument"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/XpsReadWriteSign/visualbasic/signaturedefinitionsandsigning.vb" id="Snippetsignxpsdocument"::: + ]]> diff --git a/xml/System.Windows/FrameworkContentElement.xml b/xml/System.Windows/FrameworkContentElement.xml index a6365cd48c4..248e13d665d 100644 --- a/xml/System.Windows/FrameworkContentElement.xml +++ b/xml/System.Windows/FrameworkContentElement.xml @@ -61,15 +61,15 @@ is the WPF framework-level implementation and expansion of the base class. adds support for additional input APIs (including tooltips and context menus), storyboards, data context for data binding, styles support, and logical tree helper APIs. - does not yet define its own rendering behavior; instantiating an actual class instance in code or markup is possible but displays nothing in a WPF application user interface (UI). Rendering logic must be provided by classes that take child elements as part of their content model, or in derived classes. - - deliberately parallels many of the same APIs as . Note that certain APIs found on will not have a equivalent. Several of the APIs are for functionality such as geometry representation or layout, which are not relevant for a . - - The majority of existing derived classes will be found in the namespace. Many of these derived classes implement elements for the flow document model. Certain derived classes such as have some control-like functionality, but are derived from such that the control-like elements can still participate in the flow document model. - + does not yet define its own rendering behavior; instantiating an actual class instance in code or markup is possible but displays nothing in a WPF application user interface (UI). Rendering logic must be provided by classes that take child elements as part of their content model, or in derived classes. + + deliberately parallels many of the same APIs as . Note that certain APIs found on will not have a equivalent. Several of the APIs are for functionality such as geometry representation or layout, which are not relevant for a . + + The majority of existing derived classes will be found in the namespace. Many of these derived classes implement elements for the flow document model. Certain derived classes such as have some control-like functionality, but are derived from such that the control-like elements can still participate in the flow document model. + ]]> @@ -127,15 +127,15 @@ The child element to be added. Adds the provided element as a child of this element. - derived classes expose dedicated collections that are responsible for containment (for example, on the class; on the class). You can typically avoid any need to manipulate the logical tree directly if you derive from these classes instead. Working with the logical tree for content elements is an advanced scenario that may require a specialized parser or a specialized that acts as the parent rendering element (content host). - - For more information about how to use and , see [Trees in WPF](/dotnet/framework/wpf/advanced/trees-in-wpf). - + derived classes expose dedicated collections that are responsible for containment (for example, on the class; on the class). You can typically avoid any need to manipulate the logical tree directly if you derive from these classes instead. Working with the logical tree for content elements is an advanced scenario that may require a specialized parser or a specialized that acts as the parent rendering element (content host). + + For more information about how to use and , see [Trees in WPF](/dotnet/framework/wpf/advanced/trees-in-wpf). + ]]> @@ -172,10 +172,10 @@ Called before an element is initialized. To be added. - Override this method to provide special handling that should occur 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. - + Override this method to provide special handling that should occur 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. + The base implementation will throw an exception if is called more than one time on the same element prior to reaching . @@ -223,11 +223,11 @@ The storyboard to begin. Begins the sequence of actions that are contained in the provided storyboard. - @@ -268,24 +268,24 @@ A value of the enumeration that describes behavior to use if a property described in the storyboard is already animated. Begins the sequence of actions that are contained in the provided storyboard, with options specified for what should occur if the property is already animated. - , , or to a property by using the , any 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 , 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 or 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 from a list of clocks, use the property of the to retrieve a , then call the method of the . This is typically done in the event handler for a clock. Note that only root clocks can be controlled by a ; the property of a child clock returns `null`. Note also that the event is not raised if the effective duration of the clock is forever. In that case, the user must determine when to call . - - 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](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). - + , , or to a property by using the , any 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 , 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 or 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 from a list of clocks, use the property of the to retrieve a , then call the method of the . This is typically done in the event handler for a clock. Note that only root clocks can be controlled by a ; the property of a child clock returns `null`. Note also that the event is not raised if the effective duration of the clock is forever. In that case, the user must determine when to call . + + 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](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). + ]]> @@ -322,24 +322,24 @@ Declares whether the animation is controllable (can be paused) after it is started. Begins the sequence of actions that are contained in the provided storyboard, with specified state for control of the animation after it is started. - , , or to a property by using the , any objects previously associated with that property continue to consume system resources; the timing system does not remove these clocks automatically. - - To avoid performance issues when you apply a large number of clocks by using , 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 or 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 from a list of clocks, use the property of the to retrieve a , then call the method of the . This is typically done in the event handler for a clock. Note that only root clocks can be controlled by a ; the property of a child clock returns `null`. Note also that the event is not raised if the effective duration of the clock is forever. In that case, the user must determine when to call . - - 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](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). - + , , or to a property by using the , any objects previously associated with that property continue to consume system resources; the timing system does not remove these clocks automatically. + + To avoid performance issues when you apply a large number of clocks by using , 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 or 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 from a list of clocks, use the property of the to retrieve a , then call the method of the . This is typically done in the event handler for a clock. Note that only root clocks can be controlled by a ; the property of a child clock returns `null`. Note also that the event is not raised if the effective duration of the clock is forever. In that case, the user must determine when to call . + + 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](/dotnet/framework/wpf/graphics-multimedia/animation-and-timing-system-overview). + ]]> @@ -379,21 +379,21 @@ Gets or sets the that is used for the element. The that is used for the element. - 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 controls, each of which is bound to one of the object's properties. You can use a in a to validate the `Address` object. For example, the can ensure that the zip code is valid for the country/region of the address. - - Child elements inherit the from their parent elements, just as with any other inheritable property. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + 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 controls, each of which is bound to one of the object's properties. You can use a in a to validate the `Address` object. For example, the can ensure that the zip code is valid for the country/region of the address. + + Child elements inherit the from their parent elements, just as with any other inheritable property. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -449,11 +449,11 @@ Attempts to bring this element into view, within any scrollable regions it is contained within. - on any parent scrollable area that contains the element (the parent may very well be a , not a ). If this element is not contained in a scrollable area, the event is still raised, but there will be no effect. - + on any parent scrollable area that contains the element (the parent may very well be a , not a ). If this element is not contained in a scrollable area, the event is still raised, but there will be no effect. + ]]> How to: Create a ScrollViewer @@ -484,25 +484,25 @@ Gets or sets the context menu element that should appear whenever the context menu is requested via user interface (UI) from within this element. The context menu that this element uses. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example places a on a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml" id="Snippetcontextmenu"::: - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example places a on a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml" id="Snippetcontextmenu"::: + ]]> @@ -533,34 +533,34 @@ Occurs just before any context menu on the element is closed. - in a style, you must reference the underlying service event identifier: - - :::code language="xaml" source="~/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/pseudocode.xaml" id="Snippetfecontextmenuclosing"::: - - (This usage is required because the event implementation on that exposes the underlying service event does not correctly map the identifier for use in triggers). - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|| - - - -## Examples - The following example implements a handler that changes the cursor over a named region `DisplayArea` (not shown). The comment hints at a usage, but in fact this sample would be identical if `DisplayArea` were a . - + in a style, you must reference the underlying service event identifier: + + :::code language="xaml" source="~/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/pseudocode.xaml" id="Snippetfecontextmenuclosing"::: + + (This usage is required because the event implementation on that exposes the underlying service event does not correctly map the identifier for use in triggers). + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|| + + + +## Examples + The following example implements a handler that changes the cursor over a named region `DisplayArea` (not shown). The comment hints at a usage, but in fact this sample would be identical if `DisplayArea` were a . + :::code language="csharp" source="~/snippets/csharp/System.Windows/FrameworkContentElement/ContextMenuClosing/Window1.xaml.cs" id="Snippetchangecursorssample"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/cursors/VisualBasic/Window1.xaml.vb" id="Snippetchangecursorssample"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/cursors/VisualBasic/Window1.xaml.vb" id="Snippetchangecursorssample"::: + ]]> @@ -588,13 +588,13 @@ System.Windows.RoutedEvent - Identifies the [Routed Events Overview](/dotnet/framework/wpf/advanced/routed-events-overview). + Identifies the Routed Events Overview. - ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. - + ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. + ]]> @@ -623,26 +623,26 @@ Occurs when any context menu on the element is opened. - 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 property and then open the new . However, there is a timing issue you should be aware of. In order to completely replace the context menu through a 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](/dotnet/framework/wpf/advanced/how-to-handle-the-contextmenuopening-event). - - To use this event as an in a style, you must reference the underlying service event identifier: - - :::code language="xaml" source="~/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/pseudocode.xaml" id="Snippetfecontextmenuopening"::: - - (This usage is required because the event implementation on that exposes the underlying service event does not correctly map the identifier for use in triggers). - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Bubbling| -|Delegate|| - + 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 property and then open the new . However, there is a timing issue you should be aware of. In order to completely replace the context menu through a 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](/dotnet/framework/wpf/advanced/how-to-handle-the-contextmenuopening-event). + + To use this event as an in a style, you must reference the underlying service event identifier: + + :::code language="xaml" source="~/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/pseudocode.xaml" id="Snippetfecontextmenuopening"::: + + (This usage is required because the event implementation on that exposes the underlying service event does not correctly map the identifier for use in triggers). + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Bubbling| +|Delegate|| + ]]> @@ -671,13 +671,13 @@ System.Windows.RoutedEvent - Identifies the [Routed Events Overview](/dotnet/framework/wpf/advanced/routed-events-overview). + Identifies the Routed Events Overview. - ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. - + ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. + ]]> @@ -733,39 +733,39 @@ Gets or sets the cursor that displays when the mouse pointer is over this element. The cursor to display. The default value is defined as per this dependency property. However, the practical default at run time will come from a variety of factors. - class to evaluate the string. The provided string should evaluate to a value. See 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 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 with no programmatic values from any source, the default cursor over a Windows Presentation Foundation (WPF) application will be an arrow. - - Each movement of the mouse over a WPF application raises a 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 via the arguments of this event. If that happens, the fact that the event is handled and has a changed value in the arguments takes precedence over the value of the property at any level, unless is set. - - If not creating a custom cursor, typically you set this property to a static property value of the class. - - Setting the to a custom value is not enabled in partial trust. For more information on custom cursors, see [Input Overview](/dotnet/framework/wpf/advanced/input-overview). - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example sets the cursor to a custom value. - + class to evaluate the string. The provided string should evaluate to a value. See 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 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 with no programmatic values from any source, the default cursor over a Windows Presentation Foundation (WPF) application will be an arrow. + + Each movement of the mouse over a WPF application raises a 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 via the arguments of this event. If that happens, the fact that the event is handled and has a changed value in the arguments takes precedence over the value of the property at any level, unless is set. + + If not creating a custom cursor, typically you set this property to a static property value of the class. + + Setting the to a custom value is not enabled in partial trust. For more information on custom cursors, see [Input Overview](/dotnet/framework/wpf/advanced/input-overview). + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example sets the cursor to a custom value. + :::code language="csharp" source="~/snippets/csharp/System.Windows/FrameworkContentElement/ContextMenuClosing/Window1.xaml.cs" id="Snippetchangecursorssample"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/cursors/VisualBasic/Window1.xaml.vb" id="Snippetchangecursorssample"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/cursors/VisualBasic/Window1.xaml.vb" id="Snippetchangecursorssample"::: + ]]> @@ -834,73 +834,73 @@ Gets or sets the data context for an element when it participates in data binding. The object to use as data context. - object. - - This dependency property inherits property values. If there are child elements with no other value for established through local values or styles, the property system will set the value to be the value of the nearest parent element with this value assigned. - - Alternatively, you can use one of the following properties of the class to specify the binding source explicitly: , , or . For more information, see [How to: Specify the Binding Source](/dotnet/framework/wpf/data/how-to-specify-the-binding-source). - - In XAML, is most commonly set to as a declaration. You can use either property element syntax or attribute syntax. Attribute syntax is shown in the example on this page. You can also set in code. - - -## XAML Property Element Usage - -``` - - - - - -``` - - -## XAML Attribute Usage - + object. + + This dependency property inherits property values. If there are child elements with no other value for established through local values or styles, the property system will set the value to be the value of the nearest parent element with this value assigned. + + Alternatively, you can use one of the following properties of the class to specify the binding source explicitly: , , or . For more information, see [How to: Specify the Binding Source](/dotnet/framework/wpf/data/how-to-specify-the-binding-source). + + In XAML, is most commonly set to as a declaration. You can use either property element syntax or attribute syntax. Attribute syntax is shown in the example on this page. You can also set in code. + + +## XAML Property Element Usage + +``` + + + + + +``` + + +## XAML Attribute Usage + ```xaml - + ``` -or- ```xaml - + ``` - -## XAML Values - *dataContextObject* - A directly embedded object that serves as data context for any bindings within the parent element. Typically, this object is a or another subclass. Alternatively, raw data of any CLR 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](/dotnet/framework/wpf/advanced/binding-markup-extension). - - *resourceExtension* - One of the following: `StaticResource`, or `DynamicResource`. This usage is used when referring to raw data defined as an object in resources. See [XAML Resources](/dotnet/framework/wpf/advanced/xaml-resources). - - *contextResourceKey* - The key identifier for the object being requested from within a . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example sets a binding on a element, by creating a new custom data object, establishing that object as , and setting the binding path to a property within it. - + +## XAML Values + *dataContextObject* + A directly embedded object that serves as data context for any bindings within the parent element. Typically, this object is a or another subclass. Alternatively, raw data of any CLR 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](/dotnet/framework/wpf/advanced/binding-markup-extension). + + *resourceExtension* + One of the following: `StaticResource`, or `DynamicResource`. This usage is used when referring to raw data defined as an object in resources. See [XAML Resources](/dotnet/framework/wpf/advanced/xaml-resources). + + *contextResourceKey* + The key identifier for the object being requested from within a . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example sets a binding on a element, by creating a new custom data object, establishing that object as , and setting the binding path to a property within it. + :::code language="csharp" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml.cs" id="Snippetdatacontext"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetdatacontext"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetdatacontext"::: + ]]> @@ -929,14 +929,14 @@ Occurs when this element's data context changes. - [!IMPORTANT] -> When an element's changes, all data-bound properties on this element are potentially affected. This applies to any elements that are descendant elements of the current element, which inherit the data context, and also the current element itself. All such bindings re-interpret the new to reflect the new value in bindings. There is no guarantee made about the order of these changes relative to the raising of the event. The changes can occur before the event, after the event, or in any mixture. - +> When an element's changes, all data-bound properties on this element are potentially affected. This applies to any elements that are descendant elements of the current element, which inherit the data context, and also the current element itself. All such bindings re-interpret the new to reflect the new value in bindings. There is no guarantee made about the order of these changes relative to the raising of the event. The changes can occur before the event, after the event, or in any mixture. + ]]> @@ -992,23 +992,23 @@ Gets or sets the key to use to find the style template for this control in themes. The style key. To work correctly as part of theme style lookup, this value is expected to be the of the element being styled. is an accepted value for a certain case. - method against the identifier, within the static constructor of the control subclass. - - For instance, an inline class such as actually has very little implementation beyond overriding the metadata in its static constructor, and exposing several instance constructors. The fact that elements surrounded by the tag gain a property of is implemented within the theme style that was referenced by setting the default value of to `typeof(Bold)`. - - If you want your element or control to deliberately not use theme styles, set the property to `true`. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + method against the identifier, within the static constructor of the control subclass. + + For instance, an inline class such as actually has very little implementation beyond overriding the metadata in its static constructor, and exposing several instance constructors. The fact that elements surrounded by the tag gain a property of is implemented within the theme style that was referenced by setting the default value of to `typeof(Bold)`. + + If you want your element or control to deliberately not use theme styles, set the property to `true`. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1067,15 +1067,15 @@ Called immediately after an element is initialized. - was previously called, the base implementation will raise the event. Otherwise, if was not called or it could not be determined whether was called, the event is not raised. - + was previously called, the base implementation will raise the event. Otherwise, if was not called or it could not be determined whether was called, the event is not raised. + ]]> @@ -1109,19 +1109,19 @@ Finds an element that has the provided identifier name. The requested element. May be if no matching element was found. - on a page. - + on a page. + :::code language="csharp" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml.cs" id="Snippetfindname"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetfindname"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetfindname"::: + ]]> @@ -1155,25 +1155,25 @@ Searches for a resource with the specified key, and will throw an exception if the requested resource is not found. The found resource, or if no matching resource was found (but will also throw an exception if ). - [!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 for this case, you should instead call . returns `null` when no resource is found, and does not throw an exception. - - If the resource is not found on the calling element, the parent tree is searched using the logical tree, in the same way that the tree would be searched if a resource were requested by key at run-time. - - Typically you would immediately cast the return value to the type of the property that you were attempting to set with the returned resource value. - - - -## Examples - The following example finds a resource as defined in markup and applies it to a certain property of an element in response to a routed event. - +> If you call this method for a key that cannot be found, an exception is thrown. If you do not want to handle exceptions for this case, you should instead call . returns `null` when no resource is found, and does not throw an exception. + + If the resource is not found on the calling element, the parent tree is searched using the logical tree, in the same way that the tree would be searched if a resource were requested by key at run-time. + + Typically you would immediately cast the return value to the type of the property that you were attempting to set with the returned resource value. + + + +## Examples + The following example finds a resource as defined in markup and applies it to a certain property of an element in response to a routed event. + :::code language="csharp" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml.cs" id="Snippetfindresource"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetfindresource"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetfindresource"::: + ]]> The requested resource key was not found. @@ -1206,44 +1206,44 @@ Gets or sets an object that enables customization of appearance, effects, or other style characteristics that will apply to this element when it captures keyboard focus. The desired style to apply on focus. The default value as declared in the dependency property is an empty static . However, the effective value at run time is often (but not always) a style as supplied by theme support for controls. - . - - Note that this property affects visual appearance but does not report so in metadata. This is because the visual appearance change is event-driven and may not apply at all times, and thus 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 element to element. 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 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 element-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 or , 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 and alternative focus properties, see [Styling for Focus in Controls, and FocusVisualStyle](/dotnet/framework/wpf/advanced/styling-for-focus-in-controls-and-focusvisualstyle). - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Property Element Usage - - -## XAML Values - *resourceExtension* - One of the following: , or . See [XAML Resources](/dotnet/framework/wpf/advanced/xaml-resources). - - *styleResourceKey* - The key that identifies the style being requested. The key refers to an existing resource in a . - + . + + Note that this property affects visual appearance but does not report so in metadata. This is because the visual appearance change is event-driven and may not apply at all times, and thus 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 element to element. 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 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 element-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 or , 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 and alternative focus properties, see [Styling for Focus in Controls, and FocusVisualStyle](/dotnet/framework/wpf/advanced/styling-for-focus-in-controls-and-focusvisualstyle). + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Property Element Usage + + +## XAML Values + *resourceExtension* + One of the following: , or . See [XAML Resources](/dotnet/framework/wpf/advanced/xaml-resources). + + *styleResourceKey* + The key that identifies the style being requested. The key refers to an existing resource in a . + > [!NOTE] -> Property element syntax is technically possible, but not recommended. See [Inline Styles and Templates](/dotnet/framework/wpf/advanced/inline-styles-and-templates). A binding reference using [TemplateBinding](/dotnet/framework/wpf/advanced/templatebinding-markup-extension) or is also possible, but uncommon. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - +> Property element syntax is technically possible, but not recommended. See [Inline Styles and Templates](/dotnet/framework/wpf/advanced/inline-styles-and-templates). A binding reference using [TemplateBinding](/dotnet/framework/wpf/advanced/templatebinding-markup-extension) or is also possible, but uncommon. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -1300,26 +1300,26 @@ to force cursor presentation while over this element to use this instance's setting for the cursor (including on all child elements); otherwise . The default value is . - is more appropriate in control subclassing or compositing scenarios. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example forces the cursor while over the element. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/FrameworkContentElement/ForceCursor/default.xaml" id="Snippetforcecursor"::: - + is more appropriate in control subclassing or compositing scenarios. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example forces the cursor while over the element. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/FrameworkContentElement/ForceCursor/default.xaml" id="Snippetforcecursor"::: + ]]> @@ -1379,14 +1379,14 @@ Gets the for the specified property's binding. Returns a if the target is data bound; otherwise, . - @@ -1417,11 +1417,11 @@ Returns an alternative logical parent for this element if there is no visual parent. In this case, a parent is always the same value as the property. Returns something other than whenever a WPF framework-level implementation of this method has a non-visual parent connection. - @@ -1456,11 +1456,11 @@ Occurs when this is initialized. This coincides with cases where the value of the property changes from (or undefined) to . - or methods are called. Calls to these methods could have been made by deliberate code, or by the Extensible Application Markup Language (XAML) loading process. - + or methods are called. Calls to these methods could have been made by deliberate code, or by the Extensible Application Markup Language (XAML) loading process. + ]]> @@ -1490,21 +1490,21 @@ Gets or sets the context for input used by this . The input scope, which modifies how input from alternative input methods is interpreted. The default value is (which results in a default handling of commands). - established through local values or styles, the property system will set the value to be the value of the nearest parent element with this value assigned. - - Although a XAML syntax usage is listed and is syntactically allowed, setting this property in XAML is not common. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + established through local values or styles, the property system will set the value to be the value of the nearest parent element with this value assigned. + + Although a XAML syntax usage is listed and is syntactically allowed, setting this property in XAML is not common. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1571,11 +1571,11 @@ if the element is initialized per the aforementioned loading or method calls; otherwise, . - @@ -1607,19 +1607,19 @@ if the current element is attached to an element tree and has been rendered; if the element has never been attached to a loaded element tree. - as a conditional check to assure that a function `displayData` (not shown) will have valid elements loaded on the page to work against, as part of an on-demand handler. That same logic is run as an event handler for . - + as a conditional check to assure that a function `displayData` (not shown) will have valid elements loaded on the page to work against, as part of an on-demand handler. That same logic is run as an event handler for . + :::code language="csharp" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml.cs" id="Snippetisloaded"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetisloaded"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetisloaded"::: + ]]> @@ -1650,21 +1650,21 @@ Gets or sets localization/globalization language information that applies to an individual element. The culture information for this element. The default value is an instance with its value set to the string "en-US". - for more information on the values and format. - - This dependency property inherits property values. If there are child elements with no other value for established through local values or styles, the property system will set the value to be the value of the nearest parent element with this value assigned. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + for more information on the values and format. + + This dependency property inherits property values. If there are child elements with no other value for established through local values or styles, the property system will set the value to be the value of the nearest parent element with this value assigned. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1719,20 +1719,20 @@ Occurs when the element is laid out, rendered, and ready for interaction. - in a style. - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Direct| -|Delegate|| - + in a style. + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Direct| +|Delegate|| + ]]> @@ -1759,13 +1759,13 @@ System.Windows.RoutedEvent - Identifies the [Routed Events Overview](/dotnet/framework/wpf/advanced/routed-events-overview). + Identifies the Routed Events Overview. - ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. - + ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. + ]]> @@ -1795,11 +1795,11 @@ Gets an enumerator for the logical child elements of this element. An enumerator for logical child elements of this element. - and , see [Trees in WPF](/dotnet/framework/wpf/advanced/trees-in-wpf). - + and , see [Trees in WPF](/dotnet/framework/wpf/advanced/trees-in-wpf). + ]]> @@ -1874,31 +1874,31 @@ Gets or sets the identifying name of the element. The name provides an instance reference so that programmatic code-behind, such as event handler code, can refer to an element once it is constructed during parsing of XAML. The name of the element. - from code is not common, because if you have the appropriate reference in code already, you can just call methods and properties on the element reference and do not generally need the . An exception is if the string has some overloaded meaning, for instance if it is useful to display that name in UI. Setting a from code if the original was set from markup is also not recommended, and changing the property will not change the object reference. Such object references are created only when the underlying namescopes are explicitly created during XAML loading. - - You must specifically call to make an effective change on the property of an already loaded element. - - One notable case where setting from code is important is for naming elements that storyboards will run against. Before you can register a name, might also need to instantiate and assign a instance. See the Example section, or [Storyboards Overview](/dotnet/framework/wpf/graphics-multimedia/storyboards-overview). - - Setting from code has limited applications, but looking up an element by name is more common, particularly if you are employing a navigation model where pages reload into the application and the run-time code is not necessarily the code-behind of that respective page. The utility method , which is available from any , can find any element by in that element's logical tree recursively. Or you can use the static method of , which also takes the string as an argument. - - Commonly used root elements (, for example) implement the interface . Implementations of this interface are expected to enforce that names be unambiguous within their scope. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + from code is not common, because if you have the appropriate reference in code already, you can just call methods and properties on the element reference and do not generally need the . An exception is if the string has some overloaded meaning, for instance if it is useful to display that name in UI. Setting a from code if the original was set from markup is also not recommended, and changing the property will not change the object reference. Such object references are created only when the underlying namescopes are explicitly created during XAML loading. + + You must specifically call to make an effective change on the property of an already loaded element. + + One notable case where setting from code is important is for naming elements that storyboards will run against. Before you can register a name, might also need to instantiate and assign a instance. See the Example section, or [Storyboards Overview](/dotnet/framework/wpf/graphics-multimedia/storyboards-overview). + + Setting from code has limited applications, but looking up an element by name is more common, particularly if you are employing a navigation model where pages reload into the application and the run-time code is not necessarily the code-behind of that respective page. The utility method , which is available from any , can find any element by in that element's logical tree recursively. Or you can use the static method of , which also takes the string as an argument. + + Commonly used root elements (, for example) implement the interface . Implementations of this interface are expected to enforce that names be unambiguous within their scope. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -1958,13 +1958,13 @@ Provides data about the event. Invoked whenever the routed event reaches this class in its route. Implement this method to add class handling for this event. - could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. - + could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. + ]]> @@ -1997,13 +1997,13 @@ Event data for the event. Invoked whenever the routed event reaches this class in its route. Implement this method to add class handling for this event. - could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. - + could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. + ]]> @@ -2036,13 +2036,13 @@ Event data for the event. Class handler for the event. - @@ -2075,13 +2075,13 @@ Event data for the event. Raises the event. This method is invoked whenever is set to . - property is read-only. Therefore, you cannot set it to force initialization behavior that way. Initialization setting is intended to be done only by the Windows Presentation Foundation (WPF) framework. - + property is read-only. Therefore, you cannot set it to force initialization behavior that way. Initialization setting is intended to be done only by the Windows Presentation Foundation (WPF) framework. + ]]> @@ -2114,15 +2114,15 @@ The event data that describes the property that changed, including the old and new values. Invoked whenever the effective value of any dependency property on this has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides . - or functions for individual properties. However, you would use this method if a includes a significant number of value-interrelated dependency properties, or if it includes logic such as rendering behavior that must be rerun for several related cases of property invalidations. - - Note that there is an identically named `OnPropertyChanged` method with a different signature (the parameter type is ) that can appear on a number of classes. That `OnPropertyChanged` is used for data object notifications, and is part of the contract for . - + or functions for individual properties. However, you would use this method if a includes a significant number of value-interrelated dependency properties, or if it includes logic such as rendering behavior that must be rerun for several related cases of property invalidations. + + Note that there is an identically named `OnPropertyChanged` method with a different signature (the parameter type is ) that can appear on a number of classes. That `OnPropertyChanged` is used for data object notifications, and is part of the contract for . + ]]> @@ -2168,11 +2168,11 @@ The new style. Invoked when the style that is in use on this element changes. - @@ -2209,13 +2209,13 @@ Provides data about the event. Invoked whenever the routed event reaches this class in its route. Implement this method to add class handling for this event. - could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. - + could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. + ]]> @@ -2248,13 +2248,13 @@ Provides data about the event. Invoked whenever the routed event reaches this class in its route. Implement this method to add class handling for this event. - could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. - + could choose to call private class handler methods when the event is received along the route. One potential scenario is to take the arguments of the event and deliberately mark the event as handled to shorten the route. + ]]> @@ -2285,19 +2285,19 @@ if this element does not use theme style properties; all style-originating properties come from local application styles, and theme style properties do not apply. if application styles apply first, and then theme styles apply for properties that were not specifically set in application styles. - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + ]]> @@ -2360,27 +2360,27 @@ Gets the parent in the logical tree for this element. The logical parent for this element. - that applies for bindings can also change when elements are reparented. - - Changing an element's parent is typically only done through manipulation of collections, by using dedicated add or remove methods, or through setting content properties of elements. - - The most typical scenario for using the property is to obtain a reference and then get various property values from the parent. For templates, the of the template eventually will be `null`. To get past this point and extend into the logical tree where the template is actually applied, use . - - - -## Examples - The following example checks to see whether the of a is of a particular type. - + that applies for bindings can also change when elements are reparented. + + Changing an element's parent is typically only done through manipulation of collections, by using dedicated add or remove methods, or through setting content properties of elements. + + The most typical scenario for using the property is to obtain a reference and then get various property values from the parent. For templates, the of the template eventually will be `null`. To get past this point and extend into the logical tree where the template is actually applied, use . + + + +## Examples + The following example checks to see whether the of a is of a particular type. + :::code language="csharp" source="~/snippets/csharp/System.Windows/FrameworkContentElement/Parent/Window1.xaml.cs" id="Snippetfceparent"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextPointer_Snippets/visualbasic/window1.xaml.vb" id="Snippetfceparent"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextPointer_Snippets/visualbasic/window1.xaml.vb" id="Snippetfceparent"::: + ]]> @@ -2415,11 +2415,11 @@ Determines the next element that would receive focus relative to this element for a provided focus movement direction, but does not actually move the focus. This method is sealed and cannot be overridden. The next element that focus would move to if focus were actually traversed. May return if focus cannot be moved relative to this element for the provided direction. - is the related method that actually does move focus. - + is the related method that actually does move focus. + ]]> Specified one of the following directions in the : , , , . These directions are not legal for (but they are legal for ). @@ -2455,13 +2455,13 @@ Object for the mapping. Provides an accessor that simplifies access to the registration method. - . The implementation will check successive parent elements until it finds the applicable implementation, which is found by finding an element that implements . For more information about namescopes, see [WPF XAML Namescopes](/dotnet/framework/wpf/advanced/wpf-xaml-namescopes). - - Calling is necessary in order to correctly hook up animation storyboards for applications when created in code. This is because one of the key storyboard properties, , uses a run-time name lookup instead of being able to take a reference to a target element. This is true even if that element is accessible by reference from the code. For more information on why you need to register names for storyboard targets, see [Storyboards Overview](/dotnet/framework/wpf/graphics-multimedia/storyboards-overview). Animations for content elements are less common than animations on controls, the [Storyboards Overview](/dotnet/framework/wpf/graphics-multimedia/storyboards-overview) concentrates on control scenarios. - + . The implementation will check successive parent elements until it finds the applicable implementation, which is found by finding an element that implements . For more information about namescopes, see [WPF XAML Namescopes](/dotnet/framework/wpf/advanced/wpf-xaml-namescopes). + + Calling is necessary in order to correctly hook up animation storyboards for applications when created in code. This is because one of the key storyboard properties, , uses a run-time name lookup instead of being able to take a reference to a target element. This is true even if that element is accessible by reference from the code. For more information on why you need to register names for storyboard targets, see [Storyboards Overview](/dotnet/framework/wpf/graphics-multimedia/storyboards-overview). Animations for content elements are less common than animations on controls, the [Storyboards Overview](/dotnet/framework/wpf/graphics-multimedia/storyboards-overview) concentrates on control scenarios. + ]]> @@ -2496,13 +2496,13 @@ The element to remove. Removes the specified element from the logical tree for this element. - derived classes expose dedicated collections that are responsible for containment (for example, on the class; on the class). Deriving from such classes typically can avoid any need to manipulate the logical tree directly. - + derived classes expose dedicated collections that are responsible for containment (for example, on the class; on the class). Deriving from such classes typically can avoid any need to manipulate the logical tree directly. + ]]> @@ -2539,42 +2539,42 @@ Gets or sets the current locally-defined resource dictionary. The current locally-defined resources. This is a dictionary of resources, where resources within the dictionary are accessed by key. - is raised by the element that declares the dictionary. In fact, resources are parsed asynchronously, and not even the event is an assurance that you can reference a XAML defined resource. For this reason you should generally only access XAML defined resources as part of run-time code, or through other XAML techniques such as styles or resource extension references for attribute values. When you access resources through code, it is essentially equivalent to a [DynamicResource](/dotnet/framework/wpf/advanced/dynamicresource-markup-extension) reference made from XAML. - - The underlying supports the methods required to add, remove, or query resources from within the collection by using code. The property is settable to support the scenario of completely replacing the resources collection of an element to be a new or different . - - Notice that the XAML syntax shown does not include an element for the . This is an example of implicit collection syntax; a tag representing the collection element can be omitted. The elements that are added as items to the collection are specified instead. For more information about implicit collections and XAML, see [XAML Syntax In Detail](/dotnet/framework/wpf/advanced/xaml-syntax-in-detail). One case where a is still specified explicitly as an element is if you are introducing a merged dictionary, in which case there are typically no child elements for that . For details, see [Merged Resource Dictionaries](/dotnet/framework/wpf/advanced/merged-resource-dictionaries). - - -## XAML Property Element Usage - -``` - - - oneOrMoreResourceElements - - -``` - - -## XAML Values - *oneOrMoreResourceElements* - One or more object elements, each of which defines a resource. Each resource property element within each must have a unique value for the [x:Key Directive](/dotnet/framework/xaml-services/x-key-directive), which serves as the unique key when values are retrieved from the . - - - -## Examples - The following example establishes a collection on a root element. is a typical choice because it is one of the few classes that make sense as a root element, and resources are generally stored at the page root or at even higher levels such as in the application. - - :::code language="xaml" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page2.xaml" id="Snippetfceresources"::: - + is raised by the element that declares the dictionary. In fact, resources are parsed asynchronously, and not even the event is an assurance that you can reference a XAML defined resource. For this reason you should generally only access XAML defined resources as part of run-time code, or through other XAML techniques such as styles or resource extension references for attribute values. When you access resources through code, it is essentially equivalent to a [DynamicResource](/dotnet/framework/wpf/advanced/dynamicresource-markup-extension) reference made from XAML. + + The underlying supports the methods required to add, remove, or query resources from within the collection by using code. The property is settable to support the scenario of completely replacing the resources collection of an element to be a new or different . + + Notice that the XAML syntax shown does not include an element for the . This is an example of implicit collection syntax; a tag representing the collection element can be omitted. The elements that are added as items to the collection are specified instead. For more information about implicit collections and XAML, see [XAML Syntax In Detail](/dotnet/framework/wpf/advanced/xaml-syntax-in-detail). One case where a is still specified explicitly as an element is if you are introducing a merged dictionary, in which case there are typically no child elements for that . For details, see [Merged Resource Dictionaries](/dotnet/framework/wpf/advanced/merged-resource-dictionaries). + + +## XAML Property Element Usage + +``` + + + oneOrMoreResourceElements + + +``` + + +## XAML Values + *oneOrMoreResourceElements* + One or more object elements, each of which defines a resource. Each resource property element within each must have a unique value for the [x:Key Directive](/dotnet/framework/xaml-services/x-key-directive), which serves as the unique key when values are retrieved from the . + + + +## Examples + The following example establishes a collection on a root element. is a typical choice because it is one of the few classes that make sense as a root element, and resources are generally stored at the page root or at even higher levels such as in the application. + + :::code language="xaml" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page2.xaml" id="Snippetfceresources"::: + ]]> @@ -2620,19 +2620,19 @@ Attaches a binding to this element, based on the provided source property name as a path qualification to the data source. Records the conditions of the binding. This return value can be useful for error checking. - , which passes the current instance as the , and creates a new based on the provided `path` parameter. This signature is more convenient if you are establishing a simple default binding. If you need to specify any binding properties to non-default conditions, or want to use a or ,you should use the signature. - - - -## Examples - The following example sets a binding on a element, by creating a new custom data object, establishing that object as , and setting the binding path to a property within it. - + , which passes the current instance as the , and creates a new based on the provided `path` parameter. This signature is more convenient if you are establishing a simple default binding. If you need to specify any binding properties to non-default conditions, or want to use a or ,you should use the signature. + + + +## Examples + The following example sets a binding on a element, by creating a new custom data object, establishing that object as , and setting the binding path to a property within it. + :::code language="csharp" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml.cs" id="Snippetdatacontext"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetdatacontext"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetdatacontext"::: + ]]> @@ -2668,19 +2668,19 @@ Attaches a binding to this element, based on the provided binding object. Records the conditions of the binding. This return value can be useful for error checking. - , which passes the current instance as the . - - - -## Examples - The following example sets a binding on a element, by creating a new and setting the source to a newly built `DateTime` object. - + , which passes the current instance as the . + + + +## Examples + The following example sets a binding on a element, by creating a new and setting the source to a newly built `DateTime` object. + :::code language="csharp" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml.cs" id="Snippetsetbinding"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetsetbinding"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippetsetbinding"::: + ]]> @@ -2715,11 +2715,11 @@ The name of the resource. Searches for a resource with the specified name and sets up a resource reference to it for the specified property. - @@ -2760,11 +2760,11 @@ if the property value should be serialized; otherwise, . - . - + . + ]]> @@ -2802,11 +2802,11 @@ if the property value should be serialized; otherwise, . - is locally set. - + is locally set. + ]]> @@ -2835,18 +2835,18 @@ Occurs when any associated data source participating in a binding on this element changes. - event that is raised by any associated with this element. - - -## XAML Attribute Usage - -``` - -``` - + event that is raised by any associated with this element. + + +## XAML Attribute Usage + +``` + +``` + ]]> @@ -2882,48 +2882,48 @@ Gets or sets the style to be used by this element. The applied, nondefault style for the element, if present. Otherwise, . The default for a default-constructed is . - property to a new at any time, which will force a layout recomposition. However, as soon as that style is placed in use by a loaded element, the should be considered sealed. Attempting to make a change to any individual property of an in-use style (such as anything within the collection of ) causes an exception to be thrown. A style that is defined in markup is considered to be in use as soon as it is loaded from a resource dictionary (for resources), or the page it is contained within is loaded (for inline styles). - - is a dependency property with special precedence. The locally set style generally operates at the highest precedence in the property system. If the is null at this point, during loading the property system checks for implicit styles as defined resources that specify that type. If the style is still null after this step, then the style comes from the default (theme) style, but the default style is not returned in the property value. See [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Values - *resourceExtension* - One of the following: , or . See [XAML Resources](/dotnet/framework/wpf/advanced/xaml-resources). - - *styleResourceKey* - The key that identifies the style being requested. The key refers to an existing resource in a . - + property to a new at any time, which will force a layout recomposition. However, as soon as that style is placed in use by a loaded element, the should be considered sealed. Attempting to make a change to any individual property of an in-use style (such as anything within the collection of ) causes an exception to be thrown. A style that is defined in markup is considered to be in use as soon as it is loaded from a resource dictionary (for resources), or the page it is contained within is loaded (for inline styles). + + is a dependency property with special precedence. The locally set style generally operates at the highest precedence in the property system. If the is null at this point, during loading the property system checks for implicit styles as defined resources that specify that type. If the style is still null after this step, then the style comes from the default (theme) style, but the default style is not returned in the property value. See [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Values + *resourceExtension* + One of the following: , or . See [XAML Resources](/dotnet/framework/wpf/advanced/xaml-resources). + + *styleResourceKey* + The key that identifies the style being requested. The key refers to an existing resource in a . + > [!NOTE] -> Property element syntax is technically possible, but not recommended. See [Inline Styles and Templates](/dotnet/framework/wpf/advanced/inline-styles-and-templates). A binding reference using [TemplateBinding](/dotnet/framework/wpf/advanced/templatebinding-markup-extension) or is also possible, but uncommon. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|| - - - -## Examples - The following example establishes a collection on a root element and then references it as a resource as a specific style for a . - - :::code language="xaml" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page2.xaml" id="Snippetfceresources"::: - +> Property element syntax is technically possible, but not recommended. See [Inline Styles and Templates](/dotnet/framework/wpf/advanced/inline-styles-and-templates). A binding reference using [TemplateBinding](/dotnet/framework/wpf/advanced/templatebinding-markup-extension) or is also possible, but uncommon. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|| + + + +## Examples + The following example establishes a collection on a root element and then references it as a resource as a specific style for a . + + :::code language="xaml" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page2.xaml" id="Snippetfceresources"::: + ]]> @@ -2986,11 +2986,11 @@ if is available; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -3020,23 +3020,23 @@ Gets or sets an arbitrary object value that can be used to store custom information about this element. The intended value. This property has no default value. - -## XAML Values - Because this property takes an object, you need to use the property element usage in order to set the property in XAML to anything other than an object with a known and built-in type converter, such as a string. Objects used in this way are typically not within the standard WPF namespaces and therefore may require namespace mapping to the external namespace in order to be introduced as XAML elements. - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - + +## XAML Values + Because this property takes an object, you need to use the property element usage in order to set the property in XAML to anything other than an object with a known and built-in type converter, such as a string. Objects used in this way are typically not within the standard WPF namespaces and therefore may require namespace mapping to the external namespace in order to be introduced as XAML elements. + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + ]]> @@ -3092,20 +3092,20 @@ Occurs when any associated target property participating in a binding on this element changes. - event that is raised by any associated with this element. This usually means that the binding in question is a two-way binding, and that the bound dependency property affirms an invalidation of the previous property value per any validation or caching scheme that the property supports. - - The event arguments of this event will inform you which bound property was changed. - - -## XAML Attribute Usage - -``` - -``` - + event that is raised by any associated with this element. This usually means that the binding in question is a two-way binding, and that the bound dependency property affirms an invalidation of the previous property value per any validation or caching scheme that the property supports. + + The event arguments of this event will inform you which bound property was changed. + + +## XAML Attribute Usage + +``` + +``` + ]]> @@ -3141,13 +3141,13 @@ Gets a reference to the template parent of this element. This property is not relevant if the element was not created through a template. The element whose caused this element to be created. This value is frequently . - value and continue to navigate that element tree as desired. - - will frequently be `null` for common objects, because if you have obtained an object reference from out of a page in your application through typical means, that element probably was not created from a template. Cases where might not be `null` would include operations such as hit-testing, event handling for certain low-level input events, or working with enumerators, which may have returned elements that came from templates. - + value and continue to navigate that element tree as desired. + + will frequently be `null` for common objects, because if you have obtained an object reference from out of a page in your application through typical means, that element probably was not created from a template. Cases where might not be `null` would include operations such as hit-testing, event handling for certain low-level input events, or working with enumerators, which may have returned elements that came from templates. + ]]> @@ -3187,66 +3187,66 @@ Gets or sets the tool-tip object that is displayed for this element in the user interface (UI). The tooltip object. - , then that is the tool-tip that will be used in the UI. If the value is of any other type, then that value will be used as the *content* for a provided (constructed) by the system. For more information see . The service class provides attached properties that can be used to further customize a tool-tip. - - -## XAML Attribute Usage - -``` - -``` - - -## XAML Property Element Usage - -```xaml - - - - - + , then that is the tool-tip that will be used in the UI. If the value is of any other type, then that value will be used as the *content* for a provided (constructed) by the system. For more information see . The service class provides attached properties that can be used to further customize a tool-tip. + + +## XAML Attribute Usage + +``` + +``` + + +## XAML Property Element Usage + +```xaml + + + + + ``` -or- ```xaml - - - toolTipObjectContent - - + + + toolTipObjectContent + + ``` - -## XAML Values - *toolTipContent* - A string that becomes the display text for the . - - *toolTipObjectContent* - Some object, provided in object element form, that should be used as the content for the . Typically this would be a or some other element that creates layout compositing for the , eventually containing text content within the compositing. In this usage, the element is created implicitly from the parsed XAML, and the *toolTipObjectContent* content is set as its property. - - <`ToolTip` .../> - See . - - -## Dependency Property Information - -||| -|-|-| -|Identifier field|| -|Metadata properties set to `true`|None| - - - -## Examples - The following example sets the value of the property directly to a string. - + +## XAML Values + *toolTipContent* + A string that becomes the display text for the . + + *toolTipObjectContent* + Some object, provided in object element form, that should be used as the content for the . Typically this would be a or some other element that creates layout compositing for the , eventually containing text content within the compositing. In this usage, the element is created implicitly from the parsed XAML, and the *toolTipObjectContent* content is set as its property. + + <`ToolTip` .../> + See . + + +## Dependency Property Information + +||| +|-|-| +|Identifier field|| +|Metadata properties set to `true`|None| + + + +## Examples + The following example sets the value of the property directly to a string. + :::code language="csharp" source="~/snippets/csharp/System.Windows/FrameworkContentElement/ToolTip/Window1.xaml.cs" id="Snippet_table_rowgroups_maniprows"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TableSnippets2/visualbasic/window1.xaml.vb" id="Snippet_table_rowgroups_maniprows"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TableSnippets2/visualbasic/window1.xaml.vb" id="Snippet_table_rowgroups_maniprows"::: + ]]> @@ -3275,22 +3275,22 @@ Occurs just before any tooltip on the element is closed. - in a style. This is because the identifier field of this event re-uses an implementation from a service that does not expose add/remove methods on the event. - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Direct| -|Delegate|| - + in a style. This is because the identifier field of this event re-uses an implementation from a service that does not expose add/remove methods on the event. + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Direct| +|Delegate|| + ]]> @@ -3317,13 +3317,13 @@ System.Windows.RoutedEvent - Identifies the [Routed Events Overview](/dotnet/framework/wpf/advanced/routed-events-overview). + Identifies the Routed Events Overview. - ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. - + ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. + ]]> @@ -3352,22 +3352,22 @@ Occurs when any tooltip on the element is opened. - 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 property and then open the new . Note that this event will not be raised if is a null reference or otherwise unset. - - This event cannot be an in a style. This is because the identifier field of this event re-uses an implementation from a service that does not expose add/remove methods on the event. - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Direct| -|Delegate|| - + 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 property and then open the new . Note that this event will not be raised if is a null reference or otherwise unset. + + This event cannot be an in a style. This is because the identifier field of this event re-uses an implementation from a service that does not expose add/remove methods on the event. + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Direct| +|Delegate|| + ]]> @@ -3394,13 +3394,13 @@ System.Windows.RoutedEvent - Identifies the [Routed Events Overview](/dotnet/framework/wpf/advanced/routed-events-overview). + Identifies the Routed Events Overview. - ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. - + ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. + ]]> @@ -3460,23 +3460,23 @@ Searches for a resource with the specified key, and returns that resource if found. The found resource. If no resource was found, is returned. - method has similar behavior, except that it will throw an exception in the case of not finding a resource with the provided key. - - - -## Examples - The following example finds a resource as defined in markup and applies it to a certain property of an element in response to a routed event. - + method has similar behavior, except that it will throw an exception in the case of not finding a resource with the provided key. + + + +## Examples + The following example finds a resource as defined in markup and applies it to a certain property of an element in response to a routed event. + :::code language="csharp" source="~/snippets/csharp/System.Windows/ContentElement/AllowDrop/page1.xaml.cs" id="Snippettryfindresource"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippettryfindresource"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ContentElementsSmorgasbord/visualbasic/page1.xaml.vb" id="Snippettryfindresource"::: + ]]> @@ -3506,20 +3506,20 @@ Occurs when the element is removed from an element tree of loaded elements. - in a style. - - -## Routed Event Information - -||| -|-|-| -|Identifier field|| -|Routing strategy|Direct| -|Delegate|| - + in a style. + + +## Routed Event Information + +||| +|-|-| +|Identifier field|| +|Routing strategy|Direct| +|Delegate|| + ]]> @@ -3546,13 +3546,13 @@ System.Windows.RoutedEvent - Identifies the [Routed Events Overview](/dotnet/framework/wpf/advanced/routed-events-overview). + Identifies the Routed Events Overview. - ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. - + ) and can then be used to add class handlers (see ). Identifier objects contain an identifying name, owner type, handler type, routing strategy, and a utility method for adding owners for the event. + ]]> @@ -3585,11 +3585,11 @@ Name of the name-object pair to remove from the current scope. Simplifies access to the de-registration method. - diff --git a/xml/System.Windows/Freezable.xml b/xml/System.Windows/Freezable.xml index f1ca2ddb715..b11ce702bc6 100644 --- a/xml/System.Windows/Freezable.xml +++ b/xml/System.Windows/Freezable.xml @@ -22,41 +22,41 @@ Defines an object that has a modifiable state and a read-only (frozen) state. Classes that derive from provide detailed change notification, can be made immutable, and can clone themselves. - class provides special features that can help improve application performance when using objects that are expensive to modify or copy. Examples of objects include the following: - -- - -- - -- - -- - -- - -## Deriving From Freezable - A class that derives from gains the following features: - -- Special states: a read-only (frozen) state and a writable state. - -- Thread safety: a frozen object can be shared across threads. - -- Detailed change notification: Unlike other objects, a object provides change notifications when sub-property values change. - -- Easy cloning: the Freezable class has already implemented several methods that produce deep clones. - - For information on using and creating your own objects, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). - + class provides special features that can help improve application performance when using objects that are expensive to modify or copy. Examples of objects include the following: + +- + +- + +- + +- + +- + +## Deriving From Freezable + A class that derives from gains the following features: + +- Special states: a read-only (frozen) state and a writable state. + +- Thread safety: a frozen object can be shared across threads. + +- Detailed change notification: Unlike other objects, a object provides change notifications when sub-property values change. + +- Easy cloning: the Freezable class has already implemented several methods that produce deep clones. + + For information on using and creating your own objects, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + ]]> - Any public members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - - When the property is , a object can be accessed only from the thread on which it was created. Attempting to access it from another thread throws an . The and methods provide support for marshaling to the correct thread. - - When their property is , objects are free-threaded. For more information, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). + Any public members of this type are thread safe. Any instance members are not guaranteed to be thread safe. + + When the property is , a object can be accessed only from the thread on which it was created. Attempting to access it from another thread throws an . The and methods provide support for marshaling to the correct thread. + + When their property is , objects are free-threaded. For more information, see Freezable Objects Overview. @@ -86,11 +86,11 @@ Initializes a new instance of a derived class. - @@ -150,11 +150,11 @@ Occurs when the or an object it contains is modified. - property is `true`), an exception is thrown. - + property is `true`), an exception is thrown. + ]]> An attempt was made to modify the Changed handler of a value with IsFrozen == true. @@ -186,23 +186,23 @@ Creates a modifiable clone of the , making deep copies of the object's values. When copying the object's dependency properties, this method copies expressions (which might no longer resolve) but not animations or their current values. A modifiable clone of the current object. The cloned object's property is even if the source's property is . - and methods produce modifiable clones of frozen objects (the methods also clone objects that are not frozen). The clone is effectively a deep copy of the current object. - - The following table summarizes the differences between the and methods. - -|Action|Clone method behavior|CloneCurrentValue method behavior| -|------------|---------------------------|---------------------------------------| -|Copying a dependency property that has an expression|The expression is copied, but might no longer resolve. For more information, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview).|The current value of the expression is copied, but not the expression itself.| -|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| - - Note that unset properties are not copied. If an unset property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. - -## Move a Freezable Between Threads - This method can be useful for moving a between threads. First, make the unmodifiable by calling its method. Now another thread can access the and make a local that it can access. - + and methods produce modifiable clones of frozen objects (the methods also clone objects that are not frozen). The clone is effectively a deep copy of the current object. + + The following table summarizes the differences between the and methods. + +|Action|Clone method behavior|CloneCurrentValue method behavior| +|------------|---------------------------|---------------------------------------| +|Copying a dependency property that has an expression|The expression is copied, but might no longer resolve. For more information, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview).|The current value of the expression is copied, but not the expression itself.| +|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| + + Note that unset properties are not copied. If an unset property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. + +## Move a Freezable Between Threads + This method can be useful for moving a between threads. First, make the unmodifiable by calling its method. Now another thread can access the and make a local that it can access. + ]]> @@ -246,42 +246,42 @@ The object to clone. Makes the instance a clone (deep copy) of the specified using base (non-animated) property values. - method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a modifiable copy of the current object, call instead of calling this method directly. - + method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a modifiable copy of the current object, call instead of calling this method directly. + ]]> - If you derive from , you may need to override this method. Reasons to override include the following: - -- Your derived class has data that is not exposed via dependency properties. - -- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . - - Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . - - It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation makes deep copies of all writable, locally set properties, including internal expressions. - - If the object has data-bound dependency properties, the expressions are copied but might no longer resolve. For more information about cloning data-bound objects, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). If the object has animated dependency properties, the base (non-animated) value of those properties is copied. Animations are not copied. - - Note that unset properties are not copied, nor are read-only properties. If such a property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. - - The following list summarizes the expected behavior for this method: - -- The copy produced contains copies of all sub-objects. - -- Unset and read-only properties are not copied. - -- Expressions are copied. - -- None of these sub-objects are frozen on creation. - -- The copy itself is not frozen. - -- Animations are not copied. - + If you derive from , you may need to override this method. Reasons to override include the following: + +- Your derived class has data that is not exposed via dependency properties. + +- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . + + Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . + + It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation makes deep copies of all writable, locally set properties, including internal expressions. + + If the object has data-bound dependency properties, the expressions are copied but might no longer resolve. For more information about cloning data-bound objects, see Freezable Objects Overview. If the object has animated dependency properties, the base (non-animated) value of those properties is copied. Animations are not copied. + + Note that unset properties are not copied, nor are read-only properties. If such a property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. + + The following list summarizes the expected behavior for this method: + +- The copy produced contains copies of all sub-objects. + +- Unset and read-only properties are not copied. + +- Expressions are copied. + +- None of these sub-objects are frozen on creation. + +- The copy itself is not frozen. + +- Animations are not copied. + - Only property base values are copied, not current animated values. @@ -313,23 +313,23 @@ Creates a modifiable clone (deep copy) of the using its current values. A modifiable clone of the current object. The cloned object's property is even if the source's property is . - and methods produce modifiable clones of frozen objects (the methods also clone objects that are not frozen). The clone is effectively a deep copy of the current object. - - The following table summarizes the differences between the and methods. - -|Action|Clone method behavior|CloneCurrentValue method behavior| -|------------|---------------------------|---------------------------------------| -|Copying a dependency property that has an expression|The expression is copied, but might no longer resolve. For more information, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview).|The current value of the expression is copied, but not the expression itself.| -|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| - - Note that unset properties are not copied. If an unset property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. - -## Move a Freezable Between Threads - This method can be useful for moving a between threads. First, make the unmodifiable by using its method. Now another thread can access the and make a local clone that it can access. - + and methods produce modifiable clones of frozen objects (the methods also clone objects that are not frozen). The clone is effectively a deep copy of the current object. + + The following table summarizes the differences between the and methods. + +|Action|Clone method behavior|CloneCurrentValue method behavior| +|------------|---------------------------|---------------------------------------| +|Copying a dependency property that has an expression|The expression is copied, but might no longer resolve. For more information, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview).|The current value of the expression is copied, but not the expression itself.| +|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| + + Note that unset properties are not copied. If an unset property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. + +## Move a Freezable Between Threads + This method can be useful for moving a between threads. First, make the unmodifiable by using its method. Now another thread can access the and make a local clone that it can access. + ]]> @@ -372,38 +372,38 @@ The to be cloned. Makes the instance a modifiable clone (deep copy) of the specified using current property values. - method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a modifiable copy of the current object, call instead of calling this method directly. - + method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a modifiable copy of the current object, call instead of calling this method directly. + ]]> - If you derive from , you may need to override this method. Reasons to override include the following: - -- Your derived class has data that is not exposed via dependency properties. - -- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . - - Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . - - It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation makes deep copies of all writable, locally set properties. If the object contains dependency properties with expressions (such as a data binding), the current value of the expression is copied but not the expression itself. - - If the object has animated dependency properties, the current animated value of those properties is copied, but the animations are not. - - Note that unset properties are not copied, nor are read-only properties. If such a property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. - - The following list summarizes the expected behavior for this method. - -- The copy produced contains copies of all sub-objects. - -- Unset and read-only properties are not copied. - -- If a property is animated, its current value is copied, but the animation itself is not. - -- None of these sub-objects are frozen on creation. - + If you derive from , you may need to override this method. Reasons to override include the following: + +- Your derived class has data that is not exposed via dependency properties. + +- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . + + Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . + + It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation makes deep copies of all writable, locally set properties. If the object contains dependency properties with expressions (such as a data binding), the current value of the expression is copied but not the expression itself. + + If the object has animated dependency properties, the current animated value of those properties is copied, but the animations are not. + + Note that unset properties are not copied, nor are read-only properties. If such a property has a default value that is a frozen , that property value remains frozen in the otherwise modifiable clone. + + The following list summarizes the expected behavior for this method. + +- The copy produced contains copies of all sub-objects. + +- Unset and read-only properties are not copied. + +- If a property is animated, its current value is copied, but the animation itself is not. + +- None of these sub-objects are frozen on creation. + - The copy itself is not frozen. @@ -435,11 +435,11 @@ Initializes a new instance of the class. The new instance. - method, which this method calls internally. - + method, which this method calls internally. + ]]> @@ -471,19 +471,19 @@ When implemented in a derived class, creates a new instance of the derived class. The new instance. - method whenever a new instance of the is created. - - - -## Examples - The following example shows a typical implementation of . - + method whenever a new instance of the is created. + + + +## Examples + The following example shows a typical implementation of . + :::code language="csharp" source="~/snippets/csharp/System.Windows/Freezable/CreateInstanceCore/freezablesample.cs" id="Snippetcreateinstancecoreexample"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/freezablesample_procedural/visualbasic/freezablesample.vb" id="Snippetcreateinstancecoreexample"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/freezablesample_procedural/visualbasic/freezablesample.vb" id="Snippetcreateinstancecoreexample"::: + ]]> @@ -526,11 +526,11 @@ Makes the current object unmodifiable and sets its property to . - when calling this method, check the property to determine whether the can be made unmodifiable before calling this method. - + when calling this method, check the property to determine whether the can be made unmodifiable before calling this method. + ]]> The cannot be made unmodifiable. @@ -572,13 +572,13 @@ If the parameter is , this method indicates whether the specified can be made unmodifiable. If the parameter is , this method attempts to make the specified unmodifiable and indicates whether the operation succeeded. If is , this method returns if the specified can be made unmodifiable, or if it cannot be made unmodifiable. If is , this method returns if the specified is now unmodifiable, or if it cannot be made unmodifiable. - and overriding the method. This method may be used in the method to freeze class data members that are themselves objects. - - It is alright to call this method again on a object that is already frozen (unmodifiable). - + and overriding the method. This method may be used in the method to freeze class data members that are themselves objects. + + It is alright to call this method again on a object that is already frozen (unmodifiable). + ]]> When is , the attempt to make unmodifiable was unsuccessful; the object is now in an unknown state (it might be partially frozen). @@ -618,17 +618,17 @@ Makes the object unmodifiable or tests whether it can be made unmodifiable. If is , this method returns if the can be made unmodifiable, or if it cannot be made unmodifiable. If is , this method returns if the if the specified is now unmodifiable, or if it cannot be made unmodifiable. - property (with `isChecking` equal to `true`) and the method (with `isChecking` equal to `false`). - + property (with `isChecking` equal to `true`) and the method (with `isChecking` equal to `false`). + ]]> - implementers must override this method when the class contains data that is not stored using dependency properties. - + implementers must override this method when the class contains data that is not stored using dependency properties. + A typical implementation would call base, then call the static method on all typed properties that the class contains, returning only if all properties were frozen (or could have been frozen, in the case of specifying for ). @@ -661,24 +661,24 @@ Creates a frozen copy of the , using base (non-animated) property values. Because the copy is frozen, any frozen sub-objects are copied by reference. A frozen copy of the . The copy's property is set to . - property before calling this method to verify that the can be frozen. Using this method is similar to creating a copy using the and then freezing it with the method. - - The and methods can improve copying performance because they do not clone sub-objects that are already frozen; they only copy them by reference. - - The following table summarizes the differences between the and methods. - -|Action|GetAsFrozen method behavior|GetCurrentValueAsFrozen method behavior| -|------------|---------------------------------|---------------------------------------------| -|Copying a dependency property that has an expression|The method throws an because it cannot the property.|The current value of the expression is copied, but not the expression itself.| -|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| - - Note that unset properties are not copied, nor are read-only properties. - - To create a copy of the that is not frozen, use the method. - + property before calling this method to verify that the can be frozen. Using this method is similar to creating a copy using the and then freezing it with the method. + + The and methods can improve copying performance because they do not clone sub-objects that are already frozen; they only copy them by reference. + + The following table summarizes the differences between the and methods. + +|Action|GetAsFrozen method behavior|GetCurrentValueAsFrozen method behavior| +|------------|---------------------------------|---------------------------------------------| +|Copying a dependency property that has an expression|The method throws an because it cannot the property.|The current value of the expression is copied, but not the expression itself.| +|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| + + Note that unset properties are not copied, nor are read-only properties. + + To create a copy of the that is not frozen, use the method. + ]]> The cannot be frozen because it contains expressions or animated properties. @@ -722,28 +722,28 @@ The instance to copy. Makes the instance a frozen clone of the specified using base (non-animated) property values. - method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a frozen copy of the current object, call instead of calling this method directly. - + method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a frozen copy of the current object, call instead of calling this method directly. + ]]> - If you derive from you may need to override this method. Reasons to override include the following: - -- Your derived class has data that is not exposed via dependency properties. - -- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . - - Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . - - It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation makes deep copies of any unfrozen freezables and shallow copies of all other writable, locally set properties it contains. If the object has data-bound dependency properties, the expressions are copied but might no longer resolve; for more information about cloning data-bound objects, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). If the object has animated dependency properties, the base (non-animated) values of those properties are copied. Animations are not copied. - - Note that unset properties are not copied, nor are read-only properties. - - If you do override this method, you must call the base implementation. - + If you derive from you may need to override this method. Reasons to override include the following: + +- Your derived class has data that is not exposed via dependency properties. + +- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . + + Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . + + It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation makes deep copies of any unfrozen freezables and shallow copies of all other writable, locally set properties it contains. If the object has data-bound dependency properties, the expressions are copied but might no longer resolve; for more information about cloning data-bound objects, see Freezable Objects Overview. If the object has animated dependency properties, the base (non-animated) values of those properties are copied. Animations are not copied. + + Note that unset properties are not copied, nor are read-only properties. + + If you do override this method, you must call the base implementation. + You do not need to values as they are copied. The result is frozen by before being returned. @@ -775,24 +775,24 @@ Creates a frozen copy of the using current property values. Because the copy is frozen, any frozen sub-objects are copied by reference. A frozen copy of the . The copy's property is set to . - and then freezing it with the method. - - The and methods can improve copying performance because they do not clone sub-objects that are already frozen; they only copy them by reference. - - The following table summarizes the differences between the and methods. - -|Action|GetAsFrozen method behavior|GetCurrentValueAsFrozen method behavior| -|------------|---------------------------------|---------------------------------------------| -|Copying a dependency property that has an expression|The method throws an because it cannot the property.|The current value of the expression is copied, but not the expression itself.| -|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| - - Note that unset properties are not copied, nor are read-only properties. - - To create a copy of the that is not frozen, use the method. - + and then freezing it with the method. + + The and methods can improve copying performance because they do not clone sub-objects that are already frozen; they only copy them by reference. + + The following table summarizes the differences between the and methods. + +|Action|GetAsFrozen method behavior|GetCurrentValueAsFrozen method behavior| +|------------|---------------------------------|---------------------------------------------| +|Copying a dependency property that has an expression|The method throws an because it cannot the property.|The current value of the expression is copied, but not the expression itself.| +|Copying an animated dependency property|The property's base (non-animated) value is copied. Animations are not copied.|The property's current animated value is copied. Animations are not copied.| + + Note that unset properties are not copied, nor are read-only properties. + + To create a copy of the that is not frozen, use the method. + ]]> @@ -836,28 +836,28 @@ The to copy and freeze. Makes the current instance a frozen clone of the specified . If the object has animated dependency properties, their current animated values are copied. - method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a frozen copy of the current object, call instead of calling this method directly. - + method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a frozen copy of the current object, call instead of calling this method directly. + ]]> - If you derive from , you may need to override this method. Reasons to override include the following: - -- Your derived class has data that is not exposed via dependency properties. - -- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . - - Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . - - It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation creates a new using the method and makes deep copies of unfrozen freezables and shallow copies of all other writable, locally set properties it contains. If the object has data-bound dependency properties, the data bindings are copied but might no longer resolve; for more information about cloning data-bound objects, see [Freezable Objects Overview](/dotnet/framework/wpf/advanced/freezable-objects-overview). If the object has animated dependency properties, the current animated value of those properties is copied, but the animations are not. - - Read-only dependency properties within a are not copied by this default implementation. - - If you do override this method, you must call the base implementation. - + If you derive from , you may need to override this method. Reasons to override include the following: + +- Your derived class has data that is not exposed via dependency properties. + +- Your derived class must perform extra initialization work that cannot be accomplished by simply overriding . For example, this applies if your derived class implements . + + Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override . + + It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation creates a new using the method and makes deep copies of unfrozen freezables and shallow copies of all other writable, locally set properties it contains. If the object has data-bound dependency properties, the data bindings are copied but might no longer resolve; for more information about cloning data-bound objects, see Freezable Objects Overview. If the object has animated dependency properties, the current animated value of those properties is copied, but the animations are not. + + Read-only dependency properties within a are not copied by this default implementation. + + If you do override this method, you must call the base implementation. + You do not need to values as they are copied. The result is frozen by before being returned. @@ -889,13 +889,13 @@ if the object is frozen and cannot be modified; if the object can be modified. - property is `true` throws an . - - This property is read-only from the object model perspective. Some of the documentation about behaviors may mention "sets to `true`" or similar language when discussing the behavior of other methods of , but this behavior is happening internally in the class instances, when methods of the instance manipulate the private variables that exist within the abstract class. To set the value of this property, you should call . This effectively is a one-time operation to change the property from the initial default `false` state to the `true` state. There is no available means to set the value back to `false`. Instead, you could change any deep copy made from the original (see the method). This is by design and is how any derived class should behave when applied to the cases where the pattern is useful. - + property is `true` throws an . + + This property is read-only from the object model perspective. Some of the documentation about behaviors may mention "sets to `true`" or similar language when discussing the behavior of other methods of , but this behavior is happening internally in the class instances, when methods of the instance manipulate the private variables that exist within the abstract class. To set the value of this property, you should call . This effectively is a one-time operation to change the property from the initial default `false` state to the `true` state. There is no available means to set the value back to `false`. Instead, you could change any deep copy made from the original (see the method). This is by design and is how any derived class should behave when applied to the cases where the pattern is useful. + ]]> @@ -925,11 +925,11 @@ Called when the current object is modified. - event occurs. - + event occurs. + ]]> @@ -983,13 +983,13 @@ The current value of the data member. Ensures that appropriate context pointers are established for a data member that has just been set. - inheritors each time a data member that is not stored as a is set. - - This method does not need to be called for data members that are stored using a . - + inheritors each time a data member that is not stored as a is set. + + This method does not need to be called for data members that are stored using a . + ]]> @@ -1056,11 +1056,11 @@ Event data that contains information about which property changed, and its old and new values. Overrides the implementation of to also invoke any handlers in response to a changing dependency property of type . - itself. Any sub-property information must be obtained through the handlers. - + itself. Any sub-property information must be obtained through the handlers. + ]]> @@ -1091,8 +1091,8 @@ Ensures that the is being accessed from a valid thread. Inheritors of must call this method at the beginning of any API that reads data members that are not dependency properties. To be added. - Classes that derive from should call the method before they attempt to access any members that are not dependency properties. The method should be called before any such members are written to. - + Classes that derive from should call the method before they attempt to access any members that are not dependency properties. The method should be called before any such members are written to. + This method effectively does nothing more than call . @@ -1159,11 +1159,11 @@ Verifies that the is not frozen and that it is being accessed from a valid threading context. inheritors should call this method at the beginning of any API that writes to data members that are not dependency properties. - to verify the threading context is accessible, and it throws an exception if the instance is already frozen. - + to verify the threading context is accessible, and it throws an exception if the instance is already frozen. + ]]> The instance is frozen and cannot have its members written to. diff --git a/xml/System.Windows/SizeToContent.xml b/xml/System.Windows/SizeToContent.xml index fe1d12c0afe..5e447412654 100644 --- a/xml/System.Windows/SizeToContent.xml +++ b/xml/System.Windows/SizeToContent.xml @@ -78,7 +78,7 @@ 0 - Specifies that a window will not automatically set its size to fit the size of its content. Instead, the size of a window is determined by other properties, including , , , , , and . See [WPF Windows Overview](/dotnet/framework/wpf/app-development/wpf-windows-overview). + Specifies that a window will not automatically set its size to fit the size of its content. Instead, the size of a window is determined by other properties, including , , , , , and . See WPF Windows Overview. diff --git a/xml/System.Windows/ValueSource.xml b/xml/System.Windows/ValueSource.xml index 41b5f76c850..b2bbc6def2a 100644 --- a/xml/System.Windows/ValueSource.xml +++ b/xml/System.Windows/ValueSource.xml @@ -22,13 +22,13 @@ Reports the information returned from . - transmits is contained in the property. This property contains an enumeration value that specifies exactly one aspect of the overall WPF property system that is responsible for the effective value of a dependency property. - - Besides the base value, the other information that might be interesting about a dependency property value is whether the value is being animated, and whether the value involves an expression (such as a binding, or a dynamic resource reference). This information is reported by and respectively. Also, if coercion is acting on a property value, the property retains a desired value, and the property value will attempt to reach that desired value if the constraints of the specific coercion are changed or lifted. A coerced property that is not at its desired value will report that is `true`. - + transmits is contained in the property. This property contains an enumeration value that specifies exactly one aspect of the overall WPF property system that is responsible for the effective value of a dependency property. + + Besides the base value, the other information that might be interesting about a dependency property value is whether the value is being animated, and whether the value involves an expression (such as a binding, or a dynamic resource reference). This information is reported by and respectively. Also, if coercion is acting on a property value, the property retains a desired value, and the property value will attempt to reach that desired value if the constraints of the specific coercion are changed or lifted. A coerced property that is not at its desired value will report that is `true`. + ]]> @@ -66,13 +66,13 @@ Gets a value of the enumeration, which reports the source that provided the dependency property system with a value. A value of the enumeration. - and if you want to determine whether the base value is the effective value. - - You might also want to check to see if the base value was evaluated out of an expression. - + and if you want to determine whether the base value is the effective value. + + You might also want to check to see if the base value was evaluated out of an expression. + ]]> @@ -109,11 +109,11 @@ if the provided object is equivalent to the current ; otherwise, . - structure. - + structure. + ]]> @@ -146,11 +146,11 @@ Returns the hash code for this . A 32-bit unsigned integer hash code. - value. - + value. + ]]> @@ -189,11 +189,11 @@ if the property is animated; otherwise, . - is not immediately relevant, because the animation operates at higher dependency property precedence than the base value. For more information about precedence and animations, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). - + is not immediately relevant, because the animation operates at higher dependency property precedence than the base value. For more information about precedence and animations, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + ]]> @@ -233,13 +233,13 @@ if the value resulted from a implementation applied to a dependency property; otherwise, . - is `true`. - - Coercion acts at higher precedence than the base value, and is not strictly speaking a participant in how the base value is set. Therefore the state of being coerced is reported by this property, rather than by a value of the enumeration. For more information about coercion, base values, and precedence, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). - + is `true`. + + Coercion acts at higher precedence than the base value, and is not strictly speaking a participant in how the base value is set. Therefore the state of being coerced is reported by this property, rather than by a value of the enumeration. For more information about coercion, base values, and precedence, see [Dependency Property Value Precedence](/dotnet/framework/wpf/advanced/dependency-property-value-precedence). + ]]> @@ -308,17 +308,17 @@ System.Boolean - Gets a value that declares whether this value resulted from an evaluated expression. This might be a supporting a binding, or an internal expression such as those that support the [DynamicResource Markup Extension](/dotnet/framework/wpf/advanced/dynamicresource-markup-extension). + Gets a value that declares whether this value resulted from an evaluated expression. This might be a supporting a binding, or an internal expression such as those that support the DynamicResource Markup Extension. if the value came from an evaluated expression; otherwise, . - . The is still very relevant for any property where is `true`. Knowing whether a value came through an expression can be particularly useful if the value was set indirectly, such as through a template or an inherited property value. - - If an expression fails to evaluate (the binding failed; no resource of that name was found), then the value will come from some other participant in the property system, most likely the default value. That source is then reported in . Failed expression evaluations will return `false` for . - + . The is still very relevant for any property where is `true`. Knowing whether a value came through an expression can be particularly useful if the value was set indirectly, such as through a template or an inherited property value. + + If an expression fails to evaluate (the binding failed; no resource of that name was found), then the value will come from some other participant in the property system, most likely the default value. That source is then reported in . Failed expression evaluations will return `false` for . + ]]> @@ -358,11 +358,11 @@ if the two instances are equivalent; otherwise, . - , and supports value equality based on all properties of . - + , and supports value equality based on all properties of . + ]]> @@ -401,11 +401,11 @@ if the two instances are not equivalent; otherwise, . - , returning its negation, and supports value equality based on all properties of . - + , returning its negation, and supports value equality based on all properties of . + ]]> diff --git a/xml/System.Windows/WeakEventManager.xml b/xml/System.Windows/WeakEventManager.xml index 69055936cb4..c7a7e2596cc 100644 --- a/xml/System.Windows/WeakEventManager.xml +++ b/xml/System.Windows/WeakEventManager.xml @@ -23,19 +23,19 @@ Provides a base class for the event manager that is used in the *weak event pattern*. The manager adds and removes listeners for events (or callbacks) that also use the pattern. - allows the listener's handlers to be garbage collected even if the source object persists. By contrast, a regular event hookup using the `+=` operator causes the potentially disconnected source to hold a reference to the listeners. This prevents the receiver from being garbage collected in a timely fashion. - - One common situation where the lifetime relationships between sources and listeners should use of the weak event pattern is the handling of update events coming from data bindings. - - The weak event pattern can also be used for callbacks and regular events. - + allows the listener's handlers to be garbage collected even if the source object persists. By contrast, a regular event hookup using the `+=` operator causes the potentially disconnected source to hold a reference to the listeners. This prevents the receiver from being garbage collected in a timely fashion. + + One common situation where the lifetime relationships between sources and listeners should use of the weak event pattern is the handling of update events coming from data bindings. + + The weak event pattern can also be used for callbacks and regular events. + ]]> - For an example of a custom , see [Weak Event Patterns](/dotnet/framework/wpf/advanced/weak-event-patterns). + For an example of a custom , see Weak Event Patterns. @@ -93,15 +93,15 @@ An that contains the event data for the event to deliver. Delivers the event being managed to each listener. - method from within the event handlers that are added or removed by the and implementations of subclasses. - - If you call the method in your `AddListener` implementation of your class, the list of listeners receiving the event is kept in an underlying collection. (`AddListener` is not part of an interface or class contract. `AddListener` is the suggested name for the method of your manager class that calls and adds weak event pattern listeners for the event.) - - adds listeners to a single list. If your manager implementation maintains more than one list of listeners per event, do not use or . Instead, your implementation should create its own instances, `AddListener` should add listeners to the appropriate list, and events should be delivered to the appropriate listener list by calling . - + method from within the event handlers that are added or removed by the and implementations of subclasses. + + If you call the method in your `AddListener` implementation of your class, the list of listeners receiving the event is kept in an underlying collection. (`AddListener` is not part of an interface or class contract. `AddListener` is the suggested name for the method of your manager class that calls and adds weak event pattern listeners for the event.) + + adds listeners to a single list. If your manager implementation maintains more than one list of listeners per event, do not use or . Instead, your implementation should create its own instances, `AddListener` should add listeners to the appropriate list, and events should be delivered to the appropriate listener list by calling . + ]]> @@ -139,11 +139,11 @@ The provided . Delivers the event being managed to each listener in the provided list. - @@ -179,11 +179,11 @@ Returns the implementation that is used for the provided type. The matching implementation. - implementations call this method using their passed `managerType`. The returned is then used as the differentiator that determines which event was received, and which private class handler to invoke. - + implementations call this method using their passed `managerType`. The returned is then used as the differentiator that determines which event was received, and which private class handler to invoke. + ]]> @@ -219,11 +219,11 @@ Gets or sets the data being stored for the specified source. Data being stored by the manager for this source. - , which is a list of weak references to listeners. You would only have to change this type if the type cannot contain your required information. If so, you will have to override the method so that all cleanup of the underlying type is performed correctly. - + , which is a list of weak references to listeners. You would only have to change this type if the type cannot contain your required information. If so, you will have to override the method so that all cleanup of the underlying type is performed correctly. + ]]> @@ -317,15 +317,15 @@ The listening class (which must implement ). Adds the provided listener to the provided source for the event being managed. - implementations. `AddListener` is the suggested name for the static method you define on your manager class to enable other classes to add a listener for your weak event pattern. `AddListener` should take two parameters: the `source` where the listener is attached, and the `listener` instance. For your `AddListener` implementation, call the method on the current manager and pass the same two parameters. - - If the list of listeners was previously empty, calls the method internally, which will call your specific override through polymorphism. - - adds listeners to a single internal per `source`. If your manager implementation maintains more than one list of listeners for each event-source combination, do not use . Instead, your implementation should create its own instances, `AddListener` should add listeners to the appropriate list, and events should be delivered to the appropriate listener list by calling the event instead of the method. - + implementations. `AddListener` is the suggested name for the static method you define on your manager class to enable other classes to add a listener for your weak event pattern. `AddListener` should take two parameters: the `source` where the listener is attached, and the `listener` instance. For your `AddListener` implementation, call the method on the current manager and pass the same two parameters. + + If the list of listeners was previously empty, calls the method internally, which will call your specific override through polymorphism. + + adds listeners to a single internal per `source`. If your manager implementation maintains more than one list of listeners for each event-source combination, do not use . Instead, your implementation should create its own instances, `AddListener` should add listeners to the appropriate list, and events should be delivered to the appropriate listener list by calling the event instead of the method. + ]]> @@ -393,15 +393,15 @@ The listening class (which must implement ). Removes a previously added listener from the provided source. - implementations. `RemoveListener` is the suggested name for the static method you define on your manager class to enable other classes to remove a listener for your weak event pattern. `RemoveListener` should take two parameters: the `source` where the listener is removed, and the `listener` class. For your `RemoveListener` implementation, call the method on the current manager and pass the same two parameters. - - If a call to removes the last listener in the list, calls the method internally, which will call your specific override through polymorphism. - - removes listeners from a single internal per `source`. If your manager implementation maintains more than one list of listeners for each event-source combination, do not use . Instead, your implementation should create its own instances, `RemoveListener` should remove listeners from the appropriate list, and events should be delivered to the appropriate listener list by calling the method instead of the method. - + implementations. `RemoveListener` is the suggested name for the static method you define on your manager class to enable other classes to remove a listener for your weak event pattern. `RemoveListener` should take two parameters: the `source` where the listener is removed, and the `listener` class. For your `RemoveListener` implementation, call the method on the current manager and pass the same two parameters. + + If a call to removes the last listener in the list, calls the method internally, which will call your specific override through polymorphism. + + removes listeners from a single internal per `source`. If your manager implementation maintains more than one list of listeners for each event-source combination, do not use . Instead, your implementation should create its own instances, `RemoveListener` should remove listeners from the appropriate list, and events should be delivered to the appropriate listener list by calling the method instead of the method. + ]]> @@ -443,11 +443,11 @@ if some entries were actually removed; otherwise, . - method has a default implementation that will remove all entries when data is a . - + method has a default implementation that will remove all entries when data is a . + ]]> @@ -482,11 +482,11 @@ Establishes a read-lock on the underlying data table, and returns an . An object that can be used to establish a lock on the data table members and then be appropriately disposed with a construct. - should always occur within a `using (ReadLock) { ... }` clause, except for queries that are already within a write lock. These queries may be necessary if your class supports a more sophisticated `AddListener` implementation that requires more data beyond the `source` and the `listener`, and uses the collection to store the extra information. - + should always occur within a `using (ReadLock) { ... }` clause, except for queries that are already within a write lock. These queries may be necessary if your class supports a more sophisticated `AddListener` implementation that requires more data beyond the `source` and the `listener`, and uses the collection to store the extra information. + ]]> @@ -552,11 +552,11 @@ Requests that a purge of unused entries in the underlying listener list be performed on a lower priority thread. - method is similar to calling the method on the current manager's list, at lower thread priority, with the `purgeAll` parameter set to `false`. - + method is similar to calling the method on the current manager's list, at lower thread priority, with the `purgeAll` parameter set to `false`. + ]]> @@ -593,11 +593,11 @@ The new event manager. Sets the current manager for the specified manager type. - method to initialize a manager, if that is required by a call to your `CurrentManager` property on a implementation. - + method to initialize a manager, if that is required by a call to your `CurrentManager` property on a implementation. + ]]> @@ -702,11 +702,11 @@ Establishes a write-lock on the underlying data table, and returns an . An object that can be used to establish a lock on the data table members and then be appropriately disposed with a construct. - collection to store the extra information. - + collection to store the extra information. + ]]>