Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 无法将Xaml设置为文本框之间的制表符_C#_Wpf_Xaml - Fatal编程技术网

C# 无法将Xaml设置为文本框之间的制表符

C# 无法将Xaml设置为文本框之间的制表符,c#,wpf,xaml,C#,Wpf,Xaml,我正在尝试将我的视图设置为“拾取用户名”文本框和“按摩”文本框xaml之间的“仅”选项卡。我的第一个问题是标签卡在输入用户名上,我猜它有一个用于搜索建议的自定义控件。另外,它在视图中的每个按钮上都有标签,我不希望它这样做。我尝试在两个文本框中添加一个Tabindex,但没有效果。我把Tabidex放在两个文本框中,这样你就知道我要在哪两个文本框之间进行tab了 <UserControl x:Class="Clinical.Patient.Views.SendMessageDialogVie

我正在尝试将我的视图设置为“拾取用户名”文本框和“按摩”文本框xaml之间的“仅”选项卡。我的第一个问题是标签卡在输入用户名上,我猜它有一个用于搜索建议的自定义控件。另外,它在视图中的每个按钮上都有标签,我不希望它这样做。我尝试在两个文本框中添加一个Tabindex,但没有效果。我把Tabidex放在两个文本框中,这样你就知道我要在哪两个文本框之间进行tab了

<UserControl x:Class="Clinical.Patient.Views.SendMessageDialogView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-
             compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             d:DataContext="{d:DesignInstance 
             Type=viewModels:SendMessageDialogViewModel}"
             mc:Ignorable="d"
             d:DesignWidth="320"
             xmlns:properties="clr-namespace:Clinical.Patient.Properties"
             xmlns:viewModels="clr-namespace:Clinical.Patient.ViewModels"
             xmlns:patient="clr-namespace:Clinical.Patient"
             xmlns:self="clr-namespace:System;assembly=mscorlib"
             xmlns:views="clr-namespace:Clinical.Patient.Views"
             d:DesignHeight="350"
             xmlns:termAutoComplete="clr-
             namespace:Clinical.Patient.Controls.TermAutoComplete"
             xmlns:controls="clr-namespace:Clinical.Patient.Controls"
             KeyboardNavigation.TabNavigation="Local">

    <UserControl.Resources>
        <viewModels:IsAtLeastGradeConverter x:Key="IsAtLeastGradeConverter"/>
        <viewModels:IsAtLeastAutoCloseGradeConverter x:Key="IsAtLeastAutoCloseGradeConverter"/>
    </UserControl.Resources>
    <Border Padding="8"
            MinWidth="320"

            ClipToBounds="False">
        <Border BorderThickness="1"
                BorderBrush="{DynamicResource FocusBorderBrush}"
                CornerRadius="2"
                Background="{DynamicResource FocusBackgroundBrush}">
            <Border.Effect>
                <DropShadowEffect Color="{DynamicResource SubtleDivideBorderColor}"
                                  Opacity="1"
                                  ShadowDepth="0"
                                  BlurRadius="10" />
            </Border.Effect>

            <StackPanel Orientation="Vertical"
                        Margin="10">

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Center"
                           Text="{x:Static properties:Strings.SharingReportIs}"
                           Foreground="{DynamicResource CommonTextBrush}"
                           FontSize="13"
                           FontWeight="Bold"/>

                    <Border Grid.Column="1"
                        Width="180"
                        Margin="5 5 20 5"
                        HorizontalAlignment="Left"
                        Background="{DynamicResource FocusBackgroundBrush}"
                        BorderBrush="{DynamicResource FocusBorderBrush}"
                        BorderThickness=".5"
                        CornerRadius="8,8,8,8">
                        <DockPanel HorizontalAlignment="Center">
                            <views:ExamTypeIconView DockPanel.Dock="Left"
                                    Type="{Binding ExamType}"
                                    Foreground="{DynamicResource CommonTextBrush}"
                                    IconHeight="30"/>
                            <StackPanel DockPanel.Dock="Left"
                                Margin="3">
                                <TextBlock Text="{Binding Status}"
                                   Foreground="{DynamicResource CommonTextBrush}"
                                   FontSize="13"/>
                                <TextBlock Text="{Binding Accession}"
                                   Foreground="{DynamicResource CommonTextBrush}"
                                   FontSize="13"/>
                            </StackPanel>
                        </DockPanel>
                    </Border>
                </Grid>
                <DockPanel HorizontalAlignment="Left"
                           MinWidth="280"
                           Margin="0 5 0 0">
                    <Button
                        x:Name="To"
                        HorizontalAlignment="Right"
                        MinWidth="65"
                        Margin="0,4,4,4"
                        IsDefault="True"
                        Command="{Binding ToCommand}"
                        Content="to.." Width="65" />

                    <TextBox x:Name="SendTo"
                             Text="{Binding Recipient, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                             Style="{DynamicResource NavigationSearchTextBox}"
                             FontSize="{DynamicResource OneAndAQuarterFontSize}"
                             Padding="0 3 0 3"
                             VerticalAlignment="Center" 
                             Width="225"
                             TabIndex="0"/>

                    <termAutoComplete:TermAutoComplete AutoCompleteSource="{Binding AutoCompleteSource}"
                                                       Padding="0 0 0 0"
                                                       TextBox="{Binding ElementName=SendTo}"/>

                </DockPanel>

                <Grid Margin="0 5 0 0">
                    <TextBlock Text="{x:Static properties:Strings.SharingMessage}"
                                Foreground="{DynamicResource CommonTextBrush}"
                                FontSize="13"
                                FontWeight="Bold" />
                </Grid>
                <TextBox x:Name="PeerReviewComments"
                         Margin="0 5 0 0"
                         MinLines="5"
                         AcceptsReturn="True"
                         TextWrapping="Wrap"
                         Text="{Binding Message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                         Width="295"
                         TabIndex="1"/>
                <DockPanel
                           MinWidth="280"
                           Margin="0,5,-5,0"
                           >
                    <Button
                    x:Name="Save"
                    HorizontalAlignment="Right"enter code here
                    MinWidth="65"
                    Margin="0,4,4,4"
                    IsDefault="True"
                    Command="{Binding SendCommand}"
                    Content="Send" Width="65"
                    DockPanel.Dock="Right"

                    />
                    <Button
                    x:Name="Cancle"
                    HorizontalAlignment="Right"
                    MinWidth="65"
                    Margin="0,4,4,4"
                    IsDefault="True"
                    Command="{Binding CancelCommand}"
                    Content="Cancel" Width="65"
                    DockPanel.Dock="Right"
                    />



                </DockPanel>

            </StackPanel>
        </Border>
    </Border>
</UserControl>

我认为您需要将“TabIndex”替换为“KeyboardNavigation.TabIndex”

如果不起作用,还可以通过在XAML中的元素上设置KeyboardNavigation.IsTabStop跳过选项卡序列中的元素

KeyboardNavigation.IsTabStop="False"
KeyboardNavigation.IsTabStop="False"

我认为您需要将“TabIndex”替换为“KeyboardNavigation.TabIndex”

如果不起作用,还可以通过在XAML中的元素上设置KeyboardNavigation.IsTabStop跳过选项卡序列中的元素

KeyboardNavigation.IsTabStop="False"
KeyboardNavigation.IsTabStop="False"

对于选项卡“卡住”的控件,添加:

要避免制表符碰到控件,请添加:

对于选项卡“卡住”的控件,添加:

要避免制表符碰到控件,请添加: