|
| 1 | +<UserControl |
| 2 | + x:Class="Richasy.Bili.App.Controls.DanmakuSendOptions" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:app="using:Richasy.Bili.Models.Enums.App" |
| 6 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 7 | + xmlns:loc="using:Richasy.Bili.Locator.Uwp" |
| 8 | + xmlns:local="using:Richasy.Bili.App.Controls" |
| 9 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 10 | + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" |
| 11 | + d:DesignHeight="300" |
| 12 | + d:DesignWidth="400" |
| 13 | + mc:Ignorable="d"> |
| 14 | + |
| 15 | + <StackPanel |
| 16 | + Width="240" |
| 17 | + Padding="16,12" |
| 18 | + Spacing="12"> |
| 19 | + <StackPanel Spacing="4"> |
| 20 | + <TextBlock Text="{loc:LocaleLocator Name=FontSize}" /> |
| 21 | + <StackPanel |
| 22 | + HorizontalAlignment="Left" |
| 23 | + Orientation="Horizontal" |
| 24 | + Spacing="16"> |
| 25 | + <RadioButton |
| 26 | + x:Name="StandardItem" |
| 27 | + MinWidth="0" |
| 28 | + Content="{loc:LocaleLocator Name=Standard}" /> |
| 29 | + <RadioButton |
| 30 | + x:Name="SmallItem" |
| 31 | + MinWidth="0" |
| 32 | + Content="{loc:LocaleLocator Name=Small}" /> |
| 33 | + </StackPanel> |
| 34 | + </StackPanel> |
| 35 | + <ComboBox |
| 36 | + x:Name="DanmakuLocationComboBox" |
| 37 | + HorizontalAlignment="Stretch" |
| 38 | + Header="{loc:LocaleLocator Name=Location}" |
| 39 | + ItemsSource="{x:Bind ViewModel.LocationCollection, Mode=OneWay}" |
| 40 | + SelectedItem="{x:Bind ViewModel.Location, Mode=TwoWay}"> |
| 41 | + <ComboBox.ItemTemplate> |
| 42 | + <DataTemplate x:DataType="app:DanmakuLocation"> |
| 43 | + <TextBlock Text="{x:Bind Converter={StaticResource DanmakuLocationConverter}}" /> |
| 44 | + </DataTemplate> |
| 45 | + </ComboBox.ItemTemplate> |
| 46 | + </ComboBox> |
| 47 | + <StackPanel Spacing="12"> |
| 48 | + <TextBlock Text="{loc:LocaleLocator Name=Color}" /> |
| 49 | + <Grid Margin="0,-4,0,0" ColumnSpacing="8"> |
| 50 | + <Grid.ColumnDefinitions> |
| 51 | + <ColumnDefinition Width="*" /> |
| 52 | + <ColumnDefinition Width="Auto" /> |
| 53 | + </Grid.ColumnDefinitions> |
| 54 | + <TextBox |
| 55 | + HorizontalAlignment="Stretch" |
| 56 | + VerticalAlignment="Stretch" |
| 57 | + IsReadOnly="True" |
| 58 | + Text="{x:Bind ViewModel.Color, Mode=OneWay}" /> |
| 59 | + <Rectangle |
| 60 | + Grid.Column="1" |
| 61 | + Width="80" |
| 62 | + Fill="{x:Bind ViewModel.Color, Mode=OneWay, Converter={StaticResource BrushConverter}}" |
| 63 | + RadiusX="4" |
| 64 | + RadiusY="4" /> |
| 65 | + </Grid> |
| 66 | + <muxc:ItemsRepeater HorizontalAlignment="Stretch" ItemsSource="{x:Bind ViewModel.ColorCollection}"> |
| 67 | + <muxc:ItemsRepeater.Layout> |
| 68 | + <muxc:UniformGridLayout |
| 69 | + ItemsStretch="Fill" |
| 70 | + MinColumnSpacing="8" |
| 71 | + MinItemHeight="32" |
| 72 | + MinItemWidth="32" |
| 73 | + MinRowSpacing="8" /> |
| 74 | + </muxc:ItemsRepeater.Layout> |
| 75 | + <muxc:ItemsRepeater.ItemTemplate> |
| 76 | + <DataTemplate> |
| 77 | + <local:CardPanel |
| 78 | + AutomationProperties.Name="{Binding Key}" |
| 79 | + Background="{Binding Value, Converter={StaticResource BrushConverter}}" |
| 80 | + BorderThickness="0" |
| 81 | + Click="OnColorItemClick" |
| 82 | + IsEnableShadow="False" |
| 83 | + PointerOverBackground="{Binding Value, Converter={StaticResource BrushConverter}}" |
| 84 | + PressedBackground="{Binding Value, Converter={StaticResource BrushConverter}}" |
| 85 | + ToolTipService.ToolTip="{Binding Key}" /> |
| 86 | + </DataTemplate> |
| 87 | + </muxc:ItemsRepeater.ItemTemplate> |
| 88 | + </muxc:ItemsRepeater> |
| 89 | + </StackPanel> |
| 90 | + </StackPanel> |
| 91 | +</UserControl> |
0 commit comments