127 lines
8.7 KiB
XML
127 lines
8.7 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
|
xmlns:langs="clr-namespace:HandyControl.Properties.Langs;assembly=HandyControl">
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
|
<Setter Property="UseLayoutRounding" Value="False"/>
|
|
<Setter Property="Height" Value="77"/>
|
|
<Setter Property="Width" Value="36.06"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid>
|
|
<Path Data="{StaticResource CirclePanelDemoGeometry}" Fill="{DynamicResource PrimaryBrush}" Height="77" Width="36.06"/>
|
|
<Path Data="{StaticResource CirclePanelRightGeometry}" Stretch="Uniform" Margin="12" Fill="White"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Opacity" Value=".9"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Opacity" Value=".6"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Opacity" Value="0.4"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ListBoxItemTransparent" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ListBoxItemNew" BasedOn="{StaticResource ListBoxItemTransparent}" TargetType="ListBoxItem">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
|
<StackPanel Orientation="Horizontal">
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="controls:EdgeElement.ShowEdgeContent" Value="true">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
|
<StackPanel Orientation="Horizontal">
|
|
<ContentControl Width="16" Height="16" Content="{Binding Path=(controls:EdgeElement.LeftContent),RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<ContentPresenter Margin="6,0,0,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="ListBoxTransparent" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemTransparent}"/>
|
|
</Style>
|
|
|
|
<ItemsPanelTemplate x:Key="FluidMoveBehaviorWrapPanelItemsPanelTemplate">
|
|
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<interactivity:Interaction.Behaviors>
|
|
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="0:0:.2">
|
|
<interactivity:FluidMoveBehavior.EaseX>
|
|
<PowerEase/>
|
|
</interactivity:FluidMoveBehavior.EaseX>
|
|
<interactivity:FluidMoveBehavior.EaseY>
|
|
<PowerEase/>
|
|
</interactivity:FluidMoveBehavior.EaseY>
|
|
</interactivity:FluidMoveBehavior>
|
|
</interactivity:Interaction.Behaviors>
|
|
</WrapPanel>
|
|
</ItemsPanelTemplate>
|
|
|
|
<Style x:Key="MessageBoxCustom" TargetType="controls:MessageBox" BasedOn="{StaticResource {x:Type controls:MessageBox}}">
|
|
<Setter Property="NonClientAreaBackground" Value="#262e2f"/>
|
|
<Setter Property="OtherButtonHoverBackground" Value="#888580"/>
|
|
<Setter Property="OtherButtonForeground" Value="White"/>
|
|
<Setter Property="OtherButtonHoverForeground" Value="White"/>
|
|
<Setter Property="NonClientAreaForeground" Value="White"/>
|
|
<Setter Property="CloseButtonForeground" Value="White"/>
|
|
<Setter Property="Content">
|
|
<Setter.Value>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Path x:Name="PART_Image" HorizontalAlignment="Center" Visibility="Collapsed" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="20,32,0,0" Width="30" Height="30" Stretch="Uniform"/>
|
|
<ScrollViewer Grid.Column="1" Grid.Row="0">
|
|
<TextBlock Margin="10,39,10,10" x:Name="PART_Message" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
|
</ScrollViewer>
|
|
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center">
|
|
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.Cancel" Content="{x:Static langs:Lang.Cancel}" Margin="5,0"/>
|
|
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Confirm" Content="{x:Static langs:Lang.Confirm}" Margin="5,0" Background="#262e2f" Style="{StaticResource ButtonPrimary}"/>
|
|
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.No" Content="{x:Static langs:Lang.No}" Margin="5,0"/>
|
|
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Yes" Content="{x:Static langs:Lang.Yes}" Margin="5,0" Background="#262e2f" Style="{StaticResource ButtonPrimary}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |