66 lines
3.2 KiB
XML
66 lines
3.2 KiB
XML
<Page
|
|
x:Class="HueUWP.Views.SettingsView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:HueUWP.Views"
|
|
xmlns:convert="using:HueUWP.Helpers"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
<!--DataContext="{Binding SettingsViewModel, RelativeSource={RelativeSource Self}}"-->
|
|
|
|
<Page.Resources>
|
|
<convert:NullableBooleanConverter x:Key="BoolConverter"/>
|
|
</Page.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<RelativePanel Grid.Row="0">
|
|
<TextBlock RelativePanel.AlignLeftWithPanel="True" FontSize="24" Margin="20,10,0,0">Settings</TextBlock>
|
|
</RelativePanel>
|
|
|
|
<RelativePanel Grid.Row="1">
|
|
<ScrollViewer RelativePanel.AlignBottomWithPanel="True" RelativePanel.AlignTopWithPanel="True">
|
|
<StackPanel>
|
|
|
|
<StackPanel Margin="20, 10, 20, 0">
|
|
<TextBlock FontSize="16">Automatic Refreshing</TextBlock>
|
|
<ToggleSwitch Margin="0,10,0,10" IsOn="{x:Bind SettingsViewModel.AUTOREFRESH, Mode=TwoWay, Converter={StaticResource BoolConverter}}">
|
|
<ToggleSwitch.OffContent>Off</ToggleSwitch.OffContent>
|
|
<ToggleSwitch.OnContent>On</ToggleSwitch.OnContent>
|
|
</ToggleSwitch>
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="20, 10, 20, 0">
|
|
<TextBlock FontSize="16">Server IP</TextBlock>
|
|
<TextBox Margin="0,10,0,10" Text="{x:Bind SettingsViewModel.IP, Mode=TwoWay}" PlaceholderText="145.48.205.190"/>
|
|
</StackPanel>
|
|
<StackPanel Margin="20, 10, 20, 0">
|
|
<TextBlock FontSize="16">Server Port</TextBlock>
|
|
<TextBox Margin="0,10,0,10" Text="{x:Bind SettingsViewModel.PORT, Mode=TwoWay}" PlaceholderText="80" />
|
|
</StackPanel>
|
|
<StackPanel Margin="20, 10, 20, 0">
|
|
<TextBlock FontSize="16">User ID</TextBlock>
|
|
<TextBox Name="IDBox" Margin="0,10,0,10" Text="{x:Bind SettingsViewModel.ID, Mode=OneWay}" IsEnabled="False"/>
|
|
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
|
|
<Button Click="UpdateID_Click">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock FontFamily="Segoe MDL2 Assets" FontSize="15" Margin="5, 9, 5, 5" Text="" />
|
|
<TextBlock FontSize="15" Margin="5" Text="Request new" />
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<ProgressRing Height="35" Width="35" Margin="20, 0, 0, 0" IsActive="False" Name="UserIdProgress" />
|
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</RelativePanel>
|
|
</Grid>
|
|
</Page>
|