Intersoft ClientUI Documentation
CanQueryStatusRoutedEventArgs Class
Members 



Provides data for the CanQueryStatus routed event.
Object Model
CanQueryStatusRoutedEventArgs ClassQueryStatusParameter ClassRoutedEvent Class
Syntax
Public NotInheritable Class CanQueryStatusRoutedEventArgs 
   Inherits Intersoft.Client.Framework.ISRoutedEventArgs
public sealed class CanQueryStatusRoutedEventArgs : Intersoft.Client.Framework.ISRoutedEventArgs 
public ref class CanQueryStatusRoutedEventArgs sealed : public Intersoft.Client.Framework.ISRoutedEventArgs 
Remarks

HybridCommandManager exposes CanQueryStatus routed event to provide a mechanism to determine whether a command can query the status of its command target. The instance CanQueryStatus event is also available in the HybridCommandBinding class. The CanQueryStatus routed event sent a CanQueryStatusEventArgs as the event data when the routed event is raised.

The event data in CanQueryStatusEventArgs contains three main properties:

When a command is determined to support query status, you set the value of the CanQueryStatus property in the event data to true. The QueryStatus event will be raised according to the value of the CanQueryStatus property.

The following code example shows the event handler for CanQueryStatus and QueryStatus routed event for the HybridCommandBinding associated to the Bold command.

C#
Copy Code
 private void BoldCmdCanQueryStatus(object sender, CanQueryStatusRoutedEventArgs e)
 {
     e.CanQueryStatus = true;
 }

 private void BoldCmdQueryStatus(object sender, QueryStatusRoutedEventArgs e)
 {
     if (e.Command == EditingCommands.Bold)
     {
         // notifies the current bold status to the command source
         // that bound to the Bold command.

         e.QueryParameter.Value = (FontWeight)textBox1.Selection.
             GetPropertyValue(Run.FontWeightProperty) == FontWeights.Bold;
     }
 }

For a complete example of how to implement a hybrid routed command, see How-to: Implement a HybridRoutedCommand.

For more information about hybrid command concept, see Hybrid Commands.

Inheritance Hierarchy

System.Object
   System.EventArgs
      System.Windows.RoutedEventArgs
         Intersoft.Client.Framework.ISRoutedEventArgs
            Intersoft.Client.Framework.Input.CanQueryStatusRoutedEventArgs

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CanQueryStatusRoutedEventArgs Members
Intersoft.Client.Framework.Input Namespace

Concepts

Hybrid Commands

Send Feedback