标签:context comm nes pre contex view width binding selected
<ListView x:Name="deviceListView" FontSize="18" Background="Transparent" BorderThickness="0" Foreground="#FF1BE2E2" Style="{DynamicResource ListViewStyle2}"> <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter Property="Background" Value="Transparent"/> <Setter Property="Foreground" Value="white"></Setter> <Setter Property="Opacity" Value="0.75"></Setter> </Trigger> <Trigger Property="IsSelected" Value="true"> <Setter Property="Foreground" Value="white"></Setter> <Setter Property="Background" Value="Transparent"></Setter> <Setter Property="Opacity" Value="1"></Setter> </Trigger> </Style.Triggers> </Style> </ListView.ItemContainerStyle> <ListView.ContextMenu> <ContextMenu > <MenuItem Header="详情"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <Custom:EventToCommand Command="{Binding DevicesSetCmd}" CommandParameter="0"/> </i:EventTrigger> </i:Interaction.Triggers> </MenuItem> <MenuItem Header="删除"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <Custom:EventToCommand Command="{Binding DevicesSetCmd}" CommandParameter="1"/> </i:EventTrigger> </i:Interaction.Triggers> </MenuItem> <MenuItem Header="修改"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <Custom:EventToCommand Command="{Binding DevicesSetCmd}" CommandParameter="3"/> </i:EventTrigger> </i:Interaction.Triggers> </MenuItem> </ContextMenu> </ListView.ContextMenu> <ListView.View> <GridView> <GridViewColumn Header="序号" Width="80" /> <GridViewColumn Header="名称" /> </GridView> </ListView.View> </ListView>
标签:context comm nes pre contex view width binding selected
原文地址:https://www.cnblogs.com/LY-HeroesRebor/p/9070987.html