diff --git a/xml/System.Windows.Input/ICommand.xml b/xml/System.Windows.Input/ICommand.xml index b14931ba438..a95ae4a80f8 100644 --- a/xml/System.Windows.Input/ICommand.xml +++ b/xml/System.Windows.Input/ICommand.xml @@ -83,42 +83,42 @@ Defines a command. - and are two implementations of the interface in Windows Presentation Foundation (WPF). - -## ICommand in Windows Runtime apps - The interface is the code contract for commands that are written in .NET for Windows Runtime apps. These commands provide the commanding behavior for UI elements such as a Windows Runtime XAML `Button` and in particular an `AppBarButton`. If you're defining commands for Windows Runtime apps you use basically the same techniques you'd use for defining commands for a .NET app. Implement the command by defining a class that implements and specifically implement the method. - - XAML for Windows Runtime does not support x`:Static`, so don't attempt to use the `x:Static` markup extension if the command is used from Windows Runtime XAML. Also, the Windows Runtime does not have any predefined command libraries, so the XAML syntax shown here doesn't really apply for the case where you're implementing the interface and defining the command for Windows Runtime usage. - - -## XAML Attribute Usage - \<*object property*="*predefinedCommandName*"/> - + and are two implementations of the interface in Windows Presentation Foundation (WPF). + +## ICommand in Windows Runtime apps + + The interface is the code contract for commands that are written in .NET for Windows Runtime apps. These commands provide the commanding behavior for UI elements such as a Windows Runtime XAML `Button` and in particular an `AppBarButton`. If you're defining commands for Windows Runtime apps, you use basically the same techniques you'd use for defining commands for a .NET app. Implement the command by defining a class that implements and specifically implement the method. + + XAML for Windows Runtime does not support `x:Static`, so don't attempt to use the `x:Static` markup extension if the command is used from Windows Runtime XAML. Also, the Windows Runtime does not have any predefined command libraries, so the XAML syntax shown here doesn't really apply for the case where you're implementing the interface and defining the command for Windows Runtime usage. + +## XAML attribute usage + +```xaml + -or- - - \<*object property*="*predefinedClassName.predefinedCommandName*"/> - + -or- - - \<*object property*="{ *customClassName.customCommandName*}"/> - - -## XAML Values - *predefinedClassName* - One of the predefined command classes. - - *predefinedCommandName* - One of the predefined commands. - - *customClassName* - A custom class that contains the custom command. Custom classes generally require an `xlmns` prefix mapping; see [XAML Namespaces and Namespace Mapping for WPF XAML](/dotnet/framework/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml). - - *customCommandName* - A custom command. - + +``` + +## XAML values + + `predefined-class-name`\ + One of the predefined command classes. + + `predefined-command-name`\ + One of the predefined commands. + + `custom-class-name`\ + A custom class that contains the custom command. Custom classes generally require an `xlmns` prefix mapping. For more information, see [XAML Namespaces and Namespace Mapping for WPF XAML](/dotnet/framework/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml). + + `custom-command-name`\ + A custom command. + ]]> @@ -169,16 +169,17 @@ - Data used by the command. If the command does not require data to be passed, this object can be set to . - Defines the method that determines whether the command can execute in its current state. + Data used by the command. If the command does not require data to be passed, this object can be set to . + Determines whether the command can execute in its current state. if this command can be executed; otherwise, . - method when the event is raised. - + method when the event is raised. + ]]> @@ -229,15 +230,14 @@ System.EventHandler - Occurs when changes occur that affect whether or not the command should execute. + Occurs when changes take place that affect whether or not the command should execute. - on the command when this event occurs. - - Normally, if the command cannot execute, the command source disables itself. - + on the command when this event occurs. If the command cannot execute, the command source disables itself. + ]]> @@ -291,7 +291,7 @@ - Data used by the command. If the command does not require data to be passed, this object can be set to . + Data used by the command. If the command does not require data to be passed, this object can be set to . Defines the method to be called when the command is invoked. To be added. diff --git a/xml/System.Windows.Input/RoutedCommand.xml b/xml/System.Windows.Input/RoutedCommand.xml index 0f6e23a2b24..6d2ea0525e3 100644 --- a/xml/System.Windows.Input/RoutedCommand.xml +++ b/xml/System.Windows.Input/RoutedCommand.xml @@ -43,39 +43,38 @@ Defines a command that implements and is routed through the element tree. - and methods on a do not contain the application logic for the command as is the case with a typical , but rather, these methods raise events that traverse the element tree looking for an object with a . The event handlers attached to the contain the command logic. - - The method raises the and events. The method raises the and events. - - -## XAML Attribute Usage - \<*object* *property*="*predefinedCommandName*"/> - + and methods on a do not contain the application logic for the command as is the case with a typical , but rather, these methods raise events that traverse the element tree looking for an object with a . The event handlers attached to the contain the command logic. + + The method raises the and events. The method raises the and events. + +## XAML attribute usage + +```xaml + -or- - - \<*object* *property*="*predefinedClassName*.*predefinedCommandName*"/> - + -or- - - \<*object* *property*="{ *customClassName*.*customCommandName*}"/> - - -## XAML Values - *predefinedClassName* - One of the predefined command classes. - - *predefinedCommandName* - One of the predefined commands. - - *customClassName* - A custom class which contains the custom command. Custom classes generally require an `xlmns` prefix mapping; see [XAML Namespaces and Namespace Mapping for WPF XAML](/dotnet/framework/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml). - - *customCommandName* - A custom command. - + +``` + +## XAML values + + `predefined-class-name`\ + One of the predefined command classes. + + `predefined-command-name`\ + One of the predefined commands. + + `custom-class-name`\ + A custom class that contains the custom command. Custom classes generally require an `xlmns` prefix mapping. For more information, see [XAML Namespaces and Namespace Mapping for WPF XAML](/dotnet/framework/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml). + + `custom-command-name`\ + A custom command. + ]]> @@ -192,10 +191,10 @@ To be added. is . - the length of is zero - + the length of is zero + -or- - + is . @@ -240,25 +239,25 @@ if the command can execute on the current command target; otherwise, . - can execute on the current command target is not contained in the methods, rather raises the and the events which tunnel and bubble through element tree looking for a object with a . If a for that is found, then the attached to is called. These handlers supply the programming logic for determining if the can execute or not. - - The and events are raised on the . If the is not set on the , the and events are raised on the element with keyboard focus. - - - -## Examples - The following example is a event handler from a custom implementation of . - - `this.Command` in this example is the property on the . If the command is not `null`, the command is cast to a . If the command is a , then the method is called passing the and the . If command is not a , it is cast to an and the method is called passing the . - - If the method returns `true`, then the control is enabled; otherwise, the control is disable. - + can execute on the current command target is not contained in the methods, rather raises the and the events which tunnel and bubble through element tree looking for a object with a . If a for that is found, then the attached to is called. These handlers supply the programming logic for determining if the can execute or not. + + The and events are raised on the . If the is not set on the , the and events are raised on the element with keyboard focus. + + + +## Examples + The following example is a event handler from a custom implementation of . + + `this.Command` in this example is the property on the . If the command is not `null`, the command is cast to a . If the command is a , then the method is called passing the and the . If command is not a , it is cast to an and the method is called passing the . + + If the method returns `true`, then the control is enabled; otherwise, the control is disable. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/RoutedCommand/CanExecute/CommandSlider.cs" id="Snippetimplementicommandcanexecutechanged"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ImplementICommandSource/visualbasic/commandslider.vb" id="Snippetimplementicommandcanexecutechanged"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ImplementICommandSource/visualbasic/commandslider.vb" id="Snippetimplementicommandcanexecutechanged"::: + ]]> @@ -291,25 +290,25 @@ Occurs when changes to the command source are detected by the command manager. These changes often affect whether the command should execute on the current command target. - listens for the event, which is raised by the . The event is raised whenever conditions are met that may change the whether the command should execute, such as a change in keyboard focus. When the command receives the event, it raises the event. Generally, the command source will listen for this event and query the by way of the method. Most command sources will disable themselves if the command cannot be executed, as part of their command binding. An example of this is when a grays itself out when the command cannot be executed. - - In some situations, the is unaware of a change in conditions that alters the ability of a command to execute. In these cases, you can force the to raises the event by calling the method, this will in turn cause the to raise the event. - - - -## Examples - The following example is a event handler from a custom implementation of . - - `this.Command` in this example is the property on the . If the command is not `null`, the command is cast to a . If the command is a , then the method is called passing the and the . If command is not a , it is cast to an and the method is called passing the . - - If the method returns `true`, then the control is enabled; otherwise, the control is disabled. - + listens for the event, which is raised by the . The event is raised whenever conditions are met that may change the whether the command should execute, such as a change in keyboard focus. When the command receives the event, it raises the event. Generally, the command source will listen for this event and query the by way of the method. Most command sources will disable themselves if the command cannot be executed, as part of their command binding. An example of this is when a grays itself out when the command cannot be executed. + + In some situations, the is unaware of a change in conditions that alters the ability of a command to execute. In these cases, you can force the to raises the event by calling the method, this will in turn cause the to raise the event. + + + +## Examples + The following example is a event handler from a custom implementation of . + + `this.Command` in this example is the property on the . If the command is not `null`, the command is cast to a . If the command is a , then the method is called passing the and the . If command is not a , it is cast to an and the method is called passing the . + + If the method returns `true`, then the control is enabled; otherwise, the control is disabled. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/RoutedCommand/CanExecute/CommandSlider.cs" id="Snippetimplementicommandcanexecutechanged"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ImplementICommandSource/visualbasic/commandslider.vb" id="Snippetimplementicommandcanexecutechanged"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ImplementICommandSource/visualbasic/commandslider.vb" id="Snippetimplementicommandcanexecutechanged"::: + ]]> @@ -349,23 +348,23 @@ Element at which to begin looking for command handlers. Executes the on the current command target. - is not contained in the methods. raises the and events, which tunnel and bubble through the element tree looking for an object with a . If a for that is found, then the attached to is called. These handlers supply the programming logic that performs the . - - The and events are raised on the . If the is not set on the , the and events are raised on the element with keyboard focus. - - - -## Examples - The following example is from a custom implementation of sample. - - `this.Command` in this example is the Command property on the . If the command is not null, the command is cast to a . If it is a , then the method is called passing the and the . If the command is not a , it is cast to an and the method is called passing the . - + is not contained in the methods. raises the and events, which tunnel and bubble through the element tree looking for an object with a . If a for that is found, then the attached to is called. These handlers supply the programming logic that performs the . + + The and events are raised on the . If the is not set on the , the and events are raised on the element with keyboard focus. + + + +## Examples + The following example is from a custom implementation of sample. + + `this.Command` in this example is the Command property on the . If the command is not null, the command is cast to a . If it is a , then the method is called passing the and the . If the command is not a , it is cast to an and the method is called passing the . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/RoutedCommand/CanExecute/CommandSlider.cs" id="Snippetimplementicommandexecute"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ImplementICommandSource/visualbasic/commandslider.vb" id="Snippetimplementicommandexecute"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/ImplementICommandSource/visualbasic/commandslider.vb" id="Snippetimplementicommandexecute"::: + ]]> @@ -396,14 +395,14 @@ Gets the collection of objects that are associated with this command. The input gestures. - to a . - + to a . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/InputBinding/.ctor/Window1.xaml.cs" id="Snippetmousebindingaddedcommand"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandLibrarySnippets/visualbasic/window1.xaml.vb" id="Snippetmousebindingaddedcommand"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/CommandLibrarySnippets/visualbasic/window1.xaml.vb" id="Snippetmousebindingaddedcommand"::: + ]]> @@ -444,11 +443,11 @@ Gets the name of the command. The name of the command. - in XAML. - + in XAML. + ]]> @@ -523,11 +522,11 @@ if this command can be executed; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -563,18 +562,18 @@ Data used by the command. If the command does not require data to be passed, this object can be set to . For a description of this members, see . - instance is cast to an interface. - - - -## Examples - See Also - - - + instance is cast to an interface. + + + +## Examples + See Also + + + ]]> diff --git a/xml/System.Windows.Input/RoutedUICommand.xml b/xml/System.Windows.Input/RoutedUICommand.xml index 31b044f771a..0fd4f9f1bea 100644 --- a/xml/System.Windows.Input/RoutedUICommand.xml +++ b/xml/System.Windows.Input/RoutedUICommand.xml @@ -31,44 +31,43 @@ Defines an that is routed through the element tree and contains a text property. - and is that includes a property. - - The and methods on a do not contain the command logic for the command, as is the case with a typical . These methods raise events that traverse the element tree looking for an object with a . The event handlers attached to the contain the command logic. - - The method raises the and events. The method raises the and events. - - -## XAML Attribute Usage - -``` - -- or - - -- or - - - -``` - - -## XAML Values - *predefinedClassName* - One of the predefined command classes. - - *predefinedCommandName* - One of the predefined commands. - - *prefix* - The `xlmns` prefix that maps *customClassName*.*customCommandName* to the .NET class. For more information, see [XAML Namespaces and Namespace Mapping for WPF XAML](/dotnet/framework/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml). - - *customClassName* - A custom class that contains the custom command. - - *customCommandName* - A custom command. - + and is that includes a property. + + The and methods on a do not contain the command logic for the command, as is the case with a typical . These methods raise events that traverse the element tree looking for an object with a . The event handlers attached to the contain the command logic. + + The method raises the and events. The method raises the and events. + +## XAML attribute usage + +```xaml + +- or - + +- or - + +``` + +## XAML values + + `predefined-class-name`\ + One of the predefined command classes. + + `predefined-command-name`\ + One of the predefined commands. + + `prefix`\ + The `xlmns` prefix that maps `customClassName.customCommandName` to the .NET class. For more information, see [XAML Namespaces and Namespace Mapping for WPF XAML](/dotnet/framework/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml). + + `custom-class-name`\ + A custom class that contains the custom command. + + `custom-command-name`\ + A custom command. + ]]> diff --git a/xml/System.Windows.Markup/ValueSerializerAttribute.xml b/xml/System.Windows.Markup/ValueSerializerAttribute.xml index 01404a21bf5..adfa3790118 100644 --- a/xml/System.Windows.Markup/ValueSerializerAttribute.xml +++ b/xml/System.Windows.Markup/ValueSerializerAttribute.xml @@ -70,14 +70,15 @@ attribute at the type level. For a property, you apply the attribute at the property level. Application at the property level potentially overrides any previous declaration for that property's type as applied at the type level. A can be associated with an attachable member by applying the attribute on the static `get` accessor method for the attachable member. - Value serialization is also applicable for enumerations, interfaces and structures, but not for delegates. + Value serialization is also applicable for enumerations, interfaces, and structures, but not for delegates. - In previous versions of the .NET Framework, this class existed in the WPF-specific assembly WindowsBase. In .NET Framework 4, 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). + In early versions of .NET Framework, this class existed in the WPF-specific assembly WindowsBase. In .NET Framework 4, was moved to 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). ]]> diff --git a/xml/ns-System.Windows.Input.xml b/xml/ns-System.Windows.Input.xml index 7d953c90f92..ad0e43aac45 100644 --- a/xml/ns-System.Windows.Input.xml +++ b/xml/ns-System.Windows.Input.xml @@ -1,6 +1,6 @@ - Provides types to support the Windows Presentation Foundation (WPF) input system. This includes device abstraction classes for mouse, keyboard, and stylus devices, a common input manager class, support for commanding and custom commands, and various utility classes. + Most of the types in this namespace support the Windows Presentation Foundation (WPF) input system. This includes device abstraction classes for mouse, keyboard, and stylus devices, a common input manager class, support for commanding and custom commands, and various utility classes. However, some of the types are applicable beyond WPF. To be added. - \ No newline at end of file + diff --git a/xml/ns-System.Windows.Markup.xml b/xml/ns-System.Windows.Markup.xml index 54fbd68260b..3efc2a2e866 100644 --- a/xml/ns-System.Windows.Markup.xml +++ b/xml/ns-System.Windows.Markup.xml @@ -1,6 +1,6 @@ - Provides types to support XAML. Some of these types are located in WPF assemblies and are specific to WPF scenarios that involve XAML. Other types in this namespace provide support for .NET XAML Services in general, and don't require referencing WPF assemblies. + Provides types to support XAML. Some of these types are located in WPF assemblies and are specific to WPF scenarios that involve XAML. Other types in this namespace provide support for .NET XAML Services in general, and don't require referencing WPF assemblies. To be added.