XAML/Main.xml
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="Window" WindowStartupLocation="CenterScreen" SizeToContent="WidthAndHeight" MinHeight="700" MinWidth="700" FontFamily="Trebuchet MS" FontSize="16" Background="#FFFFC0CB" Title="Harden Windows Security"> <Window.Resources> <!--Begin global scrollbars styles--> <Style x:Key="ElderScrolls" TargetType="{x:Type Thumb}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Grid x:Name="Grid"> <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="Transparent"/> <Border x:Name="RectangleX" CornerRadius="10 0 0 10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Background="{TemplateBinding Background}"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="Tag" Value="Horizontal"> <Setter TargetName="RectangleX" Property="Width" Value="Auto"/> <Setter TargetName="RectangleX" Property="Height" Value="7"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}"> <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> <Setter Property="Foreground" Value="#AAA81A99"/> <Setter Property="Background" Value="DarkGray"/> <Setter Property="Width" Value="10"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ScrollBar}"> <Grid x:Name="GridRoot" Width="12" Background="{x:Null}"> <Track x:Name="PART_Track" Grid.Row="0" IsDirectionReversed="true" Focusable="False"> <Track.Thumb> <Thumb x:Name="Thumb" Background="{TemplateBinding Foreground}" Style="{DynamicResource ElderScrolls}"/> </Track.Thumb> <Track.IncreaseRepeatButton> <RepeatButton x:Name="PageUp" Command="ScrollBar.PageDownCommand" Opacity="0" Focusable="False"/> </Track.IncreaseRepeatButton> <Track.DecreaseRepeatButton> <RepeatButton x: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 ButtonSelectBrush}" TargetName="Thumb" Property="Background"/> </Trigger> <Trigger SourceName="Thumb" Property="IsDragging" Value="true"> <Setter Value="{DynamicResource DarkBrush}" 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="12"/> <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> <!--End global scrollbars styles--> <!-- Begin Check box styles --> <ControlTemplate x:Key="CustomCheckBoxTemplate" TargetType="{x:Type CheckBox}"> <StackPanel Orientation="Horizontal" Margin="0,2.5,0,2.5"> <!-- Grid to contain the ellipses --> <Grid Width="20" Height="20"> <!-- Outer Ellipse (Border) with pink stroke and white fill --> <Ellipse x:Name="BorderEllipse" Stroke="#FFF485F0" StrokeThickness="1" Fill="White" Width="20" Height="20"> <Ellipse.Effect> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="6" RenderingBias="Quality"/> </Ellipse.Effect> </Ellipse> <!-- Inner Ellipse (Indicator) --> <Ellipse x:Name="IndicatorEllipse" Fill="#FFA91BEF" Width="15" Height="15" Visibility="Collapsed"/> </Grid> <!-- ContentPresenter for the text --> <ContentPresenter Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"> <!-- Apply a style trigger for IsEnabled --> <ContentPresenter.Style> <Style TargetType="{x:Type ContentPresenter}"> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <!-- Set the text color to gray when not enabled --> <Setter Property="TextElement.Foreground" Value="Gray"/> <!-- apply a blur effect to the text --> <Setter Property="Effect"> <Setter.Value> <BlurEffect Radius="2"/> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> </ContentPresenter.Style> </ContentPresenter> </StackPanel> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="true"> <!-- Show the inner ellipse when checked --> <Setter TargetName="IndicatorEllipse" Property="Visibility" Value="Visible"/> </Trigger> <Trigger Property="IsChecked" Value="false"> <!-- Hide the inner ellipse when unchecked --> <Setter TargetName="IndicatorEllipse" Property="Visibility" Value="Collapsed"/> </Trigger> <!-- New trigger for IsEnabled --> <Trigger Property="IsEnabled" Value="False"> <!-- Change the color of the BorderEllipse when not enabled --> <Setter TargetName="BorderEllipse" Property="Fill" Value="Gray"/> <!-- Hide the IndicatorEllipse when not enabled --> <Setter TargetName="IndicatorEllipse" Property="Visibility" Value="Collapsed"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> <!-- End Check box styles --> <!-- Global style for font color --> <SolidColorBrush x:Key="GlobalFontColor" Color="#000000"/> <!-- Base style for all controls --> <Style TargetType="{x:Type Control}" x:Key="BaseControlStyle"> <Setter Property="Foreground" Value="{StaticResource GlobalFontColor}"/> </Style> <!-- Derived styles for specific controls --> <Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource BaseControlStyle}"/> <!-- Style for TabControl --> <!-- <Style TargetType="TabItem"><Setter Property="FontSize" Value="16"/><Setter Property="FontWeight" Value="Bold"/><Setter Property="Padding" Value="20,20,20,0"/><Setter Property="Margin" Value="5,5,5,0"/><Setter Property="Height" Value="60"/><Setter Property="ToolTip" Value="{Binding Header, RelativeSource={RelativeSource Self}}"/><Setter Property="Foreground" Value="Black"/><Setter Property="Background" Value="Transparent"/><Setter Property="BorderBrush" Value="Transparent"/><Setter Property="BorderThickness" Value="0"/><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="TabItem"><Border x:Name="Border" Background="Transparent" BorderBrush="Transparent" BorderThickness="0"><ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" Margin="20" TextBlock.Foreground="Black"/></Border><ControlTemplate.Triggers><Trigger Property="IsSelected" Value="True"><Setter TargetName="Border" Property="Background"><Setter.Value><LinearGradientBrush StartPoint="0,0" EndPoint="1,0"><GradientStop Color="#78ffd6" Offset="0.0"/><GradientStop Color="#a8ff78" Offset="1.0"/></LinearGradientBrush></Setter.Value></Setter></Trigger><Trigger Property="IsMouseOver" Value="True"><Setter TargetName="Border" Property="Background"><Setter.Value><LinearGradientBrush StartPoint="0,0" EndPoint="1,0"><GradientStop Color="#a8ff78" Offset="0.0"/><GradientStop Color="#78ffd6" Offset="1.0"/></LinearGradientBrush></Setter.Value></Setter></Trigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter></Style> --> <!-- Defining gradient color to be use with specific key --> <LinearGradientBrush x:Key="PinkGradient" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#ee9ca7" Offset="0"/> <GradientStop Color="#ffdde1" Offset="1"/> </LinearGradientBrush> <!-- Defining gradient color to be use with specific key --> <LinearGradientBrush x:Key="GradientBLK" EndPoint="0,1" StartPoint="1,1"> <LinearGradientBrush.GradientStops> <GradientStop Color="#f953c6" Offset="0"/> <GradientStop Color="#b91d73" Offset="0.8"/> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Window.Resources> <!-- Grid for Online Mode Tab - Removing the white border with negative margins --> <Grid x:Name="ParentGrid" Margin="-2.3,-2.3,-2.3,-2.3"> <!-- Row definitions for the grid --> <Grid.RowDefinitions> <!-- row 0 --> <RowDefinition Height="230"/> <!-- row 1 --> <RowDefinition Height="Auto"/> <!-- row 2 --> <RowDefinition Height="*"/> <!-- row 3 --> <RowDefinition Height="80"/> </Grid.RowDefinitions> <!-- Column definitions for the grid --> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <!-- Logging Area --> <ScrollViewer x:Name="ScrollerForOutputTextBlock" Grid.Row="0" Grid.ColumnSpan="2" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="10,15,10,10"> <!-- its max width is being dynamically set using code behind (PowerShell) --> <TextBox x:Name="OutputTextBlock" TextWrapping="Wrap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" BorderThickness="0" IsReadOnly="True" IsTabStop="False" Cursor="IBeam" FontSize="14" FontWeight="Bold"/> </ScrollViewer> <!-- ToggleButton --> <ToggleButton x:Name="MainTabControlToggle" ToolTip="Choose between Online or Offline modes" Foreground="White" Height="40" Width="170" FontSize="18" Grid.Row="1" Grid.ColumnSpan="2"> <ToggleButton.Template> <ControlTemplate TargetType="ToggleButton"> <Border x:Name="Button1" Background="{StaticResource PinkGradient}" CornerRadius="20" Padding="1"> <Border x:Name="Button2" Background="{StaticResource GradientBLK}" Width="80" CornerRadius="20" HorizontalAlignment="Left"> <TextBlock x:Name="TextBlock1" Text="Online" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center"/> </Border> </Border> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="Button2" Property="HorizontalAlignment" Value="Right"/> <!-- The color can be changed to be different when the button is toggled vs when it's not --> <Setter TargetName="Button1" Property="Background" Value="{StaticResource PinkGradient}"/> <Setter TargetName="TextBlock1" Property="Text" Value="Offline"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </ToggleButton.Template> </ToggleButton> <!-- ContentControl to display content based on the ToggleButton's state --> <ContentControl Grid.Row="2" Grid.ColumnSpan="2" x:Name="MainContentControl"> <ContentControl.Style> <Style TargetType="ContentControl" x:Name="MainContentControlStyle"> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=MainTabControlToggle, Path=IsChecked}" Value="False"> <Setter Property="Content"> <Setter.Value> <!-- Online Tab/Grid --> <Grid x:Name="Grid1" Margin="-2.3,-2.3,-2.3,-2.3"> <!-- Row and Column definitions for the grid --> <Grid.RowDefinitions> <!-- This is for row 0 --> <RowDefinition Height="25"/> <!-- This is for row 1 --> <RowDefinition Height="4*" MaxHeight="215"/> <!-- This is for row 2 --> <RowDefinition Height="70"/> <!-- This is for row 3 --> <RowDefinition Height="30"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <!-- Categories and Sub-Categories text blocks --> <TextBlock x:Name="TextBlockCategories" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="1" HorizontalAlignment="Center" VerticalAlignment="bottom" Text="Categories" Foreground="#FFFA00FF" FontSize="18"> <TextBlock.Effect> <DropShadowEffect ShadowDepth="6" Direction="320" Color="#FFF485F0" Opacity="100" BlurRadius="10" RenderingBias="Quality"/> </TextBlock.Effect> </TextBlock> <TextBlock x:Name="TextBlockSubCategories" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="1" HorizontalAlignment="Center" VerticalAlignment="bottom" Text="Sub-Categories" Foreground="#FFFA00FF" FontSize="18"> <TextBlock.Effect> <DropShadowEffect ShadowDepth="6" Direction="320" Color="#FFF485F0" Opacity="100" BlurRadius="10" RenderingBias="Quality"/> </TextBlock.Effect> </TextBlock> <Grid Name="InnerGrid1" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1" Margin="10"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <CheckBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="1" Content="Select All" VerticalContentAlignment="Center" Margin="7,0,0,2" Padding="10,10,40,10" x:Name="SelectAllCategories" Template="{StaticResource CustomCheckBoxTemplate}"/> <!-- ListViews for Categories --> <ListView x:Name="Categories" BorderThickness="0" ToolTip="Select the hardening categories to run" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"> <!-- Background color for the ListView --> <ListView.Background> <SolidColorBrush Color="transparent"/> </ListView.Background> <ListViewItem> <CheckBox x:Name="MicrosoftSecurityBaselines" Content="Microsoft Security Baselines" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="Microsoft365AppsSecurityBaselines" Content="MSFT365 Apps Security Baselines" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="MicrosoftDefender" Content="Microsoft Defender" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="AttackSurfaceReductionRules" Content="Attack Surface Reduction Rules" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="BitLockerSettings" Content="BitLocker Settings" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="TLSSecurity" Content="TLS Security" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="LockScreen" Content="Lock Screen" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="UserAccountControl" Content="User Account Control" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="WindowsFirewall" Content="Windows Firewall" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="OptionalWindowsFeatures" Content="Optional Windows Features" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="WindowsNetworking" Content="Windows Networking" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="MiscellaneousConfigurations" Content="Miscellaneous Configurations" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="WindowsUpdateConfigurations" Content="Windows Update Configurations" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="EdgeBrowserConfigurations" Content="Edge Browser Configurations" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="CertificateCheckingCommands" Content="Certificate Checking Commands" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="CountryIPBlocking" Content="Country IP Blocking" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="DownloadsDefenseMeasures" Content="Downloads Defense Measures" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="NonAdminCommands" Content="Non-Admin Commands" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> </ListView> </Grid> <Grid x:Name="InnerGrid2" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1" Margin="10"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <CheckBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="1" Content="Select All" VerticalContentAlignment="Center" Margin="6,0,0,2" x:Name="SelectAllSubCategories" Template="{StaticResource CustomCheckBoxTemplate}"/> <!-- ListViews for Sub-Categories --> <ListView x:Name="SubCategories" BorderThickness="0" ToolTip="Select sub-categories" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"> <ListView.Background> <SolidColorBrush Color="transparent"/> </ListView.Background> <ListViewItem> <CheckBox x:Name="SecBaselines_NoOverrides" Content="Security Baselines No Overrides" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="MSFTDefender_SAC" Content="Smart App Control" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="MSFTDefender_NoDiagData" Content="Defender: No Diagnostics Data" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="MSFTDefender_NoScheduledTask" Content="Defender: No Scheduled Task" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="MSFTDefender_BetaChannels" Content="Defender: Use Beta Update Channels" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="LockScreen_CtrlAltDel" Content="Require CTRL + Alt + Del" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="LockScreen_NoLastSignedIn" Content="No Last Signed-In" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="UAC_NoFastSwitching" Content="No Fast User Switching" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="UAC_OnlyElevateSigned" Content="Only Elevated Signed" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="CountryIPBlocking_OFAC" Content="Block OFAC Sanctions Countries" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="DangerousScriptHostsBlocking" Content="Block Dangerous Script Hosts" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> <ListViewItem> <CheckBox x:Name="ClipboardSync" Content="Enable Clipboard Sync" VerticalContentAlignment="Center" Padding="10,10,40,10" Template="{StaticResource CustomCheckBoxTemplate}"/> </ListViewItem> </ListView> </Grid> <!-- Enable Logging CheckBox --> <Viewbox x:Name="LoggingViewBox" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="14"> <ToggleButton x:Name="Log" ToolTip="Enable logging" Foreground="White" Height="40" Width="170" FontSize="16"> <ToggleButton.Template> <ControlTemplate TargetType="ToggleButton"> <Border x:Name="Button11" Background="LightGray" CornerRadius="10" Padding="3"> <Border x:Name="Button22" Background="Black" Width="100" CornerRadius="10" HorizontalAlignment="Left"> <TextBlock x:Name="TextBlock11" Text="Logging Off" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center"/> </Border> </Border> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="Button22" Property="HorizontalAlignment" Value="Right"/> <Setter TargetName="Button11" Property="Background" Value="#FFF485F0"/> <Setter TargetName="TextBlock11" Property="Text" Value="Logging On"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </ToggleButton.Template> </ToggleButton> </Viewbox> <!-- Log Path TextBox --> <Button x:Name="LogPath" Grid.Row="2" Grid.Column="1" Width="150" Height="40" FontSize="16" FontWeight="Bold" Background="{StaticResource PinkGradient}" ToolTip="The path to save the log file to"> <Button.Template> <ControlTemplate TargetType="Button"> <Border x:Name="border" BorderThickness="3" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" CornerRadius="6" BorderBrush="MediumPurple"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="160" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="45" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="Coral" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="150" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="40" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="White" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.ExitActions> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="#eaafc8" Offset="0.0"/> <GradientStop Color="#e1eec3" Offset="1.0"/> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> <StackPanel Orientation="Horizontal"> <Image x:Name="LogButtonIcon" Width="40" Height="30"/> <TextBlock Text="Log Path" VerticalAlignment="Center"/> </StackPanel> </Button> <!-- File Path TextBox which is dynamic --> <TextBox x:Name="txtFilePath" Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="30,0,30,0" BorderThickness="0" ToolTip="The selected log file path" MaxWidth="700"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Border CornerRadius="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer x:Name="PART_ContentHost" Margin="0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> </Style> </TextBox.Style> </TextBox> </Grid> </Setter.Value> </Setter> </DataTrigger> <DataTrigger Binding="{Binding ElementName=MainTabControlToggle, Path=IsChecked}" Value="True"> <Setter Property="Content"> <Setter.Value> <!-- Offline Tab/Grid --> <Grid x:Name="Grid2" Margin="-2.3,-2.3,-2.3,-2.3"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <!-- Button column --> <ColumnDefinition Width="*"/> <!-- Text area column --> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <!-- This is for row 0 --> <RowDefinition Height="60"/> <!-- This is for row 1 --> <RowDefinition Height="60"/> <!-- This is for row 2 --> <RowDefinition Height="60"/> <!-- This is for row 3 --> <RowDefinition Height="60"/> </Grid.RowDefinitions> <!-- Row 0 --> <!-- Enable Offline Mode CheckBox --> <Viewbox Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,20,0,0"> <ToggleButton x:Name="EnableOfflineMode" ToolTip="Enables Offline Mode and will use the selected files instead of downloading them from the Microsoft servers" Foreground="White" Height="40" Width="170" FontSize="16"> <ToggleButton.Template> <ControlTemplate TargetType="ToggleButton"> <Border x:Name="Button111" Background="LightGray" CornerRadius="10" Padding="3"> <Border x:Name="Button222" Background="Black" Width="100" CornerRadius="10" HorizontalAlignment="Left"> <TextBlock x:Name="TextBlock111" Text="Disabled" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center"/> </Border> </Border> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="Button222" Property="HorizontalAlignment" Value="Right"/> <Setter TargetName="Button111" Property="Background" Value="#04C8F9"/> <Setter TargetName="TextBlock111" Property="Text" Value="Enabled"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </ToggleButton.Template> </ToggleButton> </Viewbox> <!-- Row 1 --> <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="30,0,30,0"> <!-- LGPO Button --> <Button x:Name="LGPOZipButton" Width="100" Height="40" FontSize="15" FontWeight="Bold" Background="{StaticResource PinkGradient}" Margin="0,0,0,0" ToolTip="Browse for the path to LGPO zip file"> <Button.Template> <ControlTemplate TargetType="Button"> <Border x:Name="border" BorderThickness="3" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" CornerRadius="6" BorderBrush="MediumPurple"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="115" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="45" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="Coral" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="100" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="40" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="White" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.ExitActions> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="#eaafc8" Offset="0.0"/> <GradientStop Color="#e1eec3" Offset="1.0"/> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> <StackPanel Orientation="Horizontal"> <Image x:Name="PathIcon3" Width="40" Height="30"/> <TextBlock Text="LGPO" VerticalAlignment="Center"/> </StackPanel> </Button> <!-- LGPO Path Text box --> <TextBox x:Name="LGPOZipTextBox" Height="40" Margin="20,0,0,0" ToolTip="Selected path for the LGPO zip file" MinWidth="210" MaxWidth="700"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Foreground" Value="Black"/> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Grid> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/> <ScrollViewer x:Name="PART_ContentHost" Margin="5,0"/> <TextBlock x:Name="PART_Watermark" Text="Selected Path will be displayed here..." Foreground="Gray" IsHitTestVisible="False" Margin="5,0" VerticalAlignment="Center" Visibility="Collapsed"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="Text" Value=""> <Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible"/> </Trigger> <Trigger Property="Text" Value="{x:Null}"> <Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </TextBox.Style> </TextBox> </StackPanel> <!-- Row 2 --> <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="30,0,30,0"> <!-- Microsoft Security Baselines Button --> <Button x:Name="MicrosoftSecurityBaselineZipButton" Width="270" Height="40" FontSize="15" FontWeight="Bold" Background="{StaticResource PinkGradient}" Margin="0,0,0,0" ToolTip="Browse for the path to Microsoft Security Baseline zip file"> <Button.Template> <ControlTemplate TargetType="Button"> <Border x:Name="border" BorderThickness="3" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" CornerRadius="6" BorderBrush="MediumPurple"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="280" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="45" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="Coral" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="270" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="40" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="White" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.ExitActions> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="#eaafc8" Offset="0.0"/> <GradientStop Color="#e1eec3" Offset="1.0"/> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> <StackPanel Orientation="Horizontal"> <Image x:Name="PathIcon1" Width="40" Height="30"/> <TextBlock Text="Microsoft Security Baseline" VerticalAlignment="Center"/> </StackPanel> </Button> <!-- Microsoft Security Baselines Text block --> <TextBox x:Name="MicrosoftSecurityBaselineZipTextBox" Height="40" Margin="20,0,0,0" MinWidth="210" MaxWidth="700" ToolTip="Selected path for the Microsoft Security Baseline zip file" VerticalContentAlignment="Center"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="Foreground" Value="Black"/> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Grid> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/> <!-- Adjust the ScrollViewer's VerticalAlignment to Center --> <ScrollViewer x:Name="PART_ContentHost" Margin="5,0" VerticalAlignment="Center"/> <TextBlock x:Name="PART_Watermark" Text="Selected Path will be displayed here..." Foreground="Gray" IsHitTestVisible="False" Margin="5,0" VerticalAlignment="Center" Visibility="Collapsed"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="Text" Value=""> <Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible"/> </Trigger> <Trigger Property="Text" Value="{x:Null}"> <Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </TextBox.Style> </TextBox> </StackPanel> <!-- Row 3 --> <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="30,0,30,0"> <!-- M365 apps security baselines button --> <Button x:Name="Microsoft365AppsSecurityBaselineZipButton" Width="320" Height="40" FontSize="15" FontWeight="Bold" Background="{StaticResource PinkGradient}" Margin="0,0,0,0" ToolTip="Browse for the path to Microsoft 365 Apps Security Baseline zip file"> <Button.Template> <ControlTemplate TargetType="Button"> <Border x:Name="border" BorderThickness="3" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" CornerRadius="6" BorderBrush="MediumPurple"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="345" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="45" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="Coral" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="320" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="40" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="White" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.ExitActions> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="#eaafc8" Offset="0.0"/> <GradientStop Color="#e1eec3" Offset="1.0"/> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> <StackPanel Orientation="Horizontal"> <Image x:Name="PathIcon2" Width="40" Height="30"/> <TextBlock Text="Microsoft 365 Apps Security Baseline" VerticalAlignment="Center"/> </StackPanel> </Button> <!-- M365 apps security baselines text block --> <TextBox x:Name="Microsoft365AppsSecurityBaselineZipTextBox" Height="40" Margin="20,0,0,0" MinWidth="210" MaxWidth="700" ToolTip="Selected path for the Microsoft 365 Apps Security Baseline zip file" VerticalContentAlignment="Center"> <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Setter Property="Foreground" Value="Black"/> <Setter Property="Effect"> <Setter.Value> <DropShadowEffect ShadowDepth="0" Direction="0" Color="#FFF485F0" Opacity="1" BlurRadius="10" RenderingBias="Quality"/> </Setter.Value> </Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Grid> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/> <!-- Adjust the ScrollViewer's VerticalAlignment to Center --> <ScrollViewer x:Name="PART_ContentHost" Margin="5,0" VerticalAlignment="Center"/> <TextBlock x:Name="PART_Watermark" Text="Selected Path will be displayed here..." Foreground="Gray" IsHitTestVisible="False" Margin="5,0" VerticalAlignment="Center" Visibility="Collapsed"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="Text" Value=""> <Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible"/> </Trigger> <Trigger Property="Text" Value="{x:Null}"> <Setter TargetName="PART_Watermark" Property="Visibility" Value="Visible"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </TextBox.Style> </TextBox> </StackPanel> </Grid> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </ContentControl.Style> </ContentControl> <Button x:Name="Execute" Grid.Row="3" Grid.ColumnSpan="2" Width="120" Height="50" FontSize="16" FontWeight="Bold" Background="{StaticResource PinkGradient}"> <Button.Template> <ControlTemplate TargetType="Button"> <Border x:Name="border" BorderThickness="3" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" CornerRadius="6" BorderBrush="MediumPurple"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="140" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="55" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="Coral" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation To="120" Storyboard.TargetProperty="Width" Duration="0:0:0.3"/> <DoubleAnimation To="50" Storyboard.TargetProperty="Height" Duration="0:0:0.3"/> <ColorAnimation To="White" Storyboard.TargetProperty="Background.(SolidColorBrush.Color)" Duration="0:0:0.3"/> </Storyboard> </BeginStoryboard> </Trigger.ExitActions> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <GradientStop Color="#eaafc8" Offset="0.0"/> <GradientStop Color="#e1eec3" Offset="1.0"/> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> <StackPanel Orientation="Horizontal"> <Image x:Name="ExecuteButtonIcon" Width="40" Height="40"/> <TextBlock Text="Execute" VerticalAlignment="Center"/> </StackPanel> </Button> </Grid> </Window> |