mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-10-08 11:39:10 +11:00
* Rework the Win11 Creator tab into a three step wizard - Turn the stacked sections into pages you can navigate between - Move the edition picker and driver option to the modify step - Show a working page while mounting and modifying run - Show what the run changes and a finished panel with the output path - Put the status log in its own card next to the steps - Rename Clean & Reset to Start Over and move it below the actions * Follow the existing colours on the Win11 Creator tab - Take button text and icon colour from the button they sit in - Stop the implicit TextBlock style painting a label background on buttons - Colour step headers from the tab item state - Use the label accent for headings and field labels like the other tabs * Cut repeated markup on the Win11 Creator tab - Render button icon and label from a ContentTemplate, glyph goes in Tag - Render the step header from a HeaderTemplate the same way - Move the page scroll wrapper into the tab control template - Derive the text styles from one another instead of repeating setters * fix: tidy the dropdown and stop the spinner stuttering - combo box items painted their own background while the popup painted another, so the list read as loose labels on a mismatched sheet; items are transparent now and the popup carries the colour - stretch the item presenter so a highlight spans the popup instead of just the text, and bind the popup width to the closed box - cache the working page's spinner: it animates a rotation on a TextBlock, which re-rasterises the glyph every frame on the interface thread - run that animation only while the page is visible; it was started on Loaded and never stopped, so it kept spinning after the step was done * Stop the Win11 Creator status log rendering justified The shared TextBox style sets HorizontalContentAlignment to Stretch, which WPF reads as TextAlignment.Justify. Every other box in WinUtil is single line, so the status log is the only place it shows, and there it stretched each wrapped line to the full width with gaps between the words. Left-aligns it, and while the log is being read as a log rather than as prose: monospace from a new Win11LogFontFamily theme key so the timestamps form a column and a wrapped line is visibly not a new entry, and no effect, since the shared style's drop shadow has neither border nor background to sit under on this control and smeared the glyphs instead. * Show the working page for export, USB write and Start Over Only mount and modify moved to the working page. Saving an ISO, writing a USB drive and Start Over all ran with the finished output page still on screen, so the three longest operations in the tab were the ones that looked like nothing was happening. All three now open the working page for their duration and return to the page they belong on: the output step for the two that produce media, the ISO picker for Start Over, which has just deleted the working directory. Failures leave the working page before their message box rather than putting a modal over a spinner, and a finally guard covers cancellation, which skips catch. Start Over spins the icon backwards. Its work undoes rather than produces, and reading that off the animation is quicker than reading the label. * cut comments Leaves the four that answer a "why is it written this way" a reader cannot get from the code: the shared TextBox style's justify and drop shadow, the spinner tag being set before the page is shown, going back to Select rather than Modify after a failed modification, and the finally guards existing for cancellation rather than for failure. * cut changes that only reword Reverts three edits that changed wording without changing meaning, and drops the comment on the failed-modification branch. * cut comments that narrate the code * address coderabbit review Hyphenate three-step, and let the chevrons grow past their minimum instead of pinning a size the glyph could outgrow. * dismount a replaced ISO and name the USB disk when done Picking a second ISO after verifying one left the first attached: the mount job clears Win11ISOImagePath, which is the only handle cleanup has to it. Dismount it in the job, off the interface thread, before that reset. The done panel now names the disk it wrote, the way the ISO branch names its file. * keep the wizard inside the card at the minimum window width The step column and the chevron grid's middle column were both pinned at 620, while the left card is about 485px at the 800px minimum. The pages do not scroll sideways, so controls past the card edge were unreachable. Both are now capped rather than fixed, and the removed WPFWin11ISOArchLabel was never assigned by anything. * stop a replacement mount when the old ISO will not dismount The warn-and-continue path cleared Win11ISOImagePath anyway, which strands the old mount for the rest of the session - the leak the dismount was added to close. It now reports and throws instead, from inside the try so the finally still re-enables the browse and mount buttons. * cut comments that narrate the code * drop the OneDrive sync claim from the modify step list The post-install script sets DisableFileSyncNGSC=1, but it is prepended to FirstLogon.ps1, whose own body then sets the same value back to 0. The policy never survives, so the bullet was promising something the run does not do. Replaced with search box suggestions, which it does do.
2264 lines
155 KiB
XML
2264 lines
155 KiB
XML
<Window
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:WinUtility"
|
|
WindowStartupLocation="CenterScreen"
|
|
UseLayoutRounding="True"
|
|
WindowStyle="SingleBorderWindow"
|
|
Width="Auto"
|
|
Height="Auto"
|
|
MinWidth="800"
|
|
MinHeight="600"
|
|
Title="WinUtil">
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome CaptionHeight="0" CornerRadius="10" UseAeroCaptionButtons="False"/>
|
|
</WindowChrome.WindowChrome>
|
|
<Window.Resources>
|
|
<Style TargetType="ToolTip">
|
|
<Setter Property="Background" Value="{DynamicResource ToolTipBackgroundColor}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
|
<Setter Property="MaxWidth" Value="{DynamicResource ToolTipWidth}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="2"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<!-- This ContentTemplate ensures that the content of the ToolTip wraps text properly for better readability -->
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<ContentPresenter Content="{TemplateBinding Content}">
|
|
<ContentPresenter.Resources>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
</Style>
|
|
</ContentPresenter.Resources>
|
|
</ContentPresenter>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type MenuItem}">
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Padding" Value="5,2,5,2"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
</Style>
|
|
|
|
<!--Scrollbar Thumbs-->
|
|
<Style x:Key="ScrollThumbs" TargetType="{x:Type Thumb}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Grid Name="Grid">
|
|
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="Transparent" />
|
|
<Border Name="Rectangle1" CornerRadius="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Background="{TemplateBinding Background}" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="Tag" Value="Horizontal">
|
|
<Setter TargetName="Rectangle1" Property="Width" Value="Auto" />
|
|
<Setter TargetName="Rectangle1" Property="Height" Value="7" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="TextBlock" x:Key="HoverTextBlockStyle">
|
|
<Setter Property="Foreground" Value="{DynamicResource LinkForegroundColor}" />
|
|
<Setter Property="TextDecorations" Value="Underline" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource LinkHoverForegroundColor}" />
|
|
<Setter Property="TextDecorations" Value="Underline" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style x:Key="AppEntryBorderStyle" TargetType="Border">
|
|
<Setter Property="BorderBrush" Value="Gray"/>
|
|
<Setter Property="BorderThickness" Value="{DynamicResource AppEntryBorderThickness}"/>
|
|
<Setter Property="CornerRadius" Value="5"/>
|
|
<Setter Property="Padding" Value="6,4"/>
|
|
<Setter Property="Width" Value="{DynamicResource AppEntryWidth}"/>
|
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
|
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Background" Value="{DynamicResource AppInstallUnselectedColor}"/>
|
|
</Style>
|
|
<Style x:Key="AppEntryCheckboxStyle" TargetType="CheckBox">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<ContentPresenter Content="{TemplateBinding Content}"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Left"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="AppEntryNameStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="{DynamicResource AppEntryFontSize}"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
</Style>
|
|
<Style x:Key="AppEntryButtonStyle" TargetType="Button">
|
|
<Setter Property="Width" Value="{DynamicResource IconButtonSize}"/>
|
|
<Setter Property="Height" Value="{DynamicResource IconButtonSize}"/>
|
|
<Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="{DynamicResource IconFontSize}"
|
|
Background="Transparent"/>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Name="BackgroundBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{DynamicResource ButtonBorderThickness}"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundPressedColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
|
<Setter Property="Foreground" Value="DimGray"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
<Style TargetType="Button" x:Key="HoverButtonStyle">
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}" />
|
|
<Setter Property="TextElement.FontFamily" Value="{DynamicResource ButtonFontFamily}"/>
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!--ScrollBars-->
|
|
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="false" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ScrollBarBackgroundColor}" />
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}" />
|
|
<Setter Property="Width" Value="6" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
|
<Grid Name="GridRoot" Width="7" Background="{TemplateBinding Background}" >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="0.00001*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Track Name="PART_Track" Grid.Row="0" IsDirectionReversed="true" Focusable="false">
|
|
<Track.Thumb>
|
|
<Thumb Name="Thumb" Background="{TemplateBinding Foreground}" Style="{DynamicResource ScrollThumbs}" />
|
|
</Track.Thumb>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Name="PageUp" Command="ScrollBar.PageDownCommand" Opacity="0" Focusable="false" />
|
|
</Track.IncreaseRepeatButton>
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Name="PageDown" Command="ScrollBar.PageUpCommand" Opacity="0" Focusable="false" />
|
|
</Track.DecreaseRepeatButton>
|
|
</Track>
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger SourceName="Thumb" Property="IsMouseOver" Value="true">
|
|
<Setter Value="{DynamicResource ScrollBarHoverColor}" TargetName="Thumb" Property="Background" />
|
|
</Trigger>
|
|
<Trigger SourceName="Thumb" Property="IsDragging" Value="true">
|
|
<Setter Value="{DynamicResource ScrollBarDraggingColor}" TargetName="Thumb" Property="Background" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Thumb" Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="Orientation" Value="Horizontal">
|
|
<Setter TargetName="GridRoot" Property="LayoutTransform">
|
|
<Setter.Value>
|
|
<RotateTransform Angle="-90" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter TargetName="PART_Track" Property="LayoutTransform">
|
|
<Setter.Value>
|
|
<RotateTransform Angle="-90" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Width" Value="Auto" />
|
|
<Setter Property="Height" Value="8" />
|
|
<Setter TargetName="Thumb" Property="Tag" Value="Horizontal" />
|
|
<Setter TargetName="PageDown" Property="Command" Value="ScrollBar.PageLeftCommand" />
|
|
<Setter TargetName="PageUp" Property="Command" Value="ScrollBar.PageRightCommand" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ComboBoxToggleButtonStyle" TargetType="ToggleButton">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border Background="{TemplateBinding Background}" BorderThickness="0">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="ComboBox">
|
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundColor}" />
|
|
<Setter Property="Background" Value="{DynamicResource ComboBoxBackgroundColor}" />
|
|
<Setter Property="MinWidth" Value="{DynamicResource ButtonWidth}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBox">
|
|
<Grid>
|
|
<Border Name="OuterBorder"
|
|
BorderBrush="{DynamicResource BorderColor}"
|
|
BorderThickness="1"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}"
|
|
Background="{TemplateBinding Background}">
|
|
<ToggleButton Name="ToggleButton"
|
|
Style="{StaticResource ComboBoxToggleButtonStyle}"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
ClickMode="Press">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0"
|
|
Text="{TemplateBinding SelectionBoxItem}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
Background="Transparent"
|
|
HorizontalAlignment="Left" VerticalAlignment="Center"
|
|
Margin="6,3,2,3"/>
|
|
<Path Grid.Column="1"
|
|
Data="M 0,0 L 8,0 L 4,5 Z"
|
|
Fill="{TemplateBinding Foreground}"
|
|
Width="8" Height="5"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Stretch="Uniform"
|
|
Margin="4,0,6,0"/>
|
|
</Grid>
|
|
</ToggleButton>
|
|
</Border>
|
|
<Popup Name="Popup"
|
|
IsOpen="{TemplateBinding IsDropDownOpen}"
|
|
Placement="Bottom"
|
|
Focusable="False"
|
|
AllowsTransparency="True"
|
|
PopupAnimation="Slide">
|
|
<Border Name="DropDownBorder"
|
|
MinWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{DynamicResource BorderColor}"
|
|
BorderThickness="1"
|
|
CornerRadius="4">
|
|
<ScrollViewer>
|
|
<!-- Stretched, so an item's highlight spans the popup rather than just its text -->
|
|
<ItemsPresenter HorizontalAlignment="Stretch" Margin="4,2"/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="ComboBoxItem">
|
|
<!-- Transparent rather than its own colour: the item used to paint one background and
|
|
the popup another, which read as a stack of labels on a mismatched sheet -->
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundColor}"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="Padding" Value="6,3"/>
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}" Background="Transparent"
|
|
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ComboBoxItem}}"/>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style TargetType="Label">
|
|
<Setter Property="Foreground" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource LabelBackgroundColor}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
</Style>
|
|
|
|
<!-- TextBlock template -->
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource LabelBackgroundColor}"/>
|
|
</Style>
|
|
<Style x:Key="TabToggleButton" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Margin" Value="{DynamicResource ButtonMargin}"/>
|
|
<Setter Property="Content" Value=""/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border Name="ButtonGlow"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{DynamicResource ButtonForegroundColor}"
|
|
BorderThickness="{DynamicResource ButtonBorderThickness}"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
|
<Border Name="BackgroundBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{DynamicResource ButtonBackgroundColor}"
|
|
BorderThickness="{DynamicResource ButtonBorderThickness}"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
|
<ContentPresenter
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="10,2,10,2"/>
|
|
</Border>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect Opacity="1" ShadowDepth="5" Color="{DynamicResource CButtonBackgroundMouseoverColor}" Direction="-100" BlurRadius="15"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Panel.ZIndex" Value="2000"/>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter Property="BorderBrush" Value="Pink"/>
|
|
<Setter Property="BorderThickness" Value="2"/>
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect Opacity="1" ShadowDepth="2" Color="{DynamicResource CButtonBackgroundMouseoverColor}" Direction="-111" BlurRadius="10"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="False">
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<!-- Button Template -->
|
|
<Style TargetType="Button">
|
|
<Setter Property="Margin" Value="{DynamicResource ButtonMargin}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/>
|
|
<Setter Property="Height" Value="{DynamicResource ButtonHeight}"/>
|
|
<Setter Property="Width" Value="{DynamicResource ButtonWidth}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Name="BackgroundBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{DynamicResource ButtonBorderThickness}"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,2,10,2"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundPressedColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
|
<Setter Property="Foreground" Value="DimGray"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ToggleButtonStyle" TargetType="ToggleButton">
|
|
<Setter Property="Margin" Value="{DynamicResource ButtonMargin}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/>
|
|
<Setter Property="Height" Value="{DynamicResource ButtonHeight}"/>
|
|
<Setter Property="Width" Value="{DynamicResource ButtonWidth}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border Name="BackgroundBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{DynamicResource ButtonBorderThickness}"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
|
<Grid>
|
|
<!-- Toggle Dot Background -->
|
|
<Ellipse Width="8" Height="16"
|
|
Fill="{DynamicResource ToggleButtonOnColor}"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Margin="0,3,5,0" />
|
|
|
|
<!-- Toggle Dot with hover grow effect -->
|
|
<Ellipse Name="ToggleDot"
|
|
Width="8" Height="8"
|
|
Fill="{DynamicResource ButtonForegroundColor}"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Margin="0,3,5,0"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<Ellipse.RenderTransform>
|
|
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
|
</Ellipse.RenderTransform>
|
|
</Ellipse>
|
|
|
|
<!-- Content Presenter -->
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Margin="10,2,10,2"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Triggers for ToggleButton states -->
|
|
<ControlTemplate.Triggers>
|
|
<!-- Hover effect -->
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<!-- Animation to grow the dot when hovered -->
|
|
<DoubleAnimation Storyboard.TargetName="ToggleDot"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
|
To="1.2" Duration="0:0:0.1"/>
|
|
<DoubleAnimation Storyboard.TargetName="ToggleDot"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
|
To="1.2" Duration="0:0:0.1"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<!-- Animation to shrink the dot back to original size when not hovered -->
|
|
<DoubleAnimation Storyboard.TargetName="ToggleDot"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
|
To="1.0" Duration="0:0:0.1"/>
|
|
<DoubleAnimation Storyboard.TargetName="ToggleDot"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
|
To="1.0" Duration="0:0:0.1"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
</Trigger>
|
|
|
|
<!-- IsChecked state -->
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="ToggleDot" Property="VerticalAlignment" Value="Bottom"/>
|
|
<Setter TargetName="ToggleDot" Property="Margin" Value="0,0,5,3"/>
|
|
</Trigger>
|
|
|
|
<!-- IsEnabled state -->
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
|
<Setter Property="Foreground" Value="DimGray"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="SearchBarClearButtonStyle" TargetType="Button">
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource SearchBarClearButtonFontSize}"/>
|
|
<Setter Property="Content" Value="X"/>
|
|
<Setter Property="Height" Value="{DynamicResource SearchBarClearButtonFontSize}"/>
|
|
<Setter Property="Width" Value="{DynamicResource SearchBarClearButtonFontSize}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Foreground" Value="Red"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="10"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<!-- Checkbox template -->
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="TextElement.FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<Grid Background="{TemplateBinding Background}" Margin="{DynamicResource CheckBoxMargin}">
|
|
<BulletDecorator Background="Transparent">
|
|
<BulletDecorator.Bullet>
|
|
<Grid Width="{DynamicResource CheckBoxBulletDecoratorSize}" Height="{DynamicResource CheckBoxBulletDecoratorSize}">
|
|
<Border Name="Border"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
Background="{DynamicResource ButtonBackgroundColor}"
|
|
BorderThickness="1"
|
|
Width="{DynamicResource CheckBoxBulletDecoratorSize *0.85}"
|
|
Height="{DynamicResource CheckBoxBulletDecoratorSize *0.85}"
|
|
Margin="1"
|
|
SnapsToDevicePixels="True"/>
|
|
<Viewbox Name="CheckMarkContainer"
|
|
Width="{DynamicResource CheckBoxBulletDecoratorSize}"
|
|
Height="{DynamicResource CheckBoxBulletDecoratorSize}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Visibility="Collapsed">
|
|
<Path Name="CheckMark"
|
|
Stroke="{DynamicResource ToggleButtonOnColor}"
|
|
StrokeThickness="1.5"
|
|
Data="M 0 5 L 5 10 L 12 0"
|
|
Stretch="Uniform"/>
|
|
</Viewbox>
|
|
</Grid>
|
|
</BulletDecorator.Bullet>
|
|
<ContentPresenter Margin="4,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
RecognizesAccessKey="True"/>
|
|
</BulletDecorator>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="CheckMarkContainer" Property="Visibility" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<!--Setter TargetName="Border" Property="Background" Value="{DynamicResource ButtonBackgroundPressedColor}"/-->
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonBackgroundPressedColor}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="RadioButton">
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<StackPanel Orientation="Horizontal" Margin="{DynamicResource CheckBoxMargin}">
|
|
<Viewbox Width="{DynamicResource CheckBoxBulletDecoratorSize}" Height="{DynamicResource CheckBoxBulletDecoratorSize}">
|
|
<Grid Width="14" Height="14">
|
|
<Ellipse Name="OuterCircle"
|
|
Stroke="{DynamicResource ToggleButtonOffColor}"
|
|
Fill="{DynamicResource ButtonBackgroundColor}"
|
|
StrokeThickness="1"
|
|
Width="14"
|
|
Height="14"
|
|
SnapsToDevicePixels="True"/>
|
|
<Ellipse Name="InnerCircle"
|
|
Fill="{DynamicResource ToggleButtonOnColor}"
|
|
Width="8"
|
|
Height="8"
|
|
Visibility="Collapsed"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Grid>
|
|
</Viewbox>
|
|
<ContentPresenter Margin="4,0,0,0"
|
|
VerticalAlignment="Center"
|
|
RecognizesAccessKey="True"/>
|
|
</StackPanel>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="InnerCircle" Property="Visibility" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="OuterCircle" Property="Stroke" Value="{DynamicResource ToggleButtonOnColor}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ToggleSwitchStyle" TargetType="CheckBox">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<Grid>
|
|
<Border Width="45"
|
|
Height="20"
|
|
Background="#555555"
|
|
CornerRadius="10"
|
|
Margin="5,0"
|
|
/>
|
|
<Border Name="WPFToggleSwitchButton"
|
|
Width="25"
|
|
Height="25"
|
|
Background="Black"
|
|
CornerRadius="12.5"
|
|
HorizontalAlignment="Left"
|
|
/>
|
|
<ContentPresenter Name="WPFToggleSwitchContent"
|
|
Margin="10,0,0,0"
|
|
Content="{TemplateBinding Content}"
|
|
VerticalAlignment="Center"
|
|
/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="false">
|
|
<Trigger.ExitActions>
|
|
<RemoveStoryboard BeginStoryboardName="WPFToggleSwitchLeft" />
|
|
<BeginStoryboard Name="WPFToggleSwitchRight">
|
|
<Storyboard>
|
|
<ThicknessAnimation Storyboard.TargetProperty="Margin"
|
|
Storyboard.TargetName="WPFToggleSwitchButton"
|
|
Duration="0:0:0:0"
|
|
From="0,0,0,0"
|
|
To="28,0,0,0">
|
|
</ThicknessAnimation>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
<Setter TargetName="WPFToggleSwitchButton"
|
|
Property="Background"
|
|
Value="#fff9f4f4"
|
|
/>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Trigger.ExitActions>
|
|
<RemoveStoryboard BeginStoryboardName="WPFToggleSwitchRight" />
|
|
<BeginStoryboard Name="WPFToggleSwitchLeft">
|
|
<Storyboard>
|
|
<ThicknessAnimation Storyboard.TargetProperty="Margin"
|
|
Storyboard.TargetName="WPFToggleSwitchButton"
|
|
Duration="0:0:0:0"
|
|
From="28,0,0,0"
|
|
To="0,0,0,0">
|
|
</ThicknessAnimation>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
<Setter TargetName="WPFToggleSwitchButton"
|
|
Property="Background"
|
|
Value="#ff060600"
|
|
/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ColorfulToggleSwitchStyle" TargetType="{x:Type CheckBox}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Grid Name="toggleSwitch">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="1" Name="Border" CornerRadius="8"
|
|
BorderThickness="1"
|
|
Width="34" Height="17">
|
|
<Ellipse Name="Ellipse" Fill="{DynamicResource MainForegroundColor}" Stretch="Uniform"
|
|
Margin="2,2,2,1"
|
|
HorizontalAlignment="Left" Width="10.8"
|
|
RenderTransformOrigin="0.5, 0.5">
|
|
<Ellipse.RenderTransform>
|
|
<ScaleTransform ScaleX="1" ScaleY="1" />
|
|
</Ellipse.RenderTransform>
|
|
</Ellipse>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource MainForegroundColor}" />
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource LinkHoverForegroundColor}"/>
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
<Setter Property="Panel.ZIndex" Value="1000"/>
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
|
To="1.1" Duration="0:0:0.1" />
|
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
|
To="1.1" Duration="0:0:0.1" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
|
To="1.0" Duration="0:0:0.1" />
|
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
|
To="1.0" Duration="0:0:0.1" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
</Trigger>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="False">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource MainBackgroundColor}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ToggleButtonOffColor}" />
|
|
<Setter TargetName="Ellipse" Property="Fill" Value="{DynamicResource ToggleButtonOffColor}" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ToggleButtonOnColor}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ToggleButtonOnColor}" />
|
|
<Setter TargetName="Ellipse" Property="Fill" Value="White" />
|
|
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
|
Storyboard.TargetProperty="Margin"
|
|
To="18,2,2,2" Duration="0:0:0.1" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
|
Storyboard.TargetProperty="Margin"
|
|
To="2,2,2,1" Duration="0:0:0.1" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
</Style>
|
|
|
|
|
|
<Style x:Key="BorderStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="5"/>
|
|
<Setter Property="Padding" Value="5"/>
|
|
<Setter Property="Margin" Value="5"/>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="5" BlurRadius="5" Opacity="{DynamicResource BorderOpacity}" Color="{DynamicResource CBorderColor}"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="TextBox">
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Padding" Value="5"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="ContextMenu">
|
|
<Setter.Value>
|
|
<ContextMenu>
|
|
<ContextMenu.Style>
|
|
<Style TargetType="ContextMenu">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ContextMenu">
|
|
<Border Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="5" Padding="5">
|
|
<StackPanel>
|
|
<MenuItem Command="Cut" Header="Cut"/>
|
|
<MenuItem Command="Copy" Header="Copy"/>
|
|
<MenuItem Command="Paste" Header="Paste"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ContextMenu.Style>
|
|
</ContextMenu>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TextBox">
|
|
<Border Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="5">
|
|
<ScrollViewer Name="PART_ContentHost" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="5" BlurRadius="5" Opacity="{DynamicResource BorderOpacity}" Color="{DynamicResource CBorderColor}"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="PasswordBox">
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
|
<Setter Property="Padding" Value="5"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="PasswordBox">
|
|
<Border Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="5">
|
|
<ScrollViewer Name="PART_ContentHost" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="5" BlurRadius="5" Opacity="{DynamicResource BorderOpacity}" Color="{DynamicResource CBorderColor}"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="RoundedProgressBarStyle" TargetType="ProgressBar">
|
|
<!-- The fill follows Foreground so a run that ended badly can say so; the job layer
|
|
points it at the error or warning colour and back again -->
|
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarForegroundColor}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ProgressBar">
|
|
<Border CornerRadius="4" Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource MainForegroundColor}" BorderThickness="1">
|
|
<Grid ClipToBounds="True">
|
|
<Border Name="PART_Track" CornerRadius="4" Background="Transparent"/>
|
|
<Border Name="PART_Indicator" CornerRadius="4" Background="{TemplateBinding Foreground}" HorizontalAlignment="Left"/>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<!-- Work whose length cannot be measured, such as an installer that
|
|
reports nothing until it exits. Pulsing says "still running"
|
|
where a static bar would read as finished.
|
|
|
|
Driven by Tag rather than IsIndeterminate: that property makes
|
|
WPF ignore Value and stretch the indicator across the whole
|
|
track, which would throw away the progress reached so far. -->
|
|
<Trigger Property="Tag" Value="Pulse">
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard Name="IndeterminatePulse">
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="PART_Indicator"
|
|
Storyboard.TargetProperty="Opacity"
|
|
From="1.0" To="0.35" Duration="0:0:0.9"
|
|
AutoReverse="True" RepeatBehavior="Forever"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<!-- Remove, not Stop: stopping leaves the indicator at
|
|
whatever opacity the pulse was on -->
|
|
<RemoveStoryboard BeginStoryboardName="IndeterminatePulse"/>
|
|
</Trigger.ExitActions>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<!-- Filter Chip Style — used by the Install tab category filter buttons -->
|
|
<Style x:Key="FilterChipStyle" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
|
<Setter Property="Margin" Value="2"/>
|
|
<Setter Property="Padding" Value="12,0,12,0"/>
|
|
<Setter Property="Width" Value="Auto"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Name="ChipBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{DynamicResource ButtonBorderThickness}"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="ChipBorder" Property="Background" Value="{DynamicResource ButtonBackgroundPressedColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ChipBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="ChipBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
|
<Setter Property="Foreground" Value="DimGray"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<!-- Category filter chips. A toggle rather than a button, so the active filter is visible
|
|
on the chip itself instead of only in the results below. -->
|
|
<Style x:Key="FilterChipToggleStyle" TargetType="ToggleButton">
|
|
<Setter Property="Margin" Value="2"/>
|
|
<Setter Property="Padding" Value="12,4,12,4"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}"/>
|
|
<Setter Property="FontFamily" Value="{DynamicResource ButtonFontFamily}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/>
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border Name="ChipBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{DynamicResource BorderColor}"
|
|
BorderThickness="1"
|
|
CornerRadius="{DynamicResource ButtonCornerRadius}"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
TextBlock.Foreground="{TemplateBinding Foreground}"
|
|
TextBlock.FontSize="{TemplateBinding FontSize}"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ChipBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/>
|
|
</Trigger>
|
|
<!-- Only colours change on check. Anything affecting text width, bold for
|
|
instance, would resize the chip and shift every chip after it. -->
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="ChipBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/>
|
|
<Setter TargetName="ChipBorder" Property="BorderBrush" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Resources>
|
|
<Grid Background="{DynamicResource MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- Offline banner -->
|
|
<Border Name="WPFOfflineBanner" Grid.Row="0" Background="#8B0000" Visibility="Collapsed" Padding="6,4">
|
|
<TextBlock Text="⚠ Offline Mode - No Internet Connection" Foreground="White" FontWeight="Bold"
|
|
HorizontalAlignment="Center" FontSize="13" Background="Transparent"/>
|
|
</Border>
|
|
<Grid Grid.Row="1" Background="{DynamicResource MainBackgroundColor}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/> <!-- Navigation buttons -->
|
|
<ColumnDefinition Width="*"/> <!-- Search bar and buttons -->
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Navigation Buttons Panel -->
|
|
<StackPanel Name="NavDockPanel" Orientation="Horizontal" Grid.Column="0" VerticalAlignment="Center" Margin="5,5,10,5">
|
|
<StackPanel Name="NavLogoPanel" Orientation="Horizontal" HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Margin="10,0,20,0">
|
|
</StackPanel>
|
|
<ToggleButton Style="{StaticResource TabToggleButton}" Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}"
|
|
Background="{DynamicResource ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT">
|
|
<ToggleButton.Content>
|
|
<TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonInstallForegroundColor}" >
|
|
<Underline>I</Underline>nstall
|
|
</TextBlock>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
<ToggleButton Style="{StaticResource TabToggleButton}" Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}"
|
|
Background="{DynamicResource ButtonTweaksBackgroundColor}" Foreground="{DynamicResource ButtonTweaksForegroundColor}" FontWeight="Bold" Name="WPFTab2BT">
|
|
<ToggleButton.Content>
|
|
<TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonTweaksForegroundColor}">
|
|
<Underline>T</Underline>weaks
|
|
</TextBlock>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
<ToggleButton Style="{StaticResource TabToggleButton}" Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}"
|
|
Background="{DynamicResource ButtonConfigBackgroundColor}" Foreground="{DynamicResource ButtonConfigForegroundColor}" FontWeight="Bold" Name="WPFTab3BT">
|
|
<ToggleButton.Content>
|
|
<TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonConfigForegroundColor}">
|
|
<Underline>C</Underline>onfig
|
|
</TextBlock>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
<ToggleButton Style="{StaticResource TabToggleButton}" Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}"
|
|
Background="{DynamicResource ButtonUpdatesBackgroundColor}" Foreground="{DynamicResource ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab4BT">
|
|
<ToggleButton.Content>
|
|
<TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonUpdatesForegroundColor}">
|
|
<Underline>U</Underline>pdates
|
|
</TextBlock>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
<ToggleButton Style="{StaticResource TabToggleButton}" Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="Auto" MinWidth="{DynamicResource TabButtonWidth}"
|
|
Background="{DynamicResource ButtonWin11ISOBackgroundColor}" Foreground="{DynamicResource ButtonWin11ISOForegroundColor}" FontWeight="Bold" Name="WPFTab5BT">
|
|
<ToggleButton.Content>
|
|
<TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonWin11ISOForegroundColor}">
|
|
<Underline>W</Underline>in11 Creator
|
|
</TextBlock>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
|
|
<!-- Search Bar and Action Buttons -->
|
|
<Grid Name="GridBesideNavDockPanel" Grid.Column="1" Background="{DynamicResource MainBackgroundColor}" ShowGridLines="False" Height="Auto">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*"/> <!-- Search bar area - priority space -->
|
|
<ColumnDefinition Width="Auto"/><!-- Buttons area -->
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Margin="5,0,10,0" MinWidth="120" Height="{DynamicResource SearchBarHeight}" VerticalAlignment="Center" HorizontalAlignment="Stretch">
|
|
<Grid>
|
|
<TextBox
|
|
Height="{DynamicResource SearchBarHeight}"
|
|
FontSize="{DynamicResource SearchBarTextBoxFontSize}"
|
|
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
|
BorderThickness="1"
|
|
Name="SearchBar"
|
|
Foreground="{DynamicResource MainForegroundColor}" Background="{DynamicResource MainBackgroundColor}"
|
|
Padding="3,3,30,0"
|
|
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter"
|
|
AutomationProperties.Name="Search">
|
|
</TextBox>
|
|
<TextBlock
|
|
Name="SearchBarIcon"
|
|
VerticalAlignment="Center" HorizontalAlignment="Right"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
Foreground="{DynamicResource ButtonBackgroundSelectedColor}"
|
|
FontSize="{DynamicResource IconFontSize}"
|
|
Margin="0,0,8,0" Width="Auto" Height="Auto">
|
|
</TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
<Button Grid.Column="0"
|
|
VerticalAlignment="Center" HorizontalAlignment="Right"
|
|
Name="SearchBarClearButton"
|
|
Style="{StaticResource SearchBarClearButtonStyle}"
|
|
AutomationProperties.Name="Clear Search"
|
|
Margin="0,0,20,0" Visibility="Collapsed">
|
|
</Button>
|
|
|
|
<!-- Buttons Container -->
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,5,5">
|
|
<Button Name="ThemeButton"
|
|
Style="{StaticResource HoverButtonStyle}"
|
|
BorderBrush="Transparent"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
FontSize="{DynamicResource SettingsIconFontSize}"
|
|
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Margin="0,0,2,0"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
Content="N/A"
|
|
ToolTip="Change the WinUtil UI Theme"
|
|
AutomationProperties.Name="Theme"
|
|
/>
|
|
<Popup Name="ThemePopup"
|
|
IsOpen="False"
|
|
PlacementTarget="{Binding ElementName=ThemeButton}" Placement="Bottom"
|
|
HorizontalAlignment="Right" VerticalAlignment="Top">
|
|
<Border Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
|
<StackPanel Background="{DynamicResource MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Auto" Name="AutoThemeMenuItem" Foreground="{DynamicResource MainForegroundColor}">
|
|
<MenuItem.ToolTip>
|
|
<ToolTip Content="Follow the Windows Theme"/>
|
|
</MenuItem.ToolTip>
|
|
</MenuItem>
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Dark" Name="DarkThemeMenuItem" Foreground="{DynamicResource MainForegroundColor}">
|
|
<MenuItem.ToolTip>
|
|
<ToolTip Content="Use Dark Theme"/>
|
|
</MenuItem.ToolTip>
|
|
</MenuItem>
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Light" Name="LightThemeMenuItem" Foreground="{DynamicResource MainForegroundColor}">
|
|
<MenuItem.ToolTip>
|
|
<ToolTip Content="Use Light Theme"/>
|
|
</MenuItem.ToolTip>
|
|
</MenuItem>
|
|
</StackPanel>
|
|
</Border>
|
|
</Popup>
|
|
|
|
<Button Name="FontScalingButton"
|
|
Style="{StaticResource HoverButtonStyle}"
|
|
BorderBrush="Transparent"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
FontSize="{DynamicResource SettingsIconFontSize}"
|
|
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Margin="0,0,2,0"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
Content=""
|
|
ToolTip="Adjust Font Scaling for Accessibility"
|
|
AutomationProperties.Name="Font Scaling"
|
|
/>
|
|
<Popup Name="FontScalingPopup"
|
|
IsOpen="False"
|
|
PlacementTarget="{Binding ElementName=FontScalingButton}" Placement="Bottom"
|
|
HorizontalAlignment="Right" VerticalAlignment="Top">
|
|
<Border Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
|
<StackPanel Background="{DynamicResource MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="200">
|
|
<TextBlock Text="Font Scaling"
|
|
FontSize="{DynamicResource ButtonFontSize}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
HorizontalAlignment="Center"
|
|
Margin="10,5,10,5"
|
|
FontWeight="Bold"/>
|
|
<Separator Margin="5,0,5,5"/>
|
|
<StackPanel Orientation="Horizontal" Margin="10,5,10,10">
|
|
<TextBlock Text="Small"
|
|
FontSize="{DynamicResource ButtonFontSize}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
VerticalAlignment="Center"
|
|
Margin="0,0,10,0"/>
|
|
<Slider Name="FontScalingSlider"
|
|
Minimum="0.75" Maximum="2.0"
|
|
Value="1.0"
|
|
TickFrequency="0.25"
|
|
TickPlacement="BottomRight"
|
|
IsSnapToTickEnabled="True"
|
|
IsMoveToPointEnabled="True"
|
|
SmallChange="0.25"
|
|
LargeChange="0.25"
|
|
Width="120"
|
|
VerticalAlignment="Center"
|
|
AutomationProperties.Name="Font Scaling"/>
|
|
<TextBlock Text="Large"
|
|
FontSize="{DynamicResource ButtonFontSize}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
VerticalAlignment="Center"
|
|
Margin="10,0,0,0"/>
|
|
</StackPanel>
|
|
<TextBlock Name="FontScalingValue"
|
|
Text="100%"
|
|
FontSize="{DynamicResource ButtonFontSize}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
HorizontalAlignment="Center"
|
|
Margin="10,0,10,5"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10,0,10,10">
|
|
<Button Name="FontScalingResetButton"
|
|
Content="Reset"
|
|
Style="{StaticResource HoverButtonStyle}"
|
|
Width="60" Height="25"
|
|
Margin="5,0,5,0"/>
|
|
<Button Name="FontScalingApplyButton"
|
|
Content="Apply"
|
|
Style="{StaticResource HoverButtonStyle}"
|
|
Width="60" Height="25"
|
|
Margin="5,0,5,0"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</Popup>
|
|
|
|
<Button Name="SettingsButton"
|
|
Style="{StaticResource HoverButtonStyle}"
|
|
BorderBrush="Transparent"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
FontSize="{DynamicResource SettingsIconFontSize}"
|
|
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Margin="0,0,2,0"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
ToolTip="Settings"
|
|
AutomationProperties.Name="Settings"
|
|
Content=""/>
|
|
<Popup Name="SettingsPopup"
|
|
IsOpen="False"
|
|
PlacementTarget="{Binding ElementName=SettingsButton}" Placement="Bottom"
|
|
HorizontalAlignment="Right" VerticalAlignment="Top">
|
|
<Border Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
|
<StackPanel Background="{DynamicResource MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{DynamicResource MainForegroundColor}">
|
|
<MenuItem.ToolTip>
|
|
<ToolTip Content="Import Configuration from exported file."/>
|
|
</MenuItem.ToolTip>
|
|
</MenuItem>
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{DynamicResource MainForegroundColor}">
|
|
<MenuItem.ToolTip>
|
|
<ToolTip Content="Export Selected Elements and copy execution command to clipboard."/>
|
|
</MenuItem.ToolTip>
|
|
</MenuItem>
|
|
<Separator/>
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Export Environment Report" Name="ExportEnvironmentReportMenuItem" Foreground="{DynamicResource MainForegroundColor}">
|
|
<MenuItem.ToolTip>
|
|
<ToolTip Content="Export a read-only diagnostics report for troubleshooting."/>
|
|
</MenuItem.ToolTip>
|
|
</MenuItem>
|
|
<Separator/>
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Documentation" Name="DocumentationMenuItem" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Popup>
|
|
|
|
<Button
|
|
Content=""
|
|
Style="{StaticResource HoverButtonStyle}"
|
|
BorderThickness="0"
|
|
BorderBrush="Transparent"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Margin="0"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
FontSize="{DynamicResource CloseIconFontSize}"
|
|
ToolTip="Minimize"
|
|
AutomationProperties.Name="Minimize"
|
|
Name="WPFMinimizeButton" />
|
|
<Button
|
|
BorderThickness="0"
|
|
BorderBrush="Transparent"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Margin="0,0,0,0"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
FontSize="{DynamicResource CloseIconFontSize}"
|
|
Name="WPFMaximizeButton">
|
|
<Button.Style>
|
|
<Style TargetType="Button" BasedOn="{StaticResource HoverButtonStyle}">
|
|
<Setter Property="Content" Value=""/>
|
|
<Setter Property="ToolTip" Value="Maximize"/>
|
|
<Setter Property="AutomationProperties.Name" Value="Maximize"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" Value="Maximized">
|
|
<Setter Property="Content" Value=""/>
|
|
<Setter Property="ToolTip" Value="Restore"/>
|
|
<Setter Property="AutomationProperties.Name" Value="Restore"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
|
|
<Button
|
|
Content=""
|
|
Style="{StaticResource HoverButtonStyle}"
|
|
BorderThickness="0"
|
|
BorderBrush="Transparent"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Margin="0"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
FontSize="{DynamicResource CloseIconFontSize}"
|
|
ToolTip="Close"
|
|
AutomationProperties.Name="Close"
|
|
Name="WPFCloseButton" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<TabControl Name="WPFTabNav" Background="Transparent" Width="Auto" Height="Auto" BorderBrush="Transparent" BorderThickness="0" Grid.Row="2" Grid.Column="0" Padding="-1">
|
|
<TabItem Header="Install" Visibility="Collapsed" Name="WPFTab1">
|
|
<Grid Background="Transparent" >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Category filters. Click one to filter, ctrl click to combine several. -->
|
|
<WrapPanel Grid.Row="0" Orientation="Horizontal" Margin="5,5,5,5" Name="WPFSearchChips">
|
|
<TextBlock Text=""
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="{DynamicResource IconFontSize}"
|
|
Foreground="{DynamicResource LabelboxForegroundColor}"
|
|
Background="Transparent"
|
|
VerticalAlignment="Center"
|
|
Margin="10,0,10,0"
|
|
ToolTip="Filter by category. Ctrl click to select more than one."/>
|
|
<ToggleButton Name="WPFSearchChipAll" Content="All" Style="{StaticResource FilterChipToggleStyle}" IsChecked="True"/>
|
|
<ToggleButton Name="WPFSearchChipBrowsers" Content="Browsers" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipCommunications" Content="Communications" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipDevelopment" Content="Development" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipDocument" Content="Document" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipGames" Content="Games" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipMicrosoftTools" Content="Microsoft Tools" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipMultimediaTools" Content="Multimedia Tools" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipProTools" Content="Pro Tools" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipSelfhostedTools" Content="Selfhosted Tools" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
<ToggleButton Name="WPFSearchChipUtilities" Content="Utilities" Style="{StaticResource FilterChipToggleStyle}"/>
|
|
</WrapPanel>
|
|
|
|
<Grid Grid.Row="1" Margin="{DynamicResource TabContentMargin}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Name="appscategory" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
</Grid>
|
|
|
|
<Grid Name="appspanel" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
|
<Grid>
|
|
<!-- Main content area with a ScrollViewer -->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Grid.Row="0" Margin="{DynamicResource TabContentMargin}">
|
|
<Grid Background="Transparent">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Background="{DynamicResource MainBackgroundColor}" Orientation="Vertical" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5">
|
|
<Label Content="Recommended Selections:" FontSize="{DynamicResource FontSize}" VerticalAlignment="Center" Margin="2"/>
|
|
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,2,0,0">
|
|
<Button Name="WPFstandard" Content=" Standard " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFminimal" Content=" Minimal " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFAdvanced" Content=" Advanced " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFClearTweaksSelection" Content=" Clear " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed Tweaks " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFAppxRemoval" Content=" AppX Removal " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
|
|
<Grid Name="tweakspanel" Grid.Row="1">
|
|
<!-- Your tweakspanel content goes here -->
|
|
</Grid>
|
|
|
|
<Border Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="0" Style="{StaticResource BorderStyle}">
|
|
<StackPanel Background="{DynamicResource MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left">
|
|
<TextBlock Padding="10">
|
|
Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
|
|
<LineBreak/>Recommended selections are for normal users and if you are unsure do NOT check anything else!
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
<Border Grid.Row="1" Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" Padding="10">
|
|
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0">
|
|
<Button Name="WPFTweaksbutton" Content="Run Tweaks" Margin="5" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFUndoall" Content="Undo Selected Tweaks" Margin="5" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
</WrapPanel>
|
|
</Border>
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="Config" Visibility="Collapsed" Name="WPFTab3">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Margin="{DynamicResource TabContentMargin}">
|
|
<Grid Name="featurespanel" Grid.Row="1" Background="Transparent">
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
<TabItem Header="Updates" Visibility="Collapsed" Name="WPFTab4">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="{DynamicResource TabContentMargin}">
|
|
<Grid Background="Transparent" MaxWidth="1250" HorizontalAlignment="Center">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Margin="10,10,10,14">
|
|
<TextBlock Text="Windows Update Profiles"
|
|
FontSize="24"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="Choose how Windows receives updates. Each profile replaces the Windows Update settings managed by WinUtil."
|
|
Margin="0,6,0,0"
|
|
FontSize="13"
|
|
TextWrapping="Wrap"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
</StackPanel>
|
|
|
|
<UniformGrid Grid.Row="1" Columns="3">
|
|
<Border Style="{StaticResource BorderStyle}"
|
|
BorderBrush="{DynamicResource ProgressBarForegroundColor}"
|
|
BorderThickness="2"
|
|
Padding="16"
|
|
MinHeight="300">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" Margin="0,0,0,14">
|
|
<TextBlock Text="Recommended"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="Balanced security and stability"
|
|
Margin="0,4,0,0"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="1">
|
|
<TextBlock Text="- Defers feature updates for 365 days" TextWrapping="Wrap" Margin="0,0,0,7" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="- Defers quality updates for 4 days" TextWrapping="Wrap" Margin="0,0,0,7" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="- Excludes drivers from quality updates" TextWrapping="Wrap" Margin="0,0,0,7" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="- Prevents automatic restarts while a user is signed in" TextWrapping="Wrap" Margin="0,0,0,12" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="Available on Windows Pro, Enterprise, and Education editions."
|
|
FontSize="11"
|
|
FontStyle="Italic"
|
|
TextWrapping="Wrap"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
</StackPanel>
|
|
<Button Name="WPFUpdatessecurity"
|
|
Grid.Row="2"
|
|
Content="Apply Recommended"
|
|
FontSize="{DynamicResource ConfigTabButtonFontSize}"
|
|
Margin="0,16,0,0"
|
|
Padding="10"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Style="{StaticResource BorderStyle}" Padding="16" MinHeight="300">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" Margin="0,0,0,14">
|
|
<TextBlock Text="Windows Default"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="Return control to Windows"
|
|
Margin="0,4,0,0"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="1">
|
|
<TextBlock Text="- Removes Windows Update policies applied by WinUtil" TextWrapping="Wrap" Margin="0,0,0,7" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="- Restores update service startup settings" TextWrapping="Wrap" Margin="0,0,0,7" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="- Re-enables update scheduled tasks" TextWrapping="Wrap" Margin="0,0,0,12" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="Use this to undo the Recommended or Disable profile."
|
|
FontSize="11"
|
|
FontStyle="Italic"
|
|
TextWrapping="Wrap"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
</StackPanel>
|
|
<Button Name="WPFUpdatesdefault"
|
|
Grid.Row="2"
|
|
Content="Restore Defaults"
|
|
FontSize="{DynamicResource ConfigTabButtonFontSize}"
|
|
Margin="0,16,0,0"
|
|
Padding="10"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Style="{StaticResource BorderStyle}" Padding="16" MinHeight="300">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" Margin="0,0,0,14">
|
|
<TextBlock Text="Disable Updates"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Foreground="Red"/>
|
|
<TextBlock Text="Advanced use only"
|
|
Margin="0,4,0,0"
|
|
FontSize="13"
|
|
FontWeight="SemiBold"
|
|
Foreground="Red"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="1">
|
|
<TextBlock Text="- Disables automatic update policy" TextWrapping="Wrap" Margin="0,0,0,7" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="- Stops update services and scheduled tasks" TextWrapping="Wrap" Margin="0,0,0,7" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="- Clears downloaded update files" TextWrapping="Wrap" Margin="0,0,0,12" Foreground="{DynamicResource MainForegroundColor}"/>
|
|
<TextBlock Text="Security updates will not be installed while this profile is active."
|
|
FontSize="11"
|
|
FontStyle="Italic"
|
|
TextWrapping="Wrap"
|
|
Foreground="Red"/>
|
|
</StackPanel>
|
|
<Button Name="WPFUpdatesdisable"
|
|
Grid.Row="2"
|
|
Content="Disable Updates"
|
|
FontSize="{DynamicResource ConfigTabButtonFontSize}"
|
|
Foreground="Red"
|
|
Margin="0,16,0,0"
|
|
Padding="10"/>
|
|
</Grid>
|
|
</Border>
|
|
</UniformGrid>
|
|
|
|
<Border Grid.Row="2" Style="{StaticResource BorderStyle}" Margin="8,14,8,8" Padding="12">
|
|
<TextBlock Text="Changes apply system-wide. Restart Windows after switching profiles. Use Restore Defaults to undo WinUtil update policies."
|
|
TextWrapping="Wrap"
|
|
HorizontalAlignment="Center"
|
|
Foreground="{DynamicResource MainForegroundColor}"/>
|
|
</Border>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
<TabItem Header="Win11ISO" Visibility="Collapsed" Name="WPFTab5">
|
|
<Grid Name="Win11ISOPanel" Margin="{DynamicResource TabContentMargin}" Background="Transparent">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Style="{StaticResource BorderStyle}" Padding="20,16">
|
|
<Grid>
|
|
<!-- The lopsided weight is what makes the middle column min(available, 620)
|
|
rather than a third of the card -->
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="1000*" MaxWidth="620"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Name="WPFWin11ISOBackButton"
|
|
Grid.Column="0"
|
|
Margin="0,0,10,0"
|
|
Content=""
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="{DynamicResource Win11StepTitleFontSize}"
|
|
MinWidth="44" MinHeight="72"
|
|
Background="Transparent"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Panel.ZIndex="1"
|
|
ToolTip="Back to the previous step">
|
|
<Button.Style>
|
|
<Style TargetType="Button" BasedOn="{StaticResource HoverButtonStyle}">
|
|
<Setter Property="Visibility" Value="Hidden"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsSelected, ElementName=WPFWin11ISOModifySection}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
<Button Name="WPFWin11ISOForwardButton"
|
|
Grid.Column="2"
|
|
Margin="10,0,0,0"
|
|
Content=""
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="{DynamicResource Win11StepTitleFontSize}"
|
|
MinWidth="44" MinHeight="72"
|
|
Background="Transparent"
|
|
HorizontalAlignment="Left" VerticalAlignment="Center"
|
|
Panel.ZIndex="1"
|
|
ToolTip="Forward to the next step">
|
|
<Button.Style>
|
|
<Style TargetType="Button" BasedOn="{StaticResource HoverButtonStyle}">
|
|
<Setter Property="Visibility" Value="Hidden"/>
|
|
<Style.Triggers>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsSelected, ElementName=WPFWin11ISOSelectSection}" Value="True"/>
|
|
<Condition Binding="{Binding IsEnabled, ElementName=WPFWin11ISOModifySection}" Value="True"/>
|
|
</MultiDataTrigger.Conditions>
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
</MultiDataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
<TabControl Name="WPFWin11ISOSteps"
|
|
Grid.Column="0" Grid.ColumnSpan="3"
|
|
Background="Transparent"
|
|
BorderThickness="0">
|
|
<TabControl.Resources>
|
|
<!-- Text colours: the implicit TextBlock style would paint anything unstyled
|
|
cyan on a label background, so every text block here carries a style. -->
|
|
<Style x:Key="Win11StepHeaderText" TargetType="TextBlock">
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground"
|
|
Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}"/>
|
|
</Style>
|
|
<Style x:Key="Win11ButtonText" TargetType="TextBlock" BasedOn="{StaticResource Win11StepHeaderText}">
|
|
<Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}"/>
|
|
<Setter Property="Foreground"
|
|
Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepIcon" TargetType="TextBlock" BasedOn="{StaticResource Win11StepHeaderText}">
|
|
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource IconFontSize}"/>
|
|
<Setter Property="Margin" Value="0,0,8,0"/>
|
|
</Style>
|
|
<Style x:Key="Win11ButtonIcon" TargetType="TextBlock" BasedOn="{StaticResource Win11ButtonText}">
|
|
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource IconFontSize}"/>
|
|
<Setter Property="Margin" Value="0,0,10,0"/>
|
|
</Style>
|
|
|
|
<Style TargetType="TabItem">
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonOffColor}"/>
|
|
<Setter Property="HeaderTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal" Cursor="Hand">
|
|
<TextBlock Style="{StaticResource Win11StepIcon}"
|
|
Text="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}"/>
|
|
<TextBlock Style="{StaticResource Win11StepHeaderText}" Text="{Binding}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabItem">
|
|
<Border Background="Transparent" Padding="0,0,32,0">
|
|
<ContentPresenter ContentSource="Header" VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Opacity" Value="0.45"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style TargetType="TabControl">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabControl">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<TabPanel Grid.Row="0"
|
|
IsItemsHost="True"
|
|
Background="Transparent"
|
|
Margin="0,0,0,10"/>
|
|
<Border Grid.Row="1"
|
|
BorderBrush="{DynamicResource BorderColor}"
|
|
BorderThickness="0,1,0,0"
|
|
Padding="0,10,0,0">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Disabled">
|
|
<Grid MinHeight="{Binding ViewportHeight, RelativeSource={RelativeSource AncestorType={x:Type ScrollViewer}}}">
|
|
<ContentPresenter ContentSource="SelectedContent"/>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="Win11StepColumn" TargetType="StackPanel">
|
|
<Setter Property="MaxWidth" Value="620"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepHero" TargetType="TextBlock">
|
|
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource Win11StepHeroFontSize}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,0,0,14"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepTitle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="{DynamicResource Win11StepTitleFontSize}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="Margin" Value="0,0,0,6"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepBody" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepSubtitle" TargetType="TextBlock" BasedOn="{StaticResource Win11StepBody}">
|
|
<Setter Property="Opacity" Value="0.75"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
<Setter Property="MaxWidth" Value="520"/>
|
|
<Setter Property="Margin" Value="0,0,0,20"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepLabel" TargetType="TextBlock" BasedOn="{StaticResource Win11StepBody}">
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
<Setter Property="Margin" Value="0,0,0,6"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepValue" TargetType="TextBlock" BasedOn="{StaticResource Win11StepBody}">
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0"/>
|
|
</Style>
|
|
<Style x:Key="Win11StepCaption" TargetType="TextBlock" BasedOn="{StaticResource Win11StepBody}">
|
|
<Setter Property="Opacity" Value="0.75"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,0,6,0"/>
|
|
</Style>
|
|
|
|
<Style x:Key="Win11StepButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
|
<Setter Property="Height" Value="34"/>
|
|
<Setter Property="Padding" Value="16,0"/>
|
|
<!-- The implicit style pins Width to ButtonWidth, which clips the longer labels -->
|
|
<Setter Property="Width" Value="Auto"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource Win11ButtonIcon}"
|
|
Text="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"/>
|
|
<TextBlock Style="{StaticResource Win11ButtonText}" Text="{Binding}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="Win11InfoPanel" TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="5"/>
|
|
<Setter Property="Padding" Value="16"/>
|
|
</Style>
|
|
<Style x:Key="Win11FormPanel" TargetType="Border" BasedOn="{StaticResource Win11InfoPanel}">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
</Style>
|
|
<Style x:Key="Win11SummaryIcon" TargetType="TextBlock" BasedOn="{StaticResource Win11StepIcon}">
|
|
<Setter Property="Foreground" Value="{DynamicResource LabelboxForegroundColor}"/>
|
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
|
<Setter Property="Margin" Value="0,1,12,0"/>
|
|
</Style>
|
|
<Style x:Key="Win11SummaryRow" TargetType="StackPanel">
|
|
<Setter Property="Orientation" Value="Horizontal"/>
|
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
|
</Style>
|
|
</TabControl.Resources>
|
|
|
|
<!-- ─── STEP 1 : Select Windows 11 ISO ─────────────── -->
|
|
<TabItem Name="WPFWin11ISOSelectSection" Tag="" Header="1 Select ISO">
|
|
<StackPanel Style="{StaticResource Win11StepColumn}">
|
|
<TextBlock Text="" Style="{StaticResource Win11StepHero}"/>
|
|
<TextBlock Style="{StaticResource Win11StepTitle}" Text="Select your Windows 11 ISO"/>
|
|
<TextBlock Style="{StaticResource Win11StepSubtitle}">
|
|
Choose an official Windows 11 ISO downloaded from Microsoft. It will be
|
|
mounted and checked before anything is changed.
|
|
</TextBlock>
|
|
|
|
<Border Style="{StaticResource Win11FormPanel}" Margin="0,0,0,16">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource Win11StepLabel}" Text="ISO file"/>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Grid.Column="0"
|
|
Name="WPFWin11ISOPath"
|
|
IsReadOnly="True"
|
|
VerticalAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Height="34"
|
|
Padding="10,0"
|
|
Margin="0,0,12,0"
|
|
Text="No ISO selected..."
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
Background="{DynamicResource MainBackgroundColor}"/>
|
|
<Button Grid.Column="1" Name="WPFWin11ISOBrowseButton" MinWidth="130"
|
|
Style="{StaticResource Win11StepButton}" Tag="" Content="Browse"/>
|
|
</Grid>
|
|
<!-- Hidden rather than collapsed so picking an ISO does not shift the page -->
|
|
<TextBlock Name="WPFWin11ISOFileInfo"
|
|
Style="{StaticResource Win11StepBody}"
|
|
Margin="0,10,0,0"
|
|
Visibility="Hidden"
|
|
Text="File size:"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Button Name="WPFWin11ISOMountButton" Margin="0,0,0,20"
|
|
Style="{StaticResource Win11StepButton}" Tag="" Content="Mount & Verify ISO"/>
|
|
|
|
<Border Style="{StaticResource Win11InfoPanel}">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource Win11StepLabel}" Foreground="OrangeRed" Margin="0,0,0,10">
|
|
<Run FontFamily="Segoe MDL2 Assets" Text=""/>
|
|
<Run Text=" You must use an official Microsoft ISO"/>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource Win11StepBody}">
|
|
Third-party, pre-modified, or unofficial images are not supported
|
|
and may produce broken results. This is only meant for fresh and
|
|
new Windows installs.
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource Win11StepBody}" Margin="0,0,0,12">
|
|
On the download page choose Windows 11, your language, and 64-bit (x64).
|
|
</TextBlock>
|
|
<Button Name="WPFWin11ISODownloadLink"
|
|
Style="{StaticResource Win11StepButton}" Tag="" Content="Open Microsoft Download Page"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</TabItem>
|
|
|
|
<!-- ─── STEP 2 : Modify install.wim ───────────────────── -->
|
|
<TabItem Name="WPFWin11ISOModifySection" IsEnabled="False" Tag="" Header="2 Modify Image">
|
|
<StackPanel Style="{StaticResource Win11StepColumn}">
|
|
<TextBlock Text="" Style="{StaticResource Win11StepHero}"/>
|
|
<TextBlock Style="{StaticResource Win11StepTitle}" Text="Modify the image"/>
|
|
<TextBlock Style="{StaticResource Win11StepSubtitle}">
|
|
Pick what goes into the image, then start. This takes several minutes
|
|
depending on your hardware.
|
|
</TextBlock>
|
|
|
|
<Border Name="WPFWin11ISOVerifyResultPanel"
|
|
Style="{StaticResource Win11InfoPanel}"
|
|
Padding="14,10"
|
|
Margin="0,0,0,14"
|
|
Visibility="Collapsed">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="1" Text="" Style="{StaticResource Win11SummaryIcon}"
|
|
VerticalAlignment="Center" Margin="12,0,0,0"/>
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
|
<TextBlock Text="" Style="{StaticResource Win11StepIcon}"/>
|
|
<TextBlock Style="{StaticResource Win11StepCaption}" Text="Mounted at"/>
|
|
<TextBlock Name="WPFWin11ISOMountDriveLetter" Style="{StaticResource Win11StepValue}"/>
|
|
<TextBlock Text="" Style="{StaticResource Win11StepIcon}" Margin="22,0,8,0"/>
|
|
<TextBlock Style="{StaticResource Win11StepCaption}" Text="Image file"/>
|
|
<TextBlock Name="WPFWin11ISOImageFile" Style="{StaticResource Win11StepValue}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Style="{StaticResource Win11FormPanel}" Margin="0,0,0,16">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource Win11StepLabel}" Text="Windows edition"/>
|
|
<ComboBox Name="WPFWin11ISOEditionComboBox"
|
|
FontSize="{DynamicResource FontSize}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
HorizontalAlignment="Stretch"
|
|
Height="34"
|
|
Margin="0,0,0,14"/>
|
|
<CheckBox Name="WPFWin11ISOInjectDrivers"
|
|
Content="Inject current system drivers"
|
|
FontSize="{DynamicResource FontSize}"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
IsChecked="False"
|
|
Cursor="Hand"
|
|
ToolTip="Stages boot-storage drivers for Setup and adds all exported drivers to the selected install.wim edition in one DISM pass."/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Button Name="WPFWin11ISOModifyButton" Margin="0,0,0,20"
|
|
Style="{StaticResource Win11StepButton}" Tag=""
|
|
Content="Run Windows ISO Modification and Creator"/>
|
|
|
|
<Border Style="{StaticResource Win11InfoPanel}">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource Win11StepLabel}" Margin="0,0,0,12" Text="What this does to the image"/>
|
|
<StackPanel Style="{StaticResource Win11SummaryRow}">
|
|
<TextBlock Text="" Style="{StaticResource Win11SummaryIcon}"/>
|
|
<TextBlock Style="{StaticResource Win11StepBody}" Margin="0"
|
|
Text="Removes the preinstalled apps and the OneDrive setup"/>
|
|
</StackPanel>
|
|
<StackPanel Style="{StaticResource Win11SummaryRow}">
|
|
<TextBlock Text="" Style="{StaticResource Win11SummaryIcon}"/>
|
|
<TextBlock Style="{StaticResource Win11StepBody}" Margin="0"
|
|
Text="Bypasses the TPM, Secure Boot, CPU, RAM and storage checks"/>
|
|
</StackPanel>
|
|
<StackPanel Style="{StaticResource Win11SummaryRow}">
|
|
<TextBlock Text="" Style="{StaticResource Win11SummaryIcon}"/>
|
|
<TextBlock Style="{StaticResource Win11StepBody}" Margin="0"
|
|
Text="Skips the Microsoft account screen so you can use a local account"/>
|
|
</StackPanel>
|
|
<StackPanel Style="{StaticResource Win11SummaryRow}">
|
|
<TextBlock Text="" Style="{StaticResource Win11SummaryIcon}"/>
|
|
<TextBlock Style="{StaticResource Win11StepBody}" Margin="0"
|
|
Text="Turns off telemetry, Copilot, the chat icon and search box suggestions"/>
|
|
</StackPanel>
|
|
<StackPanel Style="{StaticResource Win11SummaryRow}" Margin="0">
|
|
<TextBlock Text="" Style="{StaticResource Win11SummaryIcon}"/>
|
|
<TextBlock Style="{StaticResource Win11StepBody}" Margin="0"
|
|
Text="Pins the edition you picked above so Setup does not choose another one"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</TabItem>
|
|
|
|
<!-- ─── STEP 3 : Output Options ───────────────────────── -->
|
|
<TabItem Name="WPFWin11ISOOutputSection" IsEnabled="False" Tag="" Header="3 Output">
|
|
<StackPanel Style="{StaticResource Win11StepColumn}">
|
|
<TextBlock Text="" Style="{StaticResource Win11StepHero}"/>
|
|
<TextBlock Style="{StaticResource Win11StepTitle}" Text="Your image is ready"/>
|
|
<TextBlock Style="{StaticResource Win11StepSubtitle}">
|
|
Save the modified image as an ISO file, or write it straight to a USB
|
|
drive you can boot from.
|
|
</TextBlock>
|
|
|
|
<Border Name="WPFWin11ISODonePanel"
|
|
Style="{StaticResource Win11InfoPanel}"
|
|
Padding="14,10"
|
|
Margin="0,0,0,14"
|
|
Visibility="Collapsed">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="" Style="{StaticResource Win11SummaryIcon}"
|
|
VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
<TextBlock Name="WPFWin11ISODoneLabel" Style="{StaticResource Win11StepValue}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Button Name="WPFWin11ISOChooseISOButton" Margin="0,0,0,10"
|
|
Style="{StaticResource Win11StepButton}" Tag="" Content="Save as an ISO File"/>
|
|
<Button Name="WPFWin11ISOChooseUSBButton" Foreground="OrangeRed"
|
|
Style="{StaticResource Win11StepButton}" Tag=""
|
|
Content="Write Directly to a USB Drive (ERASES DRIVE)"/>
|
|
|
|
<Border Name="WPFWin11ISOOptionUSB"
|
|
Style="{StaticResource Win11FormPanel}"
|
|
Visibility="Collapsed"
|
|
Margin="0,14,0,0">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource Win11StepBody}">
|
|
<Run FontWeight="Bold" Foreground="OrangeRed">!! All data on the selected USB drive will be permanently erased !!</Run>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource Win11StepLabel}" Text="USB drive"/>
|
|
<Grid Margin="0,0,0,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ComboBox Grid.Column="0"
|
|
Name="WPFWin11ISOUSBDriveComboBox"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
Background="{DynamicResource MainBackgroundColor}"
|
|
VerticalAlignment="Center"
|
|
Height="34"
|
|
Margin="0,0,12,0"/>
|
|
<Button Grid.Column="1" Name="WPFWin11ISORefreshUSBButton" MinWidth="130"
|
|
Style="{StaticResource Win11StepButton}" Tag="" Content="Refresh"/>
|
|
</Grid>
|
|
<Button Name="WPFWin11ISOWriteUSBButton" Foreground="OrangeRed"
|
|
Style="{StaticResource Win11StepButton}" Tag="" Content="Erase & Write to USB"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border BorderBrush="{DynamicResource BorderColor}" BorderThickness="0,1,0,0"
|
|
Margin="0,20,0,0" Padding="0,14,0,0">
|
|
<StackPanel>
|
|
<TextBlock Style="{StaticResource Win11StepSubtitle}" Margin="0,0,0,10"
|
|
Text="Done with this image? Clear the temporary files and start again from step 1."/>
|
|
<Button Name="WPFWin11ISOCleanResetButton"
|
|
HorizontalAlignment="Center" MinWidth="240"
|
|
Style="{StaticResource Win11StepButton}" Tag="" Content="Start Over"
|
|
ToolTip="Delete the temporary working directory and go back to the first step"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</TabItem>
|
|
|
|
<!-- ─── Working page: selected while a step runs, no header of its own ─── -->
|
|
<TabItem Name="WPFWin11ISOWorkingSection" Visibility="Collapsed">
|
|
<StackPanel Style="{StaticResource Win11StepColumn}">
|
|
<!-- BitmapCache because this is text: without it WPF re-rasterises the
|
|
glyph every frame on the interface thread and the spin stutters.
|
|
Cached, the rotation is a transform on an image the GPU already has. -->
|
|
<TextBlock Name="WPFWin11ISOWorkingSpinner"
|
|
Text=""
|
|
Tag="Forward"
|
|
RenderTransformOrigin="0.5,0.5"
|
|
CacheMode="BitmapCache">
|
|
<TextBlock.RenderTransform>
|
|
<RotateTransform Angle="0"/>
|
|
</TextBlock.RenderTransform>
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" BasedOn="{StaticResource Win11StepHero}">
|
|
<Style.Triggers>
|
|
<!-- Tied to visibility, not to Loaded: the working page stays loaded
|
|
while collapsed, so a Loaded trigger left it spinning forever -->
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsVisible, RelativeSource={RelativeSource Self}}" Value="True"/>
|
|
<Condition Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="Forward"/>
|
|
</MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.EnterActions>
|
|
<BeginStoryboard Name="Win11ISOSpin">
|
|
<Storyboard RepeatBehavior="Forever">
|
|
<DoubleAnimation
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
From="0" To="360" Duration="0:0:1.4"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</MultiDataTrigger.EnterActions>
|
|
<MultiDataTrigger.ExitActions>
|
|
<StopStoryboard BeginStoryboardName="Win11ISOSpin"/>
|
|
</MultiDataTrigger.ExitActions>
|
|
</MultiDataTrigger>
|
|
<MultiDataTrigger>
|
|
<MultiDataTrigger.Conditions>
|
|
<Condition Binding="{Binding IsVisible, RelativeSource={RelativeSource Self}}" Value="True"/>
|
|
<Condition Binding="{Binding Tag, RelativeSource={RelativeSource Self}}" Value="Reverse"/>
|
|
</MultiDataTrigger.Conditions>
|
|
<MultiDataTrigger.EnterActions>
|
|
<BeginStoryboard Name="Win11ISOSpinReverse">
|
|
<Storyboard RepeatBehavior="Forever">
|
|
<DoubleAnimation
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
From="360" To="0" Duration="0:0:1.4"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</MultiDataTrigger.EnterActions>
|
|
<MultiDataTrigger.ExitActions>
|
|
<StopStoryboard BeginStoryboardName="Win11ISOSpinReverse"/>
|
|
</MultiDataTrigger.ExitActions>
|
|
</MultiDataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<TextBlock Name="WPFWin11ISOWorkingLabel"
|
|
Style="{StaticResource Win11StepTitle}"
|
|
Text="Working..."/>
|
|
<TextBlock Style="{StaticResource Win11StepSubtitle}"
|
|
Margin="0"
|
|
Text="This can take several minutes. Progress is written to the status log."/>
|
|
</StackPanel>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ─── Status log ─── -->
|
|
<Border Grid.Column="1" Style="{StaticResource BorderStyle}" Padding="20,16">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,10">
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets"
|
|
FontSize="{DynamicResource IconFontSize}"
|
|
Background="Transparent"
|
|
Foreground="{DynamicResource LabelboxForegroundColor}"
|
|
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
|
<TextBlock FontSize="{DynamicResource FontSize}"
|
|
FontWeight="Bold"
|
|
Background="Transparent"
|
|
Foreground="{DynamicResource LabelboxForegroundColor}"
|
|
VerticalAlignment="Center"
|
|
Text="Status Log"/>
|
|
</StackPanel>
|
|
<Border Grid.Row="1"
|
|
BorderBrush="{DynamicResource BorderColor}"
|
|
BorderThickness="0,1,0,0"
|
|
Padding="0,10,0,0">
|
|
<!-- TextAlignment and Effect look redundant but are not: the shared TextBox
|
|
style stretches content alignment, which WPF renders as justified once
|
|
text wraps, and its drop shadow lands on the glyphs with no background
|
|
here to sit under. -->
|
|
<TextBox Name="WPFWin11ISOStatusLog"
|
|
IsReadOnly="True"
|
|
TextWrapping="Wrap"
|
|
TextAlignment="Left"
|
|
FontFamily="{DynamicResource Win11LogFontFamily}"
|
|
VerticalScrollBarVisibility="Auto"
|
|
VerticalAlignment="Stretch"
|
|
Padding="0"
|
|
Background="Transparent"
|
|
Foreground="{DynamicResource MainForegroundColor}"
|
|
BorderThickness="0"
|
|
Effect="{x:Null}"
|
|
Text="Ready. Please select a Windows 11 ISO to begin."/>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
|
|
</Grid>
|
|
</TabItem>
|
|
<TabItem Header="AppX" Visibility="Collapsed" Name="WPFTab6">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Grid.Row="0" Margin="{DynamicResource TabContentMargin}">
|
|
<Grid Background="Transparent">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Background="{DynamicResource MainBackgroundColor}" Orientation="Vertical" Grid.Row="0" Grid.Column="0" Margin="5">
|
|
<Label Content="Selections:" FontSize="{DynamicResource FontSize}" VerticalAlignment="Center" Margin="2"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,2,0,0">
|
|
<Button Name="WPFDefaultAppxSelection" Content=" Default " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFGetInstalledAppx" Content=" Get Installed " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFSelectAllAppx" Content=" Select All " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFClearAppxSelection" Content=" Clear Selection " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<Grid Name="appxpanel" Grid.Row="1">
|
|
</Grid>
|
|
|
|
<Border Grid.Row="2" Style="{StaticResource BorderStyle}" Margin="5,15,5,5">
|
|
<StackPanel Background="{DynamicResource MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left">
|
|
<TextBlock Padding="10" TextWrapping="Wrap" Foreground="{DynamicResource MainForegroundColor}">
|
|
Note: Select the Windows AppX packages you wish to install or remove.
|
|
<LineBreak/>Install Selected registers a local manifest when available, then falls back to the Microsoft Store.
|
|
<LineBreak/>Remove Selected removes packages for the current user and all new user profiles.
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
|
|
<Border Grid.Row="1" Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" Padding="10">
|
|
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
|
|
<Button Name="WPFBackToTweaks" Content="Back to Tweaks" Margin="5" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFInstallSelectedAppx" Content="Install Selected" Margin="5" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
<Button Name="WPFRemoveSelectedAppx" Content="Remove Selected" Margin="5" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/>
|
|
</WrapPanel>
|
|
</Border>
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
|
|
<!-- Window-level progress indicator - visible regardless of active tab -->
|
|
<Border Name="WPFTweaksProgressBar" Grid.Row="3" Background="{DynamicResource MainBackgroundColor}" Visibility="Collapsed" Padding="10,6">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" Orientation="Vertical">
|
|
<TextBlock Name="WPFTweaksProgressLabel" Text="" Foreground="{DynamicResource MainForegroundColor}" FontSize="13" Background="Transparent" Margin="0,0,0,4"/>
|
|
<ProgressBar Name="WPFTweaksProgressValue" Height="6" Minimum="0" Maximum="100" Value="0" Style="{StaticResource RoundedProgressBarStyle}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Window>
|