BililiveRecorder/BililiveRecorder.WPF/Controls/SettingWithDefault.xaml
2021-01-01 14:46:27 +08:00

29 lines
1.6 KiB
XML

<UserControl
Name="SettingWithDefaultUserControl"
x:Class="BililiveRecorder.WPF.Controls.SettingWithDefault"
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:ui="http://schemas.modernwpf.com/2019"
xmlns:local="clr-namespace:BililiveRecorder.WPF.Controls"
mc:Ignorable="d"
d:DesignHeight="50" d:DesignWidth="200">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Header,ElementName=SettingWithDefaultUserControl}" Visibility="{Binding Header.Length, ElementName=SettingWithDefaultUserControl,Converter={StaticResource ShortRoomIdToVisibilityConverter}}"/>
<ContentPresenter Grid.Row="1"
Content="{Binding InnerContent,ElementName=SettingWithDefaultUserControl}"
IsEnabled="{Binding IsSettingNotUsingDefault,ElementName=SettingWithDefaultUserControl}"/>
<CheckBox Content="默认" Margin="10,0,0,0" Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Left"
IsChecked="{Binding IsSettingNotUsingDefault,ElementName=SettingWithDefaultUserControl,Converter={StaticResource BooleanInverterConverter}}"/>
</Grid>
</UserControl>