需要更改wpf中其他行的下拉项的下拉项

时间:2013-02-12 11:16:04

标签: wpf

我有一个包含以下代码的列表视图

<ListView Name="configurationModeGrid" Width="400" Margin="236,440,58,143" BorderBrush="Black" FontFamily="Microsoft Sans Serif" FontSize="11">
        <ListView.View>
            <GridView>
                <GridView.Columns>
                    <GridViewColumn Width="110" Header="Network">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Margin="-5,0,-5,0" Name="NetworkName" Height="20" Width="108" Text="{Binding NetworkName, Mode=OneWay}"  Background="#FFFFCAA6" HorizontalAlignment="Left" Style="{StaticResource DisableText}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Width="110" Header="Trend Mode">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <ComboBox Name="TrendListItems" Margin="-5,0,-5,0" Width="108" ItemsSource="{Binding TrendModeList}" SelectedItem="{Binding CurrentMode}" HorizontalAlignment="Left" Style="{StaticResource ListBoxCombo}" SelectionChanged="TrendListItems_SelectionChanged" >

                                </ComboBox>
                            </DataTemplate>

                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="LAN" Width="50">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Name="LanNumber"  Margin="-5,0,-5,0" Width="48" Text="{Binding LanNumber,Mode=OneWay}" IsEnabled="False" Background="#FFFFCAA6"  HorizontalAlignment="Left" Style="{StaticResource DisableText}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="Label" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Name="LanLabel" Margin="-5,0,-5,0" Width="98" Text="{Binding LanLabel, Mode=OneWay}" Background="#FFFFCAA6" HorizontalAlignment="Left" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView.Columns>
            </GridView>
        </ListView.View>
    </ListView>
  1. 下拉列表将绑定以下选项

    i)互联网络 II)lan iii)无

  2. 问题

    1. 如果从列表视图的第一行中选择了下拉列表中的局域网项目,我想让其他其他下拉列表项目的项目必须变为无。
    2. 这可以使用WPF UI完成,还是只能使用数据模型?

0 个答案:

没有答案