TMusic/MusicLrcWindow.xaml

(开头部分) 18KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<Window x:Class="TMusic.MusicLrcWindow"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:app="clr-namespace:TMusic.Model;assembly=TMusic.Model"
        xmlns:local="clr-namespace:TMusic"
        xmlns:localview="clr-namespace:TMusic.View"
        xmlns:converter="clr-namespace:TMusic.Converters"
        mc:Ignorable="d"
        Title="MusicLrcWindow" MinHeight="180" MaxHeight="500" MinWidth="600" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="Manual" WindowState="Normal"  FontFamily="{DynamicResource MaterialDesignFont}" BorderThickness="5" ResizeMode="{Binding ResizeMode}" Topmost="True" MouseLeftButtonDown="Window_MouseLeftButtonDown" ShowInTaskbar="False" Background="Transparent" Width="{Binding Width,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="{Binding Height,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
    <Window.Effect>
        <DropShadowEffect BlurRadius="5" Opacity="0.6" ShadowDepth="0"/>
    </Window.Effect>
    <Window.Resources>
        <converter:ColorToBrushConverter x:Key="ColorToBrushConverter" />
        <converter:BrushToHexConverter x:Key="BrushToHexConverter" />
        <converter:MultiValueEqualityConverter x:Key="MultiValueEqualityConverter" />

        <Style x:Key="MyTextBlockBase" TargetType="TextBlock">
            <Setter Property="Foreground" Value="{Binding Foreground}"/>
            <Setter Property="FontSize" Value="{Binding FontSize}"/>
            <Setter Property="FontWeight" Value="{Binding FontWeight}"/>
            <Setter Property="FontFamily" Value="{Binding FontFamily}"/>
            <Setter Property="FontStyle" Value="{Binding FontStyle}"/>
            <Setter Property="Cursor" Value="IBeam"/>
        </Style>
        <Style x:Key="MyTextBlock" TargetType="TextBlock">
            <Setter Property="Visibility" Value="Collapsed"/>
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding ResizeMode}" Value="CanResizeWithGrip"/>
                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Grid}}" Value="True"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility" Value="Visible"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="MusicName" TargetType="TextBlock">
            <Setter Property="Foreground" Value="{Binding SelectedForeground}"/>
            <Setter Property="FontSize" Value="18"/>
            <Setter Property="Margin" Value="20,0"/>
            <Setter Property="FontWeight" Value="{Binding FontWeight}"/>
            <Setter Property="FontFamily" Value="{Binding FontFamily}"/>
            <Setter Property="FontStyle" Value="{Binding FontStyle}"/>
            <Setter Property="Cursor" Value="IBeam"/>
        </Style>
        <Style x:Key="MusicLrcUp" TargetType="TextBlock" BasedOn="{StaticResource MyTextBlockBase}">
            <Style.Triggers>
                <DataTrigger Value="0">
                    <DataTrigger.Binding>
                        <Binding Path="SelectedType"/>
                    </DataTrigger.Binding>
                    <Setter Property="Foreground" Value="{Binding SelectedForeground}"/>
                    <Setter Property="TextDecorations" Value="None"/>
                    <Setter Property="TextTrimming" Value="None"/>
                </DataTrigger>
            </Style.Triggers>
后面还有 232 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。