| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <UserControl x:Class="UICommon.Controls.CustomListView"
- 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"
- xmlns:local="clr-namespace:UICommon.Controls"
- mc:Ignorable="d"
- x:Name="This"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <Style x:Key="UpButton" TargetType="Button">
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" CornerRadius="0,4,0,0">
- <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="border" Property="Background" Value="{StaticResource DisableColor}"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource LightThemeColor}"/>
- </Trigger>
- <Trigger Property="AreAnyTouchesOver" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource LightThemeColor}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="MiddleButton" TargetType="Button">
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
- <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="border" Property="Background" Value="{StaticResource DisableColor}"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource LightThemeColor}"/>
- </Trigger>
- <Trigger Property="AreAnyTouchesOver" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource LightThemeColor}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="DownButton" TargetType="Button">
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" CornerRadius="0,0,4,0">
- <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="border" Property="Background" Value="{StaticResource DisableColor}"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource LightThemeColor}"/>
- </Trigger>
- <Trigger Property="AreAnyTouchesOver" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource LightThemeColor}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <Border Background="#f5f7fa" CornerRadius="4">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="1"/>
- <ColumnDefinition Width="32"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="21"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Border Background="{StaticResource ThemeColor}" CornerRadius="4,0,0,0">
- </Border>
- <Grid Grid.RowSpan="3" Grid.Column="2">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition Height="1"/>
- <RowDefinition/>
- <RowDefinition Height="1"/>
- <RowDefinition/>
- <RowDefinition Height="1"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Button Grid.Row="0" Style="{StaticResource UpButton}">
- <StackPanel>
- <Image Source="{StaticResource ArrowUP}" Width="8"/>
- <Image Source="{StaticResource ArrowUP}" Width="8"/>
- </StackPanel>
- </Button>
- <Button Grid.Row="2" Style="{StaticResource MiddleButton}">
- <Image Source="{StaticResource ArrowUP}" Width="8"/>
- </Button>
- <Button Grid.Row="4" Style="{StaticResource MiddleButton}">
- <Image Source="{StaticResource ArrowDown}" Width="8"/>
- </Button>
- <Button Grid.Row="6" Style="{StaticResource DownButton}">
- <StackPanel>
- <Image Source="{StaticResource ArrowDown}" Width="8"/>
- <Image Source="{StaticResource ArrowDown}" Width="8"/>
- </StackPanel>
- </Button>
- </Grid>
- <ItemsControl Grid.Row="1" ItemsSource="{Binding ElementName=This, Path=Source}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border Height="42" BorderBrush="#DBE2ED" BorderThickness="1">
- <TextBlock>AAA</TextBlock>
- </Border>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Grid>
- </Border>
- </UserControl>
|