-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingsPage.xaml
134 lines (127 loc) · 7.76 KB
/
SettingsPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<Page
x:Class="RadioParadisePlayer.SettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RadioParadisePlayer"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:localHelpers="using:RadioParadisePlayer.Helpers"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<localHelpers:InvertedBoolConverter x:Key="InvertedBoolConverterKey" />
</Page.Resources>
<StackPanel Orientation="Vertical" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel.BackgroundTransition>
<BrushTransition />
</StackPanel.BackgroundTransition>
<TextBlock Text="Settings" Padding="8, 8, 32, 8" Style="{ThemeResource TitleTextBlockStyle}" />
<Grid ColumnDefinitions="*,380" Padding="32,32,32,32" HorizontalAlignment="Stretch" ColumnSpacing="32">
<StackPanel Orientation="Vertical" Grid.Column="0" HorizontalAlignment="Stretch">
<Grid HorizontalAlignment="Stretch" Height="48"
ColumnDefinitions="*,Auto"
Background="{ThemeResource ExpanderHeaderBackground}"
BorderBrush="{ThemeResource ExpanderHeaderBorderBrush}"
BorderThickness="{ThemeResource ExpanderHeaderBorderThickness}"
CornerRadius="{ThemeResource HyperlinkFocusRectCornerRadius}"
Padding="{ThemeResource ExpanderHeaderPadding}">
<StackPanel Orientation="Horizontal" Grid.Column="0" >
<FontIcon Glyph="" Margin="0,0,16,0" />
<TextBlock Text="Start music immediately" VerticalAlignment="Center"/>
</StackPanel>
<ToggleSwitch x:Name="tsAutoPlay" HorizontalAlignment="Right" Grid.Column="1" FlowDirection="RightToLeft" Margin="0,0,16,0"
IsOn="{x:Bind vmSettings.AutoPlay, Mode=TwoWay}"/>
</Grid>
<Grid HorizontalAlignment="Stretch" Height="48"
ColumnDefinitions="*,Auto"
Background="{ThemeResource ExpanderHeaderBackground}"
BorderBrush="{ThemeResource ExpanderHeaderBorderBrush}"
BorderThickness="{ThemeResource ExpanderHeaderBorderThickness}"
CornerRadius="{ThemeResource HyperlinkFocusRectCornerRadius}"
Padding="{ThemeResource ExpanderHeaderPadding}">
<StackPanel Orientation="Horizontal" Grid.Column="0" >
<FontIcon Glyph="" Margin="0,0,16,0" />
<TextBlock Text="Slideshow" VerticalAlignment="Center"/>
</StackPanel>
<ToggleSwitch x:Name="tsSlideshow" HorizontalAlignment="Right" Grid.Column="1" FlowDirection="RightToLeft" Margin="0,0,16,0"
IsOn="{x:Bind vmSettings.Player.SlideshowEnabled, Mode=TwoWay}"/>
</Grid>
<Expander HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<FontIcon Glyph="" Margin="0,0,16,0"/>
<TextBlock Text="Stream quality" />
</StackPanel>
</Expander.Header>
<Expander.Content>
<Grid HorizontalAlignment="Stretch">
<RadioButtons x:Name="rbBitRate" SelectionChanged="rbBitRate_SelectionChanged"
IsEnabled="{x:Bind vmSettings.Player.IsLoading, Mode=OneWay, Converter={StaticResource InvertedBoolConverterKey}}">
<x:String>Lowest (least data traffic)</x:String>
<x:String>Low</x:String>
<x:String>Good</x:String>
<x:String>High</x:String>
<x:String>Best (highest data traffic)</x:String>
</RadioButtons>
<ProgressRing x:Name="progressRingChangingBitRate"
IsActive="{x:Bind vmSettings.Player.IsLoading, Mode=OneWay}"
HorizontalAlignment="Center"/>
</Grid>
</Expander.Content>
</Expander>
<Expander HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<FontIcon Glyph="" Margin="0,0,16,0"/>
<TextBlock Text="Channel" />
</StackPanel>
</Expander.Header>
<Expander.Content>
<Grid HorizontalAlignment="Stretch">
<ProgressRing x:Name="progressRingChannel" IsActive="{x:Bind vmSettings.IsLoading, Mode=OneWay}" />
<RadioButtons x:Name="rbChannel" SelectionChanged="rbChannel_SelectionChanged"
ItemsSource="{x:Bind vmSettings.ChannelsList, Mode=OneWay}"
IsEnabled="{x:Bind vmSettings.Player.IsLoading, Mode=OneWay, Converter={StaticResource InvertedBoolConverterKey}}"/>
<!--SelectedIndex="{x:Bind vmSettings.SelectedChannel, Mode=TwoWay}"/>-->
<ProgressRing x:Name="progressRingChangingChannel"
IsActive="{x:Bind vmSettings.Player.IsLoading, Mode=OneWay}"
HorizontalAlignment="Center" />
</Grid>
</Expander.Content>
</Expander>
<Expander HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<FontIcon Glyph="" Margin="0,0,16,0"/>
<TextBlock Text="Application theme" />
</StackPanel>
</Expander.Header>
<Expander.Content>
<Grid HorizontalAlignment="Stretch">
<RadioButtons x:Name="rbAppTheme" SelectionChanged="rbAppTheme_SelectionChanged">
<x:String>Default</x:String>
<x:String>Light</x:String>
<x:String>Dark</x:String>
</RadioButtons>
</Grid>
</Expander.Content>
</Expander>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="1" HorizontalAlignment="Stretch">
<TextBlock Text="About" Style="{ThemeResource SubtitleTextBlockStyle}" Padding="0, 0, 0, 16" />
<TextBlock>
Radio Paradise Player for Windows 11
<LineBreak />
version 1.0
<LineBreak />
© 2022 Nikolay Pavlov
<LineBreak />
</TextBlock>
<TextBlock >
<Hyperlink NavigateUri="https://radioparadise.com/">https://www.radioparadise.com/</Hyperlink>
<LineBreak />
</TextBlock>
</StackPanel>
</Grid>
</StackPanel>
</Page>