mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
91 lines
5.2 KiB
XML
91 lines
5.2 KiB
XML
<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"
|
|
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
|
|
mc:Ignorable="d"
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
|
|
<Page.Resources>
|
|
<converters:BoolNegationConverter x:Key="BoolNegationConverter"/>
|
|
</Page.Resources>
|
|
|
|
<controls:SettingsPageControl x:Uid="Hosts" IsTabStop="False"
|
|
ModuleImageSource="ms-appx:///Assets/Modules/HostsFileEditor.png">
|
|
<controls:SettingsPageControl.ModuleContent>
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
<controls:Setting x:Uid="Hosts_EnableToggleControl_HeaderText" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
|
|
<controls:Setting.Icon>
|
|
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsHosts.png" ShowAsMonochrome="False" />
|
|
</controls:Setting.Icon>
|
|
<controls:Setting.ActionContent>
|
|
<ToggleSwitch IsOn="{x:Bind ViewModel.IsEnabled, Mode=TwoWay}" x:Uid="ToggleSwitch"/>
|
|
</controls:Setting.ActionContent>
|
|
</controls:Setting>
|
|
|
|
<InfoBar x:Uid="GPO_IsSettingForced"
|
|
Severity="Informational"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
|
|
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" />
|
|
|
|
<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>
|