|
@@ -29,38 +29,81 @@
|
|
<ColumnDefinition></ColumnDefinition>
|
|
<ColumnDefinition></ColumnDefinition>
|
|
<ColumnDefinition></ColumnDefinition>
|
|
<ColumnDefinition></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
- <ListView Grid.Column="0" >
|
|
|
|
|
|
+ <ListView Grid.Column="0" ItemsSource="{Binding EqNames}" AlternationCount="2">
|
|
<ListView.View>
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridView>
|
|
- <GridViewColumn Header="设备名称" Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource AncestorType=ListView , Mode=FindAncestor}}"></GridViewColumn>
|
|
|
|
|
|
+ <GridViewColumn Header="设备名称" DisplayMemberBinding="{Binding }" Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource AncestorType=ListView , Mode=FindAncestor}}"></GridViewColumn>
|
|
</GridView>
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView.View>
|
|
- <ListBox.Items>
|
|
|
|
- <ListBoxItem>设备类1</ListBoxItem>
|
|
|
|
- <ListBoxItem>设备类2</ListBoxItem>
|
|
|
|
- </ListBox.Items>
|
|
|
|
|
|
+ <ListView.ItemContainerStyle>
|
|
|
|
+ <Style TargetType="{x:Type ListBoxItem}">
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <Trigger Property="ItemsControl.AlternationIndex"
|
|
|
|
+ Value="0">
|
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="ItemsControl.AlternationIndex"
|
|
|
|
+ Value="1">
|
|
|
|
+ <Setter Property="Background" Value="#FFE6E3DD" />
|
|
|
|
+ </Trigger>
|
|
|
|
+
|
|
|
|
+ <Trigger Property="IsSelected" Value="true">
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
|
|
|
|
+ </Trigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="IsSelected" Value="true"/>
|
|
|
|
+ <Condition Property="Selector.IsSelectionActive" Value="false"/>
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+ </ListView.ItemContainerStyle>
|
|
</ListView>
|
|
</ListView>
|
|
|
|
|
|
- <ListView Grid.Column="1" >
|
|
|
|
|
|
+ <ListView Grid.Column="1" ItemsSource="{Binding EqFlags}" AlternationCount="2">
|
|
<ListView.View>
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridView>
|
|
- <GridViewColumn Header="设备标识" Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource AncestorType=ListView , Mode=FindAncestor}}"></GridViewColumn>
|
|
|
|
|
|
+ <GridViewColumn Header="设备标识" DisplayMemberBinding="{Binding }" Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource AncestorType=ListView , Mode=FindAncestor}}" ></GridViewColumn>
|
|
</GridView>
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView.View>
|
|
- <ListBox.Items>
|
|
|
|
- <ListBoxItem>1#</ListBoxItem>
|
|
|
|
- <ListBoxItem>5F-3#</ListBoxItem>
|
|
|
|
- </ListBox.Items>
|
|
|
|
|
|
+ <ListView.ItemContainerStyle>
|
|
|
|
+ <Style TargetType="{x:Type ListBoxItem}">
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <Trigger Property="ItemsControl.AlternationIndex"
|
|
|
|
+ Value="0">
|
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="ItemsControl.AlternationIndex"
|
|
|
|
+ Value="1">
|
|
|
|
+ <Setter Property="Background" Value="#FFE6E3DD" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsSelected" Value="true">
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
|
|
|
|
+ </Trigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="IsSelected" Value="true"/>
|
|
|
|
+ <Condition Property="Selector.IsSelectionActive" Value="false"/>
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+ </ListView.ItemContainerStyle>
|
|
</ListView>
|
|
</ListView>
|
|
</Grid>
|
|
</Grid>
|
|
</GroupBox>
|
|
</GroupBox>
|
|
<Canvas Grid.Row="2">
|
|
<Canvas Grid.Row="2">
|
|
<Button Width="178" Height="24" Content="确定" IsDefault="True"
|
|
<Button Width="178" Height="24" Content="确定" IsDefault="True"
|
|
- Command="{Binding Path=Commands.Save}"
|
|
|
|
- CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}" Canvas.Left="77" Canvas.Top="18"></Button>
|
|
|
|
|
|
+ Click="Button_Ensure" Canvas.Left="77" Canvas.Top="18"></Button>
|
|
<Button Width="100" Height="24" Content="取消" IsDefault="True" Background="White"
|
|
<Button Width="100" Height="24" Content="取消" IsDefault="True" Background="White"
|
|
- Command="{Binding Path=Commands.Save}"
|
|
|
|
- CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}" Canvas.Left="298" Canvas.Top="18"></Button>
|
|
|
|
|
|
+ Click="Button_Cancel" Canvas.Left="298" Canvas.Top="18"></Button>
|
|
</Canvas>
|
|
</Canvas>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|
|
</Window>
|