Files
YouTubeViewers/YouTubeViewers.WPF/Components/YouTubeViewerDetailsForm.xaml
2022-08-22 15:56:12 +02:00

71 lines
3.3 KiB
XML

<UserControl x:Class="YouTubeViewers.WPF.Components.YouTubeViewerDetailsForm"
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:local="clr-namespace:YouTubeViewers.WPF.Components"
xmlns:custom="clr-namespace:LoadingSpinnerControl;assembly=LoadingSpinnerControl"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid Grid.IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" SharedSizeGroup="Label"/>
<ColumnDefinition Width="*" MaxWidth="250"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Username" FontWeight="Bold" />
<TextBox Margin="20 0 0 0"
Grid.Column="1"
Text="{Binding UserName, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
<Grid Grid.Row="1" Margin="0 20 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" SharedSizeGroup="Label"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Is Subscribed?" FontWeight="Bold" />
<CheckBox Margin="20 0 0 0"
Grid.Column="1"
VerticalAlignment="Center"
IsChecked="{Binding IsSubScribed}" />
</Grid>
<Grid Grid.Row="2" Margin="0 20 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" SharedSizeGroup="Label"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Is Member?" FontWeight="Bold" />
<CheckBox Margin="20 0 0 0"
Grid.Column="1"
VerticalAlignment="Center"
IsChecked="{Binding IsMember}" />
</Grid>
</Grid>
<WrapPanel Grid.Row="1" Margin="0 30 0 0">
<Button Margin="0 0 5 0"
Command="{Binding SubmitCommand}"
Content="Submit"
IsEnabled="{Binding CanSubmit}"/>
<Button Margin="0 0 5 0" Command="{Binding CancelCommand}"
Content="Cancel"
Style="{StaticResource ButtonSecondary}"/>
<custom:LoadingSpinner IsLoading="{Binding IsSubmitting}" Diameter="25" Thickness="2"/>
</WrapPanel>
</Grid>
</UserControl>