master
xaml 76 lines 6.53 KB
Raw
1 <Page
2 x:Class="WslSettings.Views.Settings.DeveloperPage"
3 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5 xmlns:ctControls="using:CommunityToolkit.WinUI.Controls"
6 xmlns:behaviors="using:WslSettings.Behaviors"
7 xmlns:controls="using:WslSettings.Controls"
8 behaviors:NavigationViewHeaderBehavior.HeaderMode="Never">
9
10 <Grid Margin="{ThemeResource ContentPageMargin}"
11 IsTabStop="True"
12 AutomationProperties.LandmarkType="Main"
13 x:Name="DeveloperPageRoot">
14 <Grid.RowDefinitions>
15 <RowDefinition Height="Auto" />
16 <RowDefinition Height="Auto" />
17 <RowDefinition Height="*" />
18 </Grid.RowDefinitions>
19 <TextBlock x:Uid="Settings_DeveloperPageTitle" Style="{ThemeResource PageHeaderTextBlockStyle}" Margin="{StaticResource MediumSmallBottomMargin}" HorizontalAlignment="Left" AutomationProperties.HeadingLevel="Level1"/>
20 <TextBlock x:Uid="Settings_ErrorTryAgainLater" x:Name="Settings_ErrorTryAgainLater" Grid.Row="1" HorizontalAlignment="Left" AutomationProperties.LiveSetting="Assertive"
21 Visibility="{x:Bind ViewModel.ErrorVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BooleanToVisibilityConverter}}"/>
22 <ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto"
23 Visibility="{x:Bind ViewModel.SettingsContentVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BooleanToVisibilityConverter}}">
24 <StackPanel Spacing="{StaticResource SettingsCardSpacing}">
25 <ctControls:SettingsCard x:Uid="Settings_DebugConsole">
26 <ToggleSwitch x:Uid="Settings_DebugConsoleToggleSwitch" HorizontalAlignment="Right" MinWidth="0" IsOn="{x:Bind ViewModel.IsOnDebugConsole, Mode=TwoWay}"/>
27 </ctControls:SettingsCard>
28 <ctControls:SettingsCard x:Uid="Settings_HWPerfCounters">
29 <ToggleSwitch x:Uid="Settings_HWPerfCountersToggleSwitch" HorizontalAlignment="Right" MinWidth="0" IsOn="{x:Bind ViewModel.IsOnHWPerfCounters, Mode=TwoWay}"/>
30 </ctControls:SettingsCard>
31 <ctControls:SettingsExpander x:Name="CustomKernelPathExpander" x:Uid="Settings_CustomKernelPath">
32 <TextBlock Style="{StaticResource TextBlockFilePathStyle}" Text="{x:Bind ViewModel.CustomKernelPath, Mode=OneWay}"/>
33 <ctControls:SettingsExpander.Items>
34 <ctControls:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left" Margin="{StaticResource SettingsExpanderItemMargin}">
35 <StackPanel Orientation="Horizontal">
36 <TextBox x:Name="CustomKernelPathTextBox" x:Uid="Settings_CustomKernelPathTextBox" Style="{StaticResource TextBoxFilePathStyle}" Margin="{StaticResource InputControlSpacingMargin}"
37 Text="{x:Bind ViewModel.CustomKernelPath, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"/>
38 <Button x:Uid="Settings_CustomKernelPathBrowseButton" Style="{StaticResource ButtonSettingStyle}" Margin="{StaticResource InputControlSpacingMargin}"
39 Click="CustomKernelPath_Click"/>
40 </StackPanel>
41 </ctControls:SettingsCard>
42 </ctControls:SettingsExpander.Items>
43 </ctControls:SettingsExpander>
44 <ctControls:SettingsExpander x:Name="CustomKernelModulesPathExpander" x:Uid="Settings_CustomKernelModulesPath">
45 <TextBlock Style="{StaticResource TextBlockFilePathStyle}" Text="{x:Bind ViewModel.CustomKernelModulesPath, Mode=OneWay}"/>
46 <ctControls:SettingsExpander.Items>
47 <ctControls:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left" Margin="{StaticResource SettingsExpanderItemMargin}">
48 <StackPanel Orientation="Horizontal">
49 <TextBox x:Name="CustomKernelModulesPathTextBox" x:Uid="Settings_CustomKernelModulesPathTextBox" Style="{StaticResource TextBoxFilePathStyle}" Margin="{StaticResource InputControlSpacingMargin}"
50 Text="{x:Bind ViewModel.CustomKernelModulesPath, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"/>
51 <Button x:Uid="Settings_CustomKernelModulesPathBrowseButton" Style="{StaticResource ButtonSettingStyle}" Margin="{StaticResource InputControlSpacingMargin}"
52 Click="CustomKernelModulesPath_Click"/>
53 </StackPanel>
54 </ctControls:SettingsCard>
55 </ctControls:SettingsExpander.Items>
56 </ctControls:SettingsExpander>
57 <ctControls:SettingsExpander x:Name="CustomSystemDistroPathExpander" x:Uid="Settings_CustomSystemDistroPath">
58 <ctControls:SettingsExpander.Description>
59 <controls:HyperlinkTextBlock x:Uid="Settings_CustomSystemDistroPathDescription"/>
60 </ctControls:SettingsExpander.Description>
61 <TextBlock Style="{StaticResource TextBlockFilePathStyle}" Text="{x:Bind ViewModel.CustomSystemDistroPath, Mode=OneWay}"/>
62 <ctControls:SettingsExpander.Items>
63 <ctControls:SettingsCard HorizontalContentAlignment="Left" ContentAlignment="Left" Margin="{StaticResource SettingsExpanderItemMargin}">
64 <StackPanel Orientation="Horizontal">
65 <TextBox x:Name="CustomSystemDistroPathTextBox" x:Uid="Settings_CustomSystemDistroPathTextBox" Style="{StaticResource TextBoxFilePathStyle}" Margin="{StaticResource InputControlSpacingMargin}"
66 Text="{x:Bind ViewModel.CustomSystemDistroPath, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"/>
67 <Button x:Uid="Settings_CustomSystemDistroPathBrowseButton" Style="{StaticResource ButtonSettingStyle}" Margin="{StaticResource InputControlSpacingMargin}"
68 Click="CustomSystemDistroPath_Click"/>
69 </StackPanel>
70 </ctControls:SettingsCard>
71 </ctControls:SettingsExpander.Items>
72 </ctControls:SettingsExpander>
73 </StackPanel>
74 </ScrollViewer>
75 </Grid>
76 </Page>