BililiveRecorder/BililiveRecorder.WPF/Resources/ConverterResources.xaml

54 lines
3.4 KiB
Plaintext
Raw Normal View History

2021-01-05 19:08:57 +08:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:BililiveRecorder.WPF.Converters"
xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension"
>
2020-12-10 17:02:56 +08:00
<c:MultiBoolToValueConverter x:Key="MultiBoolToVisibilityCollapsedConverter" TrueValue="{x:Static Visibility.Visible}" FalseValue="{x:Static Visibility.Collapsed}"/>
<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>
2021-01-05 19:08:57 +08:00
<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>
2020-12-15 19:38:35 +08:00
<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>
2021-01-05 19:08:57 +08:00
<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>
2020-12-10 17:02:56 +08:00
<c:BooleanInverterConverter x:Key="BooleanInverterConverter"/>
<c:ClipEnabledToBooleanConverter x:Key="ClipEnabledToBooleanConverter"/>
<c:EnumToBooleanConverter x:Key="EnumToBooleanConverter"/>
<c:IsNullToVisibilityConverter x:Key="IsNullToVisibilityCollapsedConverter"/>
<c:PercentageToColorBrushConverter x:Key="PercentageToColorBrushConverter"/>
<c:ShortRoomIdToVisibilityConverter x:Key="ShortRoomIdToVisibilityConverter"/>
</ResourceDictionary>