Share via


DataTableNavigator.CommandRules Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Gets a collection of CommandRule objects that can enable, disable, or redefine the navigation commands of the control. Read-only.

Namespace: Microsoft.Speech.Web.UI
Assembly: Microsoft.Speech.Web (in microsoft.speech.web.dll)

Syntax

'Declaration
<MergablePropertyAttribute(False)> _
<NotifyParentPropertyAttribute(True)> _
<PersistenceModeAttribute(PersistenceMode.InnerProperty)> _
<SRCategoryAttribute("Category_Speech")> _
Public ReadOnly Property CommandRules As CommandRuleCollection
[MergablePropertyAttribute(false)] 
[NotifyParentPropertyAttribute(true)] 
[PersistenceModeAttribute(PersistenceMode.InnerProperty)] 
[SRCategoryAttribute("Category_Speech")] 
public CommandRuleCollection CommandRules { get; }

Remarks

The CommandRules property is a CommandRuleCollection containing one or more CommandRule objects.

Example

In the following example, the CommandRules property contains a CommandRule control that disables the Read command.

<form id="Form1" method="post" runat="server">
  ...
    <asp:textbox id="TextBox1" runat="server"></asp:textbox>
    <speech:semanticmap id="SemanticMap1" runat="server" >
      <speech:SemanticItem id="SemItemNav" runat="server" 
        TargetElement="TextBox1" TargetAttribute="value" BindOnChanged="True">
      </speech:SemanticItem>
    </speech:semanticmap>

    <speech:DataTableNavigator 
      id="Navigator1"  
      QuestionPrompt="weather by state" 
      DataHeaderFields="city,state"
      DataContentFields="low,high,conditions" 
      EndSilence="2500" 
      AccessMode="Select" 
      <CommandRules>
        <speech:CommandRule Type="Read" Active="false" />
      </CommandRules>
      ShortInitialTimeout="2000" 
      SemanticItem="SemItemNav"
      runat="server">
    </speech:DataTableNavigator>
  ...
</form>

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

DataTableNavigator Class
DataTableNavigator Members
Microsoft.Speech.Web.UI Namespace