BililiveRecorder/BililiveRecorder.WPF/Resources/ConverterResources.xaml
2021-05-04 15:18:06 +08:00

62 lines
4.1 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:c="clr-namespace:BililiveRecorder.WPF.Converters"
xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension"
>
<s:Boolean x:Key="True">True</s:Boolean>
<s:Boolean x:Key="False">False</s:Boolean>
<c:MultiBoolToValueConverter x:Key="MultiBoolToVisibilityCollapsedConverter" TrueValue="{x:Static Visibility.Visible}" FalseValue="{x:Static Visibility.Collapsed}"/>
<c:IsNaNToValueConverter x:Key="IsNaNToVisibilityCollapsedConverter" TrueValue="{x:Static Visibility.Visible}" FalseValue="{x:Static Visibility.Collapsed}" />
<c:IsNaNToValueConverter x:Key="InvertIsNaNToVisibilityCollapsedConverter" TrueValue="{x:Static Visibility.Collapsed}" FalseValue="{x:Static Visibility.Visible}" />
<c:BoolToValueConverter x:Key="BooleanToVisibilityCollapsedConverter" TrueValue="{x:Static Visibility.Visible}" FalseValue="{x:Static Visibility.Collapsed}" />
<c:BoolToValueConverter x:Key="InvertBooleanToVisibilityCollapsedConverter" TrueValue="{x:Static Visibility.Collapsed}" FalseValue="{x:Static Visibility.Visible}" />
<c:BoolToValueConverter x:Key="BooleanToVisibilityHiddenConverter" TrueValue="{x:Static Visibility.Visible}" FalseValue="{x:Static Visibility.Hidden}" />
<c:BoolToValueConverter x:Key="BooleanToLiveStatusColorBrushConverter">
<c:BoolToValueConverter.FalseValue>
<SolidColorBrush Color="#999999"/>
</c:BoolToValueConverter.FalseValue>
<c:BoolToValueConverter.TrueValue>
<SolidColorBrush Color="Red"/>
</c:BoolToValueConverter.TrueValue>
</c:BoolToValueConverter>
<c:BoolToValueConverter x:Key="BooleanToLiveStatusTooltipConverter">
<c:BoolToValueConverter.TrueValue>
<TextBlock Text="{l:Loc RoomCard_Status_LiveStatusTooltip_True}" l:ResxLocalizationProvider.DefaultDictionary="Strings"/>
</c:BoolToValueConverter.TrueValue>
<c:BoolToValueConverter.FalseValue>
<TextBlock Text="{l:Loc RoomCard_Status_LiveStatusTooltip_False}" l:ResxLocalizationProvider.DefaultDictionary="Strings"/>
</c:BoolToValueConverter.FalseValue>
</c:BoolToValueConverter>
<c:BoolToValueConverter x:Key="BooleanToDanmakuConnectedStyleConverter" TrueValue="{StaticResource PathIconDataCloudCheckOutline}" FalseValue="{StaticResource PathIconDataCloudAlert}"/>
<c:BoolToValueConverter x:Key="BooleanToDanmakuConnectedColorBrushConverter">
<c:BoolToValueConverter.FalseValue>
<SolidColorBrush Color="Red"/>
</c:BoolToValueConverter.FalseValue>
<c:BoolToValueConverter.TrueValue>
<SolidColorBrush Color="#8BC34A"/>
</c:BoolToValueConverter.TrueValue>
</c:BoolToValueConverter>
<c:BoolToValueConverter x:Key="BooleanToDanmakuConnectedTooltipConverter">
<c:BoolToValueConverter.TrueValue>
<TextBlock Text="{l:Loc RoomCard_Status_DanmakuConnectionTooltip_True}" l:ResxLocalizationProvider.DefaultDictionary="Strings"/>
</c:BoolToValueConverter.TrueValue>
<c:BoolToValueConverter.FalseValue>
<TextBlock Text="{l:Loc RoomCard_Status_DanmakuConnectionTooltip_False}" l:ResxLocalizationProvider.DefaultDictionary="Strings"/>
</c:BoolToValueConverter.FalseValue>
</c:BoolToValueConverter>
<c:BooleanInverterConverter x:Key="BooleanInverterConverter"/>
<c:ClipEnabledToBooleanConverter x:Key="ClipEnabledToBooleanConverter"/>
<c:EnumToBooleanConverter x:Key="EnumToBooleanConverter"/>
<c:IsNullToVisibilityConverter x:Key="IsNullToVisibilityCollapsedConverter"/>
<c:RatioToColorBrushConverter x:Key="RatioToColorBrushConverter"/>
<c:RatioToArrowIconConverter x:Key="RatioToArrowIconConverter" UpArrow="{StaticResource PathIconDataArrowUpBold}" DownArrow="{StaticResource PathIconDataArrowDownBold}"/>
<c:ShortRoomIdToVisibilityConverter x:Key="ShortRoomIdToVisibilityConverter"/>
<c:ByteUnitsConverter x:Key="ByteUnitsConverter"/>
</ResourceDictionary>