Commit e348a6e7 authored by 潘栩锋's avatar 潘栩锋 🚴

删除 收卷项目多于的 NoToggleButtonStyle

parent 56140104
......@@ -138,10 +138,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\NoToggleButtonStyle.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\MainPanel\MainPanel2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Colors.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--toggleSwitchButton 默认样式-->
<Style TargetType="flyctrl:NoToggleButton" x:Key="NoToggleButtonStyle">
<Setter Property="Margin" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Width" Value="110"/>
<Setter Property="OffBrush" Value="{StaticResource Color_theme_static}" />
<Setter Property="OnBrush" Value="{StaticResource Color_theme_activity}" />
<Setter Property="OffLabel" Value="{Binding Content,RelativeSource={RelativeSource Mode=Self}}" />
<Setter Property="OnLabel" Value="{Binding Content,RelativeSource={RelativeSource Mode=Self}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="flyctrl:NoToggleButton">
<Border x:Name="canvas" Height="55" Width="{TemplateBinding Width}" Background="{TemplateBinding OffBrush}">
<Grid>
<Rectangle x:Name="Path_block" Height="45" Width="24" Margin="5" Fill="White" HorizontalAlignment="Left"/>
<StackPanel x:Name="SP_Text" Orientation="Horizontal" Margin="20,15" HorizontalAlignment="Right">
<TextBlock x:Name="TB_OnOff" Text="{TemplateBinding Property=OffLabel}" Foreground="White" FontSize="24" FontFamily="YouYuan"/>
</StackPanel>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Path_block" Property="HorizontalAlignment" Value="Right"/>
<Setter TargetName="SP_Text" Property="HorizontalAlignment" Value="Left"/>
<Setter TargetName="TB_OnOff" Property="Text" Value="{Binding OnLabel,RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
<Setter TargetName="canvas" Property="Background" Value="{Binding OnBrush,RelativeSource={RelativeSource Mode=TemplatedParent}}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<!--块移到中间-->
<Setter TargetName="Path_block" Property="HorizontalAlignment" Value="Center"/>
<Setter TargetName="TB_OnOff" Property="Opacity" Value="0.5"/>
<Setter Property="Opacity" Value="1"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value="0.7"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="flyctrl:NoToggleButton" BasedOn="{StaticResource NoToggleButtonStyle}"/>
</ResourceDictionary>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment