UI/UI.xaml

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="IntuneWinAppUtil GUI - 2.0.0"
        SizeToContent="WidthAndHeight"
        ResizeMode="CanResize"
        MinWidth="700"
        MinHeight="420"
        WindowStartupLocation="CenterScreen"
        Background="#F4F7FB"
        FontFamily="Segoe UI"
        TextOptions.TextFormattingMode="Ideal"
        TextOptions.TextRenderingMode="ClearType"
        UseLayoutRounding="True">
 
    <Window.Resources>
        <SolidColorBrush x:Key="InkBrush" Color="#182230"/>
        <SolidColorBrush x:Key="MutedBrush" Color="#667085"/>
        <SolidColorBrush x:Key="LineBrush" Color="#D7DEE8"/>
        <SolidColorBrush x:Key="PanelBrush" Color="#FFFFFF"/>
        <SolidColorBrush x:Key="SoftPanelBrush" Color="#F8FAFC"/>
        <SolidColorBrush x:Key="AccentBrush" Color="#0B6BD3"/>
        <SolidColorBrush x:Key="AccentDarkBrush" Color="#084B93"/>
 
        <Style TargetType="Label">
            <Setter Property="Foreground" Value="{StaticResource InkBrush}"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="Margin" Value="0,3,0,0"/>
            <Setter Property="VerticalAlignment" Value="Top"/>
        </Style>
 
        <Style TargetType="TextBox">
            <Setter Property="MinHeight" Value="31"/>
            <Setter Property="Padding" Value="8,5"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Background" Value="#FFFFFF"/>
            <Setter Property="BorderBrush" Value="#C9D4E5"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Foreground" Value="{StaticResource InkBrush}"/>
            <Setter Property="FontSize" Value="12.5"/>
        </Style>
 
        <Style TargetType="Button">
            <Setter Property="MinHeight" Value="31"/>
            <Setter Property="Padding" Value="12,5"/>
            <Setter Property="Background" Value="#FFFFFF"/>
            <Setter Property="BorderBrush" Value="#B9C7DA"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Foreground" Value="{StaticResource InkBrush}"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="ButtonChrome"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="6">
                            <ContentPresenter HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              RecognizesAccessKey="True"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="ButtonChrome" Property="Background" Value="#EEF6FF"/>
                                <Setter TargetName="ButtonChrome" Property="BorderBrush" Value="#7FB3EA"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="ButtonChrome" Property="Background" Value="#DDEEFF"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="ButtonChrome" Property="Opacity" Value="0.55"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
 
        <Style x:Key="PrimaryButtonStyle" TargetType="Button">
            <Setter Property="Background" Value="{StaticResource AccentBrush}"/>
            <Setter Property="BorderBrush" Value="{StaticResource AccentDarkBrush}"/>
            <Setter Property="Foreground" Value="#FFFFFF"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="MinHeight" Value="34"/>
            <Setter Property="Width" Value="104"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="PrimaryButtonChrome"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="1"
                                CornerRadius="6">
                            <ContentPresenter HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              RecognizesAccessKey="True"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="PrimaryButtonChrome" Property="Background" Value="#084B93"/>
                                <Setter TargetName="PrimaryButtonChrome" Property="BorderBrush" Value="#063F7D"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="PrimaryButtonChrome" Property="Background" Value="#063F7D"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="PrimaryButtonChrome" Property="Opacity" Value="0.55"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
 
        <Style x:Key="DangerButtonStyle" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
            <Setter Property="Background" Value="#FFF7F7"/>
            <Setter Property="BorderBrush" Value="#D1A0A0"/>
            <Setter Property="Foreground" Value="#9F2424"/>
            <Setter Property="Width" Value="104"/>
        </Style>
 
        <Style x:Key="HelpTextStyle" TargetType="TextBlock">
            <Setter Property="Foreground" Value="{StaticResource MutedBrush}"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="Margin" Value="0,5,0,0"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <Setter Property="MaxWidth" Value="510"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="TextAlignment" Value="Left"/>
        </Style>
 
        <Style x:Key="SectionTitleStyle" TargetType="TextBlock">
            <Setter Property="Foreground" Value="{StaticResource InkBrush}"/>
            <Setter Property="FontSize" Value="13"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Margin" Value="0,0,0,10"/>
        </Style>
        <!-- Header tabs: white pill when selected -->
        <Style x:Key="HeaderTabStyle" TargetType="RadioButton">
            <Setter Property="Foreground" Value="#E6F0FA"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="RadioButton">
                        <Border Name="TabChrome" CornerRadius="7" Padding="14,7" Background="Transparent"
                                BorderBrush="Transparent" BorderThickness="1">
                            <ContentPresenter VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="TabChrome" Property="Background" Value="#24FFFFFF"/>
                            </Trigger>
                            <Trigger Property="IsKeyboardFocused" Value="True">
                                <Setter TargetName="TabChrome" Property="BorderBrush" Value="#CCFFFFFF"/>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="True">
                                <Setter TargetName="TabChrome" Property="Background" Value="#FFFFFF"/>
                                <Setter Property="Foreground" Value="#10243F"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
 
    <Grid>
    <Border Margin="14"
            Background="{StaticResource PanelBrush}"
            BorderBrush="{StaticResource LineBrush}"
            BorderThickness="1"
            CornerRadius="10">
        <Border.Effect>
            <DropShadowEffect BlurRadius="18" ShadowDepth="0" Opacity="0.14" Color="#334155"/>
        </Border.Effect>
 
        <DockPanel LastChildFill="True">
            <!-- Header -->
            <Border DockPanel.Dock="Top" CornerRadius="10,10,0,0" Padding="18,16">
                <Border.Background>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                        <GradientStop Color="#10243F" Offset="0"/>
                        <GradientStop Color="#173A66" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
 
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
 
                    <Border Width="42" Height="42" CornerRadius="9" Background="#1AFFFFFF" BorderBrush="#33FFFFFF" BorderThickness="1">
                        <Image Name="HeaderIcon" Width="28" Height="28" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Border>
 
                    <StackPanel Grid.Column="1" Margin="12,0,0,0" VerticalAlignment="Center">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="IntuneWinAppUtil GUI"
                                       FontSize="23"
                                       FontWeight="SemiBold"
                                       Foreground="#FFFFFF"
                                       VerticalAlignment="Center"/>
                            <Border Margin="10,0,0,0"
                                    Width="48"
                                    Height="22"
                                    CornerRadius="11"
                                    Background="#24FFFFFF"
                                    BorderBrush="#3DFFFFFF"
                                    BorderThickness="1"
                                    VerticalAlignment="Center">
                                <TextBlock Text="2.0.0"
                                           Foreground="#FFFFFF"
                                           FontSize="11"
                                           FontWeight="SemiBold"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           TextAlignment="Center"/>
                            </Border>
                        </StackPanel>
                        <TextBlock Text="Win32 packaging assistant for Microsoft Intune"
                                   Foreground="#CDE8FF"
                                   FontSize="12"
                                   Margin="0,2,0,0"/>
                        <TextBlock Name="UpdateAvailableText"
                                   Text=""
                                   Foreground="#CDE8FF"
                                   FontSize="12"
                                   Margin="0,5,0,0"
                                   Visibility="Collapsed"/>
                    </StackPanel>
 
                    <!-- Tabs: Package and Publish to Intune (Segoe MDL2: Package, Cloud). Ctrl+Tab switches. -->
                    <Border Grid.Column="2" Padding="4" CornerRadius="10" Background="#1AFFFFFF" BorderBrush="#2EFFFFFF" BorderThickness="1"
                            VerticalAlignment="Center">
                        <StackPanel Orientation="Horizontal">
                            <RadioButton Name="TabPackage" GroupName="MainTabs" IsChecked="True" Style="{StaticResource HeaderTabStyle}"
                                         AutomationProperties.Name="Package tab" Margin="0,0,4,0">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="&#xE7B8;" FontFamily="Segoe MDL2 Assets" FontSize="13" VerticalAlignment="Center" Margin="0,0,6,0"/>
                                    <TextBlock Text="Package" VerticalAlignment="Center"/>
                                </StackPanel>
                            </RadioButton>
                            <RadioButton Name="TabIntune" GroupName="MainTabs" Style="{StaticResource HeaderTabStyle}"
                                         AutomationProperties.Name="Publish to Intune tab">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="&#xE753;" FontFamily="Segoe MDL2 Assets" FontSize="13" VerticalAlignment="Center" Margin="0,0,6,0"/>
                                    <TextBlock Text="Publish to Intune" VerticalAlignment="Center"/>
                                </StackPanel>
                            </RadioButton>
                        </StackPanel>
                    </Border>
                </Grid>
            </Border>
 
            <Grid Margin="18">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
 
                <!-- Package tab: sets the window size; hidden (not collapsed) on the Intune tab, so the size stays. -->
                <Grid Name="PackagePanel">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
 
                <!-- Package inputs -->
                <Border Grid.Row="0"
                        Background="{StaticResource SoftPanelBrush}"
                        BorderBrush="{StaticResource LineBrush}"
                        BorderThickness="1"
                        CornerRadius="8"
                        Padding="14">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
 
                        <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="Package source" Style="{StaticResource SectionTitleStyle}"/>
 
                        <Label Grid.Row="1" Grid.Column="0" Content="* Source Folder (-c):"/>
                        <StackPanel Grid.Row="1" Grid.Column="1" Margin="0,0,0,10" MinHeight="35">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBox Name="SourceFolder" Grid.Column="0" Margin="0,0,10,0"/>
                                <Button Name="BrowseSource" Content="Browse..." Grid.Column="1" Width="88"/>
                            </Grid>
                            <TextBlock Name="SourceFolderPathLength"
                                       Text="Path length: 0/260"
                                       Foreground="{StaticResource MutedBrush}"
                                       FontSize="11"
                                       Margin="0,4,0,0"
                                       Visibility="Collapsed"/>
                        </StackPanel>
 
                        <Label Grid.Row="2" Grid.Column="0" Content="* Setup File (-s):"/>
                        <StackPanel Grid.Row="2" Grid.Column="1" Margin="0,0,0,10" MinHeight="35">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBox Name="SetupFile" Grid.Column="0" Margin="0,0,10,0"/>
                                <Button Name="BrowseSetup" Content="Browse..." Grid.Column="1" Width="88"/>
                            </Grid>
                            <TextBlock Name="SetupFileHint"
                                Text="Valid MSI or EXE. PSADT packages are detected automatically; MSI metadata is used when script metadata is missing."
                                Style="{StaticResource HelpTextStyle}"/>
                        </StackPanel>
 
                        <Label Grid.Row="3" Grid.Column="0" Content="* Output Folder (-o):"/>
                        <StackPanel Grid.Row="3" Grid.Column="1" MinHeight="35">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <!-- Editable: type a path or pick one of the last 10 output folders. -->
                                <ComboBox Name="OutputFolder" Grid.Column="0" Margin="0,0,10,0"
                                          IsEditable="True" IsTextSearchEnabled="False"
                                          MinHeight="31" FontSize="12.5" VerticalContentAlignment="Center"
                                          ToolTip="Type a path or pick a recent output folder"/>
                                <Button Name="BrowseOutput" Content="Browse..." Grid.Column="1" Width="88"/>
                                <Button Name="ClearRecentOutput" Content="Clear recent" Grid.Column="2" Width="104" Margin="8,0,0,0"
                                        ToolTip="Remove all recent output folders from the list"/>
                            </Grid>
                            <TextBlock Name="OutputFolderPathLength"
                                       Text="Path length: 0/260"
                                       Foreground="{StaticResource MutedBrush}"
                                       FontSize="11"
                                       Margin="0,4,0,0"
                                       Visibility="Collapsed"/>
                        </StackPanel>
                    </Grid>
                </Border>
 
                <!-- Tool and output options -->
                <Border Grid.Row="1"
                        Margin="0,12,0,0"
                        Background="#FFFFFF"
                        BorderBrush="{StaticResource LineBrush}"
                        BorderThickness="1"
                        CornerRadius="8"
                        Padding="14">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
 
                        <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="Tool and output" Style="{StaticResource SectionTitleStyle}"/>
 
                        <Label Grid.Row="1" Grid.Column="0" Content="IntuneWinAppUtil Path:"/>
                        <StackPanel Grid.Row="1" Grid.Column="1" Margin="0,0,0,10" MinHeight="50">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
 
                                <TextBox Name="ToolPathBox" Grid.Column="0" Margin="0,0,10,0" HorizontalScrollBarVisibility="Auto"/>
                                <Button Name="BrowseTool" Content="Browse..." Grid.Column="1" Width="88" Margin="0,0,10,0"/>
                                <Button Name="DownloadTool" Content="Force download" Grid.Column="2" Width="118"/>
                            </Grid>
 
                            <TextBlock Margin="0,5,0,0"
                                       Foreground="{StaticResource MutedBrush}"
                                       FontSize="12"
                                       TextWrapping="Wrap"
                                       MaxWidth="510"
                                       HorizontalAlignment="Left"
                                       TextAlignment="Left">
                                <Run Name="ToolVersionText" Text="IntuneWinAppUtil version: (not detected)"/>
                                <Run Text=" (" />
                                <Hyperlink Name="CheckToolUpdate" ToolTip="Check whether a newer IntuneWinAppUtil.exe is available">Check for updates</Hyperlink>
                                <Run Text=" · " />
                                <Hyperlink NavigateUri="https://kb.gioxx.org/Projects/intunewinapputilgui/tool-versions" ToolTip="Every IntuneWinAppUtil.exe release and its FileVersion">Version history</Hyperlink>
                                <Run Text=")" />
                            </TextBlock>
 
                            <TextBlock
                                Text="Leave empty to download the latest tool automatically, or choose a specific executable."
                                Style="{StaticResource HelpTextStyle}"/>
                        </StackPanel>
 
                        <Label Grid.Row="2" Grid.Column="0" Content="Final filename:"/>
                        <StackPanel Grid.Row="2" Grid.Column="1" MinHeight="35">
                            <TextBox Name="FinalFilename"/>
                            <TextBlock
                                Text="Suggested from PSADT AppName/AppVersion, or from MSI metadata when those values are empty."
                                Style="{StaticResource HelpTextStyle}"/>
                        </StackPanel>
                    </Grid>
                </Border>
 
                <!-- Actions and guidance -->
                <Grid Grid.Row="2" Margin="0,14,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
 
                    <Border Grid.Column="0"
                            Background="#EEF6FF"
                            BorderBrush="#C5DCF6"
                            BorderThickness="1"
                            CornerRadius="8"
                            Padding="12"
                            HorizontalAlignment="Stretch"
                            Margin="0,0,12,0">
                        <TextBlock
                            Foreground="#33536F"
                            FontSize="12"
                            TextWrapping="Wrap"
                            MaxWidth="520"
                            HorizontalAlignment="Left"
                            TextAlignment="Left">
                            <Run Text="Required: Source folder, setup file and output folder(*)" FontWeight="SemiBold"/>
                            <LineBreak/>
                            <Run Text="Source path length is indicative; Run checks the longest file path before packaging."/>
                            <LineBreak/>
                            <Run Text="Final filename is optional. If empty, the tool uses the source folder name."/>
                            <LineBreak/>
                            <Run Text="IntuneWinAppUtil Path is optional; if empty, the latest tool is downloaded automatically."/>
                        </TextBlock>
                    </Border>
 
                    <!-- Two rows of buttons, as tall as the info box, so longer labels fit. -->
                    <Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Button Name="RunButton" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="Run" Style="{StaticResource PrimaryButtonStyle}"
                                Width="308" Margin="0,0,0,8"/>
                        <Button Name="ClearButton" Grid.Row="1" Grid.Column="0" Content="Clear" Width="150" Margin="0,0,8,0"/>
                        <Button Name="ExitButton" Grid.Row="1" Grid.Column="1" Content="Exit (ESC)" Style="{StaticResource DangerButtonStyle}"
                                Width="150"/>
                    </Grid>
                </Grid>
                </Grid>
 
                <!-- INTUNE_PANEL -->
 
                <TextBlock Grid.Row="1"
                           HorizontalAlignment="Right"
                           FontSize="11"
                           Margin="0,10,0,0"
                           Foreground="{StaticResource MutedBrush}">
                    <Run Text="Gioxx, 2026 - " />
                    <Hyperlink Name="HelpButton" ToolTip="Show command-line switches and keyboard shortcuts">
                        Help
                    </Hyperlink>
                    <Run Text=" - " />
                    <Hyperlink NavigateUri="https://github.com/gioxx/IntuneWinAppUtilGUI">
                        Available on GitHub
                    </Hyperlink>
                </TextBlock>
            </Grid>
        </DockPanel>
    </Border>
 
    <!-- Progress overlay shown while packaging (covers the window and blocks input) -->
    <Border Name="ProgressOverlay"
            Margin="14"
            CornerRadius="10"
            Background="#B30F172A"
            Visibility="Collapsed">
        <Border Width="440"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Padding="22,20"
                CornerRadius="10"
                Background="{StaticResource PanelBrush}"
                BorderBrush="{StaticResource LineBrush}"
                BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect BlurRadius="24" ShadowDepth="0" Opacity="0.30" Color="#0F172A"/>
            </Border.Effect>
            <StackPanel>
                <TextBlock Name="ProgressTitle"
                           Text="Creating package"
                           FontSize="16"
                           FontWeight="SemiBold"
                           Foreground="{StaticResource InkBrush}"/>
                <TextBlock Name="ProgressStep"
                           Margin="0,6,0,14"
                           Text="Starting..."
                           TextWrapping="Wrap"
                           Foreground="{StaticResource MutedBrush}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <ProgressBar Name="ProgressBar"
                                 Height="8"
                                 Minimum="0"
                                 Maximum="100"
                                 Value="0"
                                 Foreground="{StaticResource AccentBrush}"
                                 Background="{StaticResource SoftPanelBrush}"
                                 BorderBrush="{StaticResource LineBrush}"
                                 VerticalAlignment="Center"/>
                    <TextBlock Name="ProgressPercent"
                               Grid.Column="1"
                               Width="44"
                               Margin="10,0,0,0"
                               Text="0%"
                               TextAlignment="Right"
                               FontWeight="SemiBold"
                               Foreground="{StaticResource InkBrush}"
                               VerticalAlignment="Center"/>
                </Grid>
                <TextBlock Margin="0,14,0,0"
                           Text="Percentages are estimated from the IntuneWinAppUtil progress."
                           FontSize="11"
                           Foreground="{StaticResource MutedBrush}"/>
            </StackPanel>
        </Border>
    </Border>
 
    <!-- Result overlay shown when a package has been created -->
    <!-- TabNavigation Cycle: Tab moves between the panel buttons and never reaches the form behind it. -->
    <Border Name="ResultOverlay"
            KeyboardNavigation.TabNavigation="Cycle"
            Margin="14"
            CornerRadius="10"
            Background="#B30F172A"
            Visibility="Collapsed">
        <Border Width="560"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Padding="22,20"
                CornerRadius="10"
                Background="{StaticResource PanelBrush}"
                BorderBrush="{StaticResource LineBrush}"
                BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect BlurRadius="24" ShadowDepth="0" Opacity="0.30" Color="#0F172A"/>
            </Border.Effect>
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Border Width="26" Height="26" CornerRadius="13" Background="#16A34A" VerticalAlignment="Center">
                        <TextBlock Text="&#x2713;" Foreground="#FFFFFF" FontSize="15" FontWeight="Bold"
                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Border>
                    <TextBlock Text="Package created"
                               Margin="10,0,0,0"
                               FontSize="16"
                               FontWeight="SemiBold"
                               VerticalAlignment="Center"
                               Foreground="{StaticResource InkBrush}"/>
                </StackPanel>
                <TextBlock Name="ResultFileName"
                           Margin="0,14,0,0"
                           FontWeight="SemiBold"
                           TextWrapping="Wrap"
                           Foreground="{StaticResource InkBrush}"/>
                <TextBlock Name="ResultFolder"
                           Margin="0,4,0,0"
                           TextWrapping="Wrap"
                           Foreground="{StaticResource MutedBrush}"/>
                <TextBlock Name="ResultNote"
                           Margin="0,10,0,0"
                           TextWrapping="Wrap"
                           FontSize="11"
                           Foreground="{StaticResource MutedBrush}"
                           Visibility="Collapsed"/>
                <StackPanel Margin="0,18,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Name="ResultOpenFolder" Content="Open folder" Style="{StaticResource PrimaryButtonStyle}" Margin="0,0,8,0"/>
                    <Button Name="ResultCopyPath" Content="Copy path" Width="104" Margin="0,0,8,0"
                            ToolTip="Copy the full path of the .intunewin file to the clipboard"/>
                    <Button Name="ResultUploadIntune" Content="Upload to Intune..." Width="140" Margin="0,0,8,0"
                            ToolTip="Create or update a Win32 app in Intune with this package"/>
                    <Button Name="ResultClose" Content="Close" Width="104"/>
                </StackPanel>
            </StackPanel>
        </Border>
    </Border>
 
    <!-- Help overlay: command-line switches and keyboard shortcuts (Esc or Enter closes it) -->
    <Border Name="HelpOverlay"
            KeyboardNavigation.TabNavigation="Cycle"
            Margin="14"
            CornerRadius="10"
            Background="#B30F172A"
            Visibility="Collapsed">
        <Border Width="580"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Padding="22,20"
                CornerRadius="10"
                Background="{StaticResource PanelBrush}"
                BorderBrush="{StaticResource LineBrush}"
                BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect BlurRadius="24" ShadowDepth="0" Opacity="0.30" Color="#0F172A"/>
            </Border.Effect>
            <Border.Resources>
                <Style x:Key="HelpHeading" TargetType="TextBlock">
                    <Setter Property="FontSize" Value="13"/>
                    <Setter Property="FontWeight" Value="SemiBold"/>
                    <Setter Property="Foreground" Value="{StaticResource InkBrush}"/>
                    <Setter Property="Margin" Value="0,14,0,6"/>
                </Style>
                <Style x:Key="HelpKey" TargetType="Border">
                    <Setter Property="Background" Value="{StaticResource SoftPanelBrush}"/>
                    <Setter Property="BorderBrush" Value="{StaticResource LineBrush}"/>
                    <Setter Property="BorderThickness" Value="1"/>
                    <Setter Property="CornerRadius" Value="4"/>
                    <Setter Property="Padding" Value="6,2"/>
                    <Setter Property="Margin" Value="0,0,12,6"/>
                    <Setter Property="VerticalAlignment" Value="Top"/>
                </Style>
                <Style x:Key="HelpCode" TargetType="TextBlock">
                    <Setter Property="FontFamily" Value="Consolas"/>
                    <Setter Property="FontSize" Value="12"/>
                    <Setter Property="Foreground" Value="{StaticResource InkBrush}"/>
                </Style>
                <Style x:Key="HelpText" TargetType="TextBlock">
                    <Setter Property="TextWrapping" Value="Wrap"/>
                    <Setter Property="Foreground" Value="{StaticResource MutedBrush}"/>
                    <Setter Property="Margin" Value="0,0,0,6"/>
                </Style>
            </Border.Resources>
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Border Width="26" Height="26" CornerRadius="13" Background="{StaticResource AccentBrush}" VerticalAlignment="Center">
                        <TextBlock Text="?" Foreground="#FFFFFF" FontSize="15" FontWeight="Bold"
                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Border>
                    <TextBlock Text="Help"
                               Margin="10,0,0,0"
                               FontSize="16"
                               FontWeight="SemiBold"
                               VerticalAlignment="Center"
                               Foreground="{StaticResource InkBrush}"/>
                </StackPanel>
 
                <TextBlock Text="Command-line switches" Style="{StaticResource HelpHeading}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Grid.Row="0" Style="{StaticResource HelpKey}"><TextBlock Text="-ShowVersion" Style="{StaticResource HelpCode}"/></Border>
                    <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource HelpText}"
                               Text="Shows the installed module version and the latest version on the PowerShell Gallery in the header banner."/>
                    <Border Grid.Row="1" Style="{StaticResource HelpKey}"><TextBlock Text="-ForceUpdateBanner" Style="{StaticResource HelpCode}"/></Border>
                    <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource HelpText}"
                               Text="Shows a test &quot;update available&quot; banner."/>
                    <Border Grid.Row="2" Style="{StaticResource HelpKey}"><TextBlock Text="-Diag" Style="{StaticResource HelpCode}"/></Border>
                    <TextBlock Grid.Row="2" Grid.Column="1" Style="{StaticResource HelpText}"
                               Text="Writes start-up and shutdown diagnostics and a detailed log of every packaging run, with the tool output and any locked files, to %APPDATA%\IntuneWinAppUtilGUI\logs."/>
                    <Border Grid.Row="3" Style="{StaticResource HelpKey}"><TextBlock Text="-Verbose, -Debug" Style="{StaticResource HelpCode}"/></Border>
                    <TextBlock Grid.Row="3" Grid.Column="1" Style="{StaticResource HelpText}"
                               Text="Standard PowerShell switches, kept when the GUI relaunches itself in STA mode."/>
                </Grid>
                <TextBlock Style="{StaticResource HelpText}" Margin="0,2,0,0">
                    <Run Text="Use them with"/>
                    <Run Text="Show-IntuneWinAppUtilGUI" FontFamily="Consolas" Foreground="{StaticResource InkBrush}"/><Run Text=", for example"/>
                    <Run Text="Show-IntuneWinAppUtilGUI -Diag" FontFamily="Consolas" Foreground="{StaticResource InkBrush}"/><Run Text="."/>
                </TextBlock>
 
                <TextBlock Text="Keyboard shortcuts" Style="{StaticResource HelpHeading}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Grid.Row="0" Style="{StaticResource HelpKey}"><TextBlock Text="Enter" Style="{StaticResource HelpCode}"/></Border>
                    <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource HelpText}" Text="Create the package (Package tab only)."/>
                    <Border Grid.Row="1" Style="{StaticResource HelpKey}"><TextBlock Text="Esc" Style="{StaticResource HelpCode}"/></Border>
                    <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource HelpText}" Text="Close the open panel, or ask before closing the window."/>
                    <Border Grid.Row="2" Style="{StaticResource HelpKey}"><TextBlock Text="Ctrl+Tab" Style="{StaticResource HelpCode}"/></Border>
                    <TextBlock Grid.Row="2" Grid.Column="1" Style="{StaticResource HelpText}" Text="Switch between the Package and Publish to Intune tabs."/>
                </Grid>
 
                <TextBlock Style="{StaticResource HelpText}" Margin="0,12,0,0">
                    <Run Text="Full documentation:"/>
                    <Hyperlink NavigateUri="https://kb.gioxx.org/Projects/intunewinapputilgui">kb.gioxx.org/Projects/intunewinapputilgui</Hyperlink>
                </TextBlock>
 
                <StackPanel Margin="0,14,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Name="HelpClose" Content="Close" Width="104"/>
                </StackPanel>
            </StackPanel>
        </Border>
    </Border>
 
    <!-- Shown when a publish to Intune succeeds, like the "Package created" panel -->
    <Border Name="DoneOverlay"
            KeyboardNavigation.TabNavigation="Cycle"
            Margin="14"
            CornerRadius="10"
            Background="#B30F172A"
            Visibility="Collapsed">
        <Border Width="560"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Padding="22,20"
                CornerRadius="10"
                Background="{StaticResource PanelBrush}"
                BorderBrush="{StaticResource LineBrush}"
                BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect BlurRadius="24" ShadowDepth="0" Opacity="0.30" Color="#0F172A"/>
            </Border.Effect>
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Border Width="26" Height="26" CornerRadius="13" Background="#16A34A" VerticalAlignment="Center">
                        <TextBlock Text="&#x2713;" Foreground="#FFFFFF" FontSize="15" FontWeight="Bold"
                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Border>
                    <TextBlock Name="DoneTitle" Text="Published to Intune"
                               Margin="10,0,0,0"
                               FontSize="16"
                               FontWeight="SemiBold"
                               VerticalAlignment="Center"
                               Foreground="{StaticResource InkBrush}"/>
                </StackPanel>
                <TextBlock Name="DoneAppName"
                           Margin="0,14,0,0"
                           FontWeight="SemiBold"
                           TextWrapping="Wrap"
                           Foreground="{StaticResource InkBrush}"/>
                <TextBlock Name="DoneDetail"
                           Margin="0,4,0,0"
                           TextWrapping="Wrap"
                           Foreground="{StaticResource MutedBrush}"/>
                <TextBlock Name="DoneNote"
                           Margin="0,10,0,0"
                           TextWrapping="Wrap"
                           FontSize="11"
                           Foreground="{StaticResource MutedBrush}"/>
                <StackPanel Margin="0,18,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Name="DoneOpenIntune" Content="Open in Intune" Style="{StaticResource PrimaryButtonStyle}" Width="140" Margin="0,0,8,0"
                            ToolTip="Open this app in the Intune admin center to check it"/>
                    <Button Name="DoneStartOver" Content="Start over" Width="120" Margin="0,0,8,0"
                            ToolTip="Clear both tabs and go back to Package for the next one (you stay signed in)"/>
                    <Button Name="DoneBack" Content="Close" Width="104"/>
                </StackPanel>
            </StackPanel>
        </Border>
    </Border>
 
    <!-- Connection settings for Publish to Intune: Microsoft's app or a custom app registration -->
    <Border Name="ConnectionOverlay"
            KeyboardNavigation.TabNavigation="Cycle"
            Margin="14"
            CornerRadius="10"
            Background="#B30F172A"
            Visibility="Collapsed">
        <Border Width="560"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Padding="22,20"
                CornerRadius="10"
                Background="{StaticResource PanelBrush}"
                BorderBrush="{StaticResource LineBrush}"
                BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect BlurRadius="24" ShadowDepth="0" Opacity="0.30" Color="#0F172A"/>
            </Border.Effect>
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Connection settings" FontSize="16" FontWeight="SemiBold" Foreground="{StaticResource InkBrush}" VerticalAlignment="Center"/>
                    <!-- Custom app registrations are alpha (#30): Microsoft's app stays the recommended way. -->
                    <Border Margin="10,0,0,0" Padding="8,2" CornerRadius="10" Background="#FFF4E5" BorderBrush="#F5B060" BorderThickness="1" VerticalAlignment="Center"
                            AutomationProperties.Name="Alpha feature">
                        <TextBlock Text="ALPHA" FontSize="10.5" FontWeight="Bold" Foreground="#9A4A00"/>
                    </Border>
                </StackPanel>
                <Border Margin="0,10,0,0" Padding="10,8" CornerRadius="6" Background="#FFF8EE" BorderBrush="#F5D0A0" BorderThickness="1">
                    <TextBlock TextWrapping="Wrap" FontSize="12" Foreground="#7A3E00"
                               Text="Signing in with your own app registration is an alpha feature: it is still being worked on and has not been tried with every tenant setup. Microsoft's app (the default) is the recommended way to sign in."/>
                </Border>
                <TextBlock Margin="0,10,0,0" TextWrapping="Wrap" FontSize="12" Foreground="{StaticResource MutedBrush}"
                           Text="By default, Publish to Intune signs in with Microsoft's &quot;Microsoft Graph Command Line Tools&quot; app. If your tenant blocks it or requires its own app registration, enter it here. The app registration needs the delegated permission DeviceManagementApps.ReadWrite.All (with admin consent), &quot;Allow public client flows&quot; set to Yes, and two redirect URIs under &quot;Mobile and desktop applications&quot;: ms-appx-web://Microsoft.AAD.BrokerPlugin/&lt;Client ID&gt; (the Windows sign-in broker) and http://localhost."/>
                <Label Content="Client ID (Application ID)" Target="{Binding ElementName=ConnectionClientId}" Margin="0,14,0,0"/>
                <TextBox Name="ConnectionClientId" Margin="0,4,0,0" ToolTip="For example: 00000000-0000-0000-0000-000000000000"/>
                <Label Content="Tenant ID (or domain)" Target="{Binding ElementName=ConnectionTenantId}" Margin="0,10,0,0"/>
                <TextBox Name="ConnectionTenantId" Margin="0,4,0,0" ToolTip="A GUID, or a domain like contoso.onmicrosoft.com"/>
                <TextBlock Name="ConnectionError" Margin="0,10,0,0" TextWrapping="Wrap" FontSize="12" Foreground="#9F2424" Visibility="Collapsed"/>
                <Grid Margin="0,18,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <Button Name="ConnectionUseMicrosoft" Content="Use Microsoft's app" HorizontalAlignment="Left" Width="160"
                            ToolTip="Sign in with your Microsoft account; the app registration stays saved for later"/>
                    <StackPanel Grid.Column="1" Orientation="Horizontal">
                        <Button Name="ConnectionSave" Content="Save and use" Style="{StaticResource PrimaryButtonStyle}" Width="120" Margin="0,0,8,0"
                                ToolTip="Save the app registration and sign in with it from now on"/>
                        <Button Name="ConnectionCancel" Content="Cancel" Width="104"/>
                    </StackPanel>
                </Grid>
            </StackPanel>
        </Border>
    </Border>
 
    <!-- Dialog overlay: in-window replacement for message boxes (update check, tool download, exit confirmation).
         Icon, texts and buttons are set by $showDialog in Show-IntuneWinAppUtilGui.ps1. -->
    <Border Name="DialogOverlay"
            KeyboardNavigation.TabNavigation="Cycle"
            Margin="14"
            CornerRadius="10"
            Background="#B30F172A"
            Visibility="Collapsed">
        <Border Width="500"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Padding="22,20"
                CornerRadius="10"
                Background="{StaticResource PanelBrush}"
                BorderBrush="{StaticResource LineBrush}"
                BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect BlurRadius="24" ShadowDepth="0" Opacity="0.30" Color="#0F172A"/>
            </Border.Effect>
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Border Name="DialogIcon" Width="26" Height="26" CornerRadius="13" Background="{StaticResource AccentBrush}" VerticalAlignment="Center">
                        <TextBlock Name="DialogIconText" Text="i" Foreground="#FFFFFF" FontSize="15" FontWeight="Bold"
                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Border>
                    <TextBlock Name="DialogTitle"
                               Margin="10,0,0,0"
                               FontSize="16"
                               FontWeight="SemiBold"
                               VerticalAlignment="Center"
                               Foreground="{StaticResource InkBrush}"/>
                </StackPanel>
                <TextBlock Name="DialogMessage"
                           Margin="0,14,0,0"
                           TextWrapping="Wrap"
                           Foreground="{StaticResource InkBrush}"/>
                <TextBlock Name="DialogDetails"
                           Margin="0,10,0,0"
                           TextWrapping="Wrap"
                           FontSize="11"
                           Foreground="{StaticResource MutedBrush}"
                           Visibility="Collapsed"/>
                <StackPanel Margin="0,18,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Name="DialogPrimary" Style="{StaticResource PrimaryButtonStyle}" Margin="0,0,8,0"/>
                    <Button Name="DialogSecondary" Content="Cancel" Width="104"/>
                </StackPanel>
            </StackPanel>
        </Border>
    </Border>
    </Grid>
</Window>