TMusic/View/ThemeBgView.xaml
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<UserControl x:Class="TMusic.View.ThemeBgView"
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:app="clr-namespace:TMusic.Model;assembly=TMusic.Model"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:converter="clr-namespace:TMusic.Converters"
xmlns:local="clr-namespace:TMusic.View"
mc:Ignorable="d"
Width="570" Height="570">
<UserControl.Resources>
<ResourceDictionary>
<converter:ColorToBrushConverter x:Key="ColorToBrushConverter" />
<converter:BrushToHexConverter x:Key="BrushToHexConverter" />
<converter:MultiValueEqualityConverter x:Key="MultiValueEqualityConverter" />
<Style TargetType="Button" BasedOn="{StaticResource MaterialDesignRaisedButton}">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="md:ShadowAssist.ShadowDepth" Value="Depth0" />
</Style>
<Style TargetType="TextBlock" x:Key="HexLabelTextBlock" BasedOn="{StaticResource MaterialDesignBody2TextBlock}">
<Setter Property="Margin" Value="8" />
</Style>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="LightGray" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<DataTemplate DataType="{x:Type app:KeyValueModel}" x:Key="SwatchBgTemplate">
<Button
Height="100"
Width="150"
Command="{Binding DataContext.ChangeBgCmd, RelativeSource={RelativeSource AncestorType=local:ThemeBgView}}"
CommandParameter="{Binding}">
<Button.Background>
<ImageBrush ImageSource="{Binding Value}"/>
</Button.Background>
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource MaterialDesignRaisedButton}">
<Setter Property="local:ButtonAssist.UniformCornerRadius" Value="0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Margin" Value="3 3 0 0" />
<Setter Property="md:RippleAssist.IsDisabled" Value="True" />
<Setter Property="md:ShadowAssist.ShadowDepth" Value="Depth0" />
<Setter Property="Tag" Value="0" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="(local:ButtonAssist.UniformCornerRadius)"
To="20"
Duration="0:0:0.18" />
</Storyboard>
</BeginStoryboard>
后面还有 105 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
