Two-state flow with go-live dialog, unmissable live indicators, taskbar overlay
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
<Window x:Class="ytLive.GoLiveWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Start Stream" Height="430" Width="520"
|
||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
|
||||
ShowInTaskbar="False" Background="#1a1a2e">
|
||||
|
||||
<Window.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
||||
|
||||
<Style x:Key="GoLiveButton" TargetType="Button">
|
||||
<Setter Property="Background" Value="#e94560"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="Padding" Value="16,8"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="4"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GoLiveButtonSecondary" TargetType="Button" BasedOn="{StaticResource GoLiveButton}">
|
||||
<Setter Property="Background" Value="#16213e"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GoLiveLabel" TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="#a0a0b0"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Margin" Value="0,0,0,4"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GoLiveTextBox" TargetType="TextBox">
|
||||
<Setter Property="Background" Value="#0f3460"/>
|
||||
<Setter Property="Foreground" Value="#e0e0e0"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="8,6"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="CaretBrush" Value="White"/>
|
||||
<Setter Property="Margin" Value="0,0,0,12"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GoLiveCombo" TargetType="ComboBox">
|
||||
<Setter Property="Background" Value="#0f3460"/>
|
||||
<Setter Property="Foreground" Value="#e0e0e0"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="8,6"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="Margin" Value="0,0,0,12"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid Margin="24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Text="Start Stream" FontSize="18" FontWeight="Bold"
|
||||
Foreground="#e0e0e0" Margin="0,0,0,16"/>
|
||||
|
||||
<!-- ACCOUNT -->
|
||||
<StackPanel Grid.Row="1" Margin="0,0,0,16">
|
||||
<TextBlock Text="YOUTUBE ACCOUNT" FontSize="12" FontWeight="SemiBold"
|
||||
Foreground="#a0a0b0" Margin="0,0,0,8"/>
|
||||
|
||||
<!-- Not signed in -->
|
||||
<StackPanel Visibility="{Binding ShowSignIn, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Text="Sign in to connect your channel." Style="{StaticResource GoLiveLabel}"/>
|
||||
<Button Content="Sign In" Command="{Binding SignInCommand}"
|
||||
Style="{StaticResource GoLiveButtonSecondary}" HorizontalAlignment="Left"
|
||||
Padding="20,8" Margin="0,4,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Signed in: saved account as default + change option -->
|
||||
<StackPanel Visibility="{Binding ShowAccount, Converter={StaticResource BoolToVis}}">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
|
||||
<TextBlock Text="{Binding AccountName}" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="#e0e0e0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="(signed in)" Foreground="#7fb069" FontSize="12"
|
||||
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
</StackPanel>
|
||||
<Button Content="Change Account" Command="{Binding ChangeAccountCommand}"
|
||||
Style="{StaticResource GoLiveButtonSecondary}" HorizontalAlignment="Left"
|
||||
Padding="16,6" Margin="0,4,0,0" FontSize="12"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- STREAM METADATA -->
|
||||
<StackPanel Grid.Row="2">
|
||||
<TextBlock Text="STREAM DETAILS" FontSize="12" FontWeight="SemiBold"
|
||||
Foreground="#a0a0b0" Margin="0,0,0,8"/>
|
||||
|
||||
<TextBlock Text="Title" Style="{StaticResource GoLiveLabel}"/>
|
||||
<TextBox Style="{StaticResource GoLiveTextBox}"
|
||||
Text="{Binding StreamTitle, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<TextBlock Text="Description" Style="{StaticResource GoLiveLabel}"/>
|
||||
<TextBox Style="{StaticResource GoLiveTextBox}" Height="60" AcceptsReturn="True"
|
||||
Text="{Binding StreamDescription, UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalScrollBarVisibility="Auto"/>
|
||||
|
||||
<TextBlock Text="Visibility" Style="{StaticResource GoLiveLabel}"/>
|
||||
<ComboBox Style="{StaticResource GoLiveCombo}"
|
||||
ItemsSource="{Binding Visibilities}"
|
||||
SelectedItem="{Binding Visibility}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- ACTIONS -->
|
||||
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="Cancel" Command="{Binding CancelCommand}"
|
||||
Style="{StaticResource GoLiveButtonSecondary}" Margin="0,0,8,0"/>
|
||||
<Button Content="Start Stream" Command="{Binding StartCommand}"
|
||||
Style="{StaticResource GoLiveButton}" MinWidth="110"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user