| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <UserControl
- x:Class="SHJX.Service.Main.Views.DissolveBottomPos"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:SHJX.Service.Main.Views"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:views="clr-namespace:SHJX.Service.Library.Views;assembly=SHJX.Service.Library"
- d:DesignHeight="150"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <UserControl.Resources>
- <DataTemplate x:Key="itemTemplate">
- <views:RingProcessBar
- CenterColor="{Binding CenterColor}"
- CurrentCycleValue="{Binding CurrentCycleValue}"
- CurrentText="{Binding CurrentText}"
- RoundVisiable="{Binding RoundVisiable}" />
- </DataTemplate>
- <!-- 下面这段代码不用,不能变成Uniform的样式 -->
- <Style x:Key="ItemContainerStyle" TargetType="{x:Type ListViewItem}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListViewItem}">
- <Border
- x:Name="Bd"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="0">
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="true">
- <Setter TargetName="Bd" Property="Background" Value="Transparent" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <Grid>
- <ListView
- x:Name="DissolveAreas"
- Background="Transparent"
- ItemContainerStyle="{StaticResource ItemContainerStyle}"
- ItemTemplate="{StaticResource ResourceKey=itemTemplate}"
- ItemsSource="{Binding RingProcessBars}">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Columns="4" Rows="1" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- </ListView>
- </Grid>
- </UserControl>
|