2022-10-13 13:05:43 +02:00
|
|
|
<Page
|
|
|
|
|
x:Class="Microsoft.PowerToys.Settings.UI.Views.HostsPage"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Views"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
|
|
|
|
|
|
|
|
<controls:SettingsPageControl x:Uid="Hosts" IsTabStop="False"
|
|
|
|
|
ModuleImageSource="ms-appx:///Assets/Modules/AlwaysOnTop.png">
|
|
|
|
|
<controls:SettingsPageControl.ModuleContent>
|
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
|
|
|
|
|
|
<controls:Setting x:Uid="Hosts_EnableToggleControl_HeaderText">
|
|
|
|
|
<controls:Setting.Icon>
|
2022-10-14 14:10:44 +02:00
|
|
|
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsHosts.png" ShowAsMonochrome="False" />
|
2022-10-13 13:05:43 +02:00
|
|
|
</controls:Setting.Icon>
|
|
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
|
<ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" x:Uid="ToggleSwitch"/>
|
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
|
</controls:Setting>
|
|
|
|
|
|
|
|
|
|
<controls:SettingsGroup x:Uid="Hosts_Activation_GroupSettings"
|
|
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
|
|
|
|
<Button x:Uid="Hosts_LaunchButton_Accessible"
|
|
|
|
|
Style="{StaticResource SettingButtonStyle}"
|
|
|
|
|
Command="{x:Bind ViewModel.LaunchEventHandler}">
|
|
|
|
|
<controls:Setting x:Uid="Hosts_LaunchButtonControl"
|
|
|
|
|
Style="{StaticResource ExpanderHeaderSettingStyle}"
|
|
|
|
|
Icon="">
|
|
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
|
<FontIcon Glyph=""
|
|
|
|
|
FontSize="18"
|
|
|
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}" />
|
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
|
</controls:Setting>
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
<controls:Setting x:Uid="Hosts_Toggle_LaunchAdministrator"
|
|
|
|
|
Icon=""
|
|
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.LaunchAdministratorEnabled}">
|
|
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.LaunchAdministrator}" />
|
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
|
</controls:Setting>
|
|
|
|
|
|
|
|
|
|
<controls:Setting x:Uid="Hosts_Toggle_ShowStartupWarning"
|
|
|
|
|
Icon=""
|
|
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
|
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.ShowStartupWarning}" />
|
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
|
</controls:Setting>
|
|
|
|
|
</controls:SettingsGroup>
|
|
|
|
|
|
|
|
|
|
<controls:SettingsGroup x:Uid="Hosts_File_GroupSettings"
|
|
|
|
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
|
|
|
|
<controls:Setting x:Uid="Hosts_AdditionalLinesPosition" Icon="" >
|
|
|
|
|
<controls:Setting.ActionContent>
|
|
|
|
|
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}"
|
|
|
|
|
SelectedIndex="{x:Bind Path=ViewModel.AdditionalLinesPosition, Mode=TwoWay}" >
|
|
|
|
|
<ComboBoxItem x:Uid="Hosts_AdditionalLinesPosition_Top" />
|
|
|
|
|
<ComboBoxItem x:Uid="Hosts_AdditionalLinesPosition_Bottom" />
|
|
|
|
|
</ComboBox>
|
|
|
|
|
</controls:Setting.ActionContent>
|
|
|
|
|
</controls:Setting>
|
|
|
|
|
</controls:SettingsGroup>
|
|
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</controls:SettingsPageControl.ModuleContent>
|
|
|
|
|
|
|
|
|
|
<controls:SettingsPageControl.PrimaryLinks>
|
|
|
|
|
<controls:PageLink x:Uid="LearnMore_Hosts" Link="https://aka.ms/PowerToysOverview_HostsFileEditor"/>
|
|
|
|
|
</controls:SettingsPageControl.PrimaryLinks>
|
|
|
|
|
</controls:SettingsPageControl>
|
|
|
|
|
</Page>
|