windows/mainWindow/window.xaml
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="psChocoUpdateNotify" Height="555" Width="460"> <Window.Resources> <Style x:Key="ButtonFocusVisual"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="ToolbarButtonStyle" TargetType="{x:Type Button}"> <Setter Property="Background" Value="Azure"/> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Opacity" Value="1" /> <Setter Property="Margin" Value="2,1,2,1" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Background" Value="#00000000"/> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Opacity" Value="0.6" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter Property="Background" Value="#FFBEE6FD"/> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Opacity" Value="1" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter Property="Background" Value="#FFBEE6FD"/> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Opacity" Value="1" /> <Setter Property="Margin" Value="1,0,1,0" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Window.TaskbarItemInfo> <TaskbarItemInfo /> </Window.TaskbarItemInfo> <Grid Margin="1,0"> <Grid.RowDefinitions> <RowDefinition Height="100" /> <RowDefinition Height="50" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <StackPanel Grid.Row="0" Orientation="Horizontal" Background="Azure"> <Border> <Image x:Name="imgLogo" HorizontalAlignment="Left" Margin="10,0,10,10"></Image> </Border> <Border BorderThickness="0,0,1,0" BorderBrush="Gray" Margin="0,1,0,1"> <Grid> <StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal"> <Button x:Name="bControlSearch" Style="{StaticResource ToolbarButtonStyle}"> <StackPanel Orientation="Horizontal"> <Image x:Name="imgSearch" Height="16" Width="16" Margin="2,0,10,0"></Image> <Label Padding="2,2,10,2" HorizontalAlignment="Center" Width="125"> <TextBlock TextWrapping="WrapWithOverflow">Search outdated packages</TextBlock> </Label> </StackPanel> </Button> </StackPanel> <StackPanel Orientation="Horizontal"> <Button x:Name="bControlUpdate" Style="{StaticResource ToolbarButtonStyle}"> <StackPanel Orientation="Horizontal"> <Image x:Name="imgUpdate" Height="16" Width="16" Margin="2,0,10,0"></Image> <Label Padding="2,2,10,2" HorizontalAlignment="Center" Width="125"> <TextBlock TextWrapping="WrapWithOverflow">Upgrade selected packages</TextBlock> </Label> </StackPanel> </Button> </StackPanel> </StackPanel> </StackPanel> <Label VerticalAlignment="Bottom" HorizontalAlignment="Center" FontSize="8">Control</Label> </Grid> </Border> <Border BorderThickness="0,0,1,0" BorderBrush="Gray" Margin="0,1,0,1"> <Grid> <StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical" Margin="10,0,20,0"> <CheckBox x:Name="cbSilent" Content="Silent" Margin="0,5,0,0" ToolTip="Install with '-y' to avoid confirming every package installation"/> <CheckBox x:Name="cbHidden" Content="Hidden" Margin="0,5,0,0" ToolTip="Do not show the choco window. This includes the above option"/> <CheckBox x:Name="cbWhatIf" Content="WhatIf" Margin="0,5,0,0" ToolTip="Do not make any changes"/> </StackPanel> </StackPanel> <Label VerticalAlignment="Bottom" HorizontalAlignment="Center" FontSize="8">Options</Label> </Grid> </Border> <Border BorderThickness="0,0,1,0" BorderBrush="Gray" Margin="0,1,0,1"> <Grid> <StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal"> <Button x:Name="bHelp" Style="{StaticResource ToolbarButtonStyle}"> <StackPanel Orientation="Horizontal"> <Image x:Name="imgHelp" Height="16" Width="16" Margin="2,0,10,0"></Image> <Label Padding="2,2,10,2" HorizontalAlignment="Center">Help</Label> </StackPanel> </Button> </StackPanel> </StackPanel> </StackPanel> <Label VerticalAlignment="Bottom" HorizontalAlignment="Center" FontSize="8">Other</Label> </Grid> </Border> </StackPanel> <TextBlock Grid.Row="1" x:Name="tbInfo" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"></TextBlock> <DataGrid Grid.Row="2" FontSize="11" AutoGenerateColumns="False" x:Name="dgUpdates" AlternatingRowBackground="lightgray" IsReadOnly="true" Margin="5" IsEnabled="True" HeadersVisibility="Column" CanUserResizeRows="False" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Visible" MaxHeight="350" Visibility="Collapsed"> <DataGrid.Columns> <DataGridTemplateColumn> <DataGridTemplateColumn.Header> <CheckBox x:Name="cbUpdateAll" IsChecked="True">Update</CheckBox> </DataGridTemplateColumn.Header> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <CheckBox HorizontalAlignment="Center" IsChecked="{Binding DoUpdate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></CheckBox> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTextColumn Header="PackageName" Binding="{Binding PackageName}" /> <DataGridTextColumn Header="CurrentVersion" Binding="{Binding CurrentVersion}" /> <DataGridTextColumn Header="UpdateVersion" Binding="{Binding UpdateVersion}" /> </DataGrid.Columns> </DataGrid> <Grid x:Name="gOverlay" Grid.RowSpan="4" Grid.Row="0" Grid.Width="Auto" Background="White" Opacity="0.85" Visibility="Collapsed"> </Grid> <StackPanel x:Name="spOverlay" Grid.RowSpan="4" Grid.Row="0" Width="Auto" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical" Visibility="Collapsed"> <TextBlock x:Name="tbOverlay" FontSize="18"/> <TextBlock x:Name="tbOverlayProgress" FontSize="18" HorizontalAlignment="Center"/> </StackPanel> <Button x:Name="bChocoPage" Grid.RowSpan="4" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5" Visibility="Collapsed">Visit https://chocolatey.org/install</Button> </Grid> </Window> |