Skip to content

Commit

Permalink
Merge branch 'master' into user/chingucoding/testapp-ui-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwgn committed Mar 5, 2021
2 parents e4bf30b + c1f617a commit 03950bf
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 97 deletions.
4 changes: 2 additions & 2 deletions dev/CommonStyles/CommandBar_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<x:Double x:Key="CommandBarOverflowMaxHeight">198</x:Double>
<StaticResource x:Key="CommandBarBackground" ResourceKey="ControlFillColorTransparentBrush" />
<contract7NotPresent:StaticResource x:Key="CommandBarBackgroundOpen" ResourceKey="SolidBackgroundFillColorBaseBrush" />
<contract7Present:StaticResource x:Key="CommandBarBackgroundOpen" ResourceKey="AcrylicBackgroundFillColorDefaultBrush" />
<contract7Present:StaticResource x:Key="CommandBarBackgroundOpen" ResourceKey="AcrylicInAppFillColorDefaultBrush" />
<StaticResource x:Key="CommandBarBorderBrushOpen" ResourceKey="CardStrokeColorDefaultSolidBrush" />
<Thickness x:Key="CommandBarBorderThicknessOpen">1</Thickness>
<StaticResource x:Key="CommandBarForeground" ResourceKey="TextFillColorPrimaryBrush" />
Expand Down Expand Up @@ -62,7 +62,7 @@
<x:Double x:Key="CommandBarOverflowMaxHeight">198</x:Double>
<StaticResource x:Key="CommandBarBackground" ResourceKey="ControlFillColorTransparentBrush" />
<contract7NotPresent:StaticResource x:Key="CommandBarBackgroundOpen" ResourceKey="SolidBackgroundFillColorBaseBrush" />
<contract7Present:StaticResource x:Key="CommandBarBackgroundOpen" ResourceKey="AcrylicBackgroundFillColorDefaultBrush" />
<contract7Present:StaticResource x:Key="CommandBarBackgroundOpen" ResourceKey="AcrylicInAppFillColorDefaultBrush" />
<StaticResource x:Key="CommandBarBorderBrushOpen" ResourceKey="CardStrokeColorDefaultSolidBrush" />
<Thickness x:Key="CommandBarBorderThicknessOpen">1</Thickness>
<StaticResource x:Key="CommandBarForeground" ResourceKey="TextFillColorPrimaryBrush" />
Expand Down
187 changes: 92 additions & 95 deletions dev/ProgressBar/TestUI/ProgressBarPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
</Page.Resources>

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>


<StackPanel Grid.ColumnSpan="3" Orientation="Horizontal">
<TextBlock Text="Sample ProgressBar" Style="{ThemeResource StandardGroupHeader}"/>
<TextBlock Text="Sample Progressbar" Style="{ThemeResource StandardGroupHeader}"/>
<FontIcon Glyph="&#xF0AF;" Margin="4,0,40,3" FontSize="14" VerticalAlignment="Center"/>
<controls:ProgressBar
x:Name="TestProgressBar"
Expand All @@ -35,104 +41,95 @@
ShowError="{x:Bind ShowErrorCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"/>
</StackPanel>

<ScrollViewer Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<StackPanel Style="{ThemeResource StandardGroupingStackPanel}">
<TextBlock Text="Options" Style="{ThemeResource StandardGroupHeader}"/>
<Grid Width="300" HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<TextBox x:Name="MaximumInput" AutomationProperties.Name="MaximumInput" Header="Maximum" PlaceholderText="100" Width="90" HorizontalAlignment="Left"/>
<TextBlock x:Name="MaximumInputText" AutomationProperties.Name="MaximumInputText" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Maximum, Mode=TwoWay}"/>

<TextBox x:Name="MinimumInput" AutomationProperties.Name="MinimumInput" Header="Minimum" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="1"/>
<TextBlock x:Name="MinimumInputText" AutomationProperties.Name="MinimumInputText" Grid.Row="1" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Minimum, Mode=TwoWay}"/>

<TextBox x:Name="WidthInput" AutomationProperties.Name="WidthInput" Header="Width" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="2"/>
<TextBlock x:Name="WidthInputText" AutomationProperties.Name="WidthInputText" Grid.Row="2" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Width, Mode=TwoWay}"/>

<TextBox x:Name="ValueInput" AutomationProperties.Name="ValueInput" Header="Value" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="3"/>
<TextBlock x:Name="ValueText" AutomationProperties.Name="ValueText" Grid.Row="3" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Value, Mode=TwoWay}"/>
</Grid>

<TextBlock Text="Padding" Margin="0, 20, 0, 10"/>

<Grid Width="300" HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<TextBox x:Name="PaddingLeftInput" AutomationProperties.Name="PaddingLeftInput" Header="Left" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="1"/>
<TextBlock x:Name="PaddingLeftText" AutomationProperties.Name="PaddingLeftText" Grid.Row="1" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Padding.Left, Mode=TwoWay}"/>

<TextBox x:Name="PaddingRightInput" AutomationProperties.Name="PaddingRightInput" Header="Right" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="2"/>
<TextBlock x:Name="PaddingRightText" AutomationProperties.Name="PaddingRightText" Grid.Row="2" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Padding.Right, Mode=TwoWay}"/>

</Grid>
<TextBlock Text="States"/>
<CheckBox x:Name="ShowPausedCheckBox" AutomationProperties.Name="ShowPausedCheckBox" Content="ShowPaused" />
<CheckBox x:Name="ShowErrorCheckBox" AutomationProperties.Name="ShowErrorCheckBox" Content="ShowError"/>
<CheckBox x:Name="ShowIsIndeterminateCheckBox" AutomationProperties.Name="ShowIsIndeterminateCheckBox" Content="IsIndeterminate"/>
</StackPanel>


<StackPanel Grid.Column="1" Style="{ThemeResource StandardGroupingStackPanel}" Margin="16,0,0,0">
<TextBlock Text="Actions" Style="{ThemeResource StandardGroupHeader}"/>
<Button x:Name="UpdateMinMaxButton" AutomationProperties.Name="UpdateMinMaxButton" Content="Update Min and Max" Click="UpdateMinMax_Click"/>
<Button x:Name="UpdateWidthButton" AutomationProperties.Name="UpdateWidthButton" Content="Update Width" Click="UpdateWidth_Click"/>
<Button x:Name="UpdateValueButton" AutomationProperties.Name="UpdateValueButton" Content="Update Value" Click="UpdateValue_Click"/>
<RepeatButton x:Name="ChangeValueButton" AutomationProperties.Name="ChangeValueButton" Content="Hold and Change Value" Click="ChangeValue_Click" />
<Button x:Name="UpdatePaddingButton" AutomationProperties.Name="UpdatePaddingButton" Content="Update Padding Left and Right" Click="UpdatePadding_Click"/>
</StackPanel>

<StackPanel Grid.Column="2" Margin="16,0,0,0"
<StackPanel Grid.Row="1">
<StackPanel Style="{ThemeResource StandardGroupingStackPanel}">
<TextBlock Text="Options" Style="{ThemeResource StandardGroupHeader}"/>
<Grid Width="300" HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<TextBox x:Name="MaximumInput" AutomationProperties.Name="MaximumInput" Header="Maximum" PlaceholderText="100" Width="90" HorizontalAlignment="Left"/>
<TextBlock x:Name="MaximumInputText" AutomationProperties.Name="MaximumInputText" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Maximum, Mode=TwoWay}"/>

<TextBox x:Name="MinimumInput" AutomationProperties.Name="MinimumInput" Header="Minimum" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="1"/>
<TextBlock x:Name="MinimumInputText" AutomationProperties.Name="MinimumInputText" Grid.Row="1" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Minimum, Mode=TwoWay}"/>

<TextBox x:Name="WidthInput" AutomationProperties.Name="WidthInput" Header="Width" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="2"/>
<TextBlock x:Name="WidthInputText" AutomationProperties.Name="WidthInputText" Grid.Row="2" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Width, Mode=TwoWay}"/>

<TextBox x:Name="ValueInput" AutomationProperties.Name="ValueInput" Header="Value" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="3"/>
<TextBlock x:Name="ValueText" AutomationProperties.Name="ValueText" Grid.Row="3" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Value, Mode=TwoWay}"/>
</Grid>

<TextBlock Text="Padding" Margin="0, 20, 0, 10"/>

<Grid Width="300" HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<TextBox x:Name="PaddingLeftInput" AutomationProperties.Name="PaddingLeftInput" Header="Left" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="1"/>
<TextBlock x:Name="PaddingLeftText" AutomationProperties.Name="PaddingLeftText" Grid.Row="1" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Padding.Left, Mode=TwoWay}"/>

<TextBox x:Name="PaddingRightInput" AutomationProperties.Name="PaddingRightInput" Header="Right" PlaceholderText="0" Width="90" HorizontalAlignment="Left" Grid.Row="2"/>
<TextBlock x:Name="PaddingRightText" AutomationProperties.Name="PaddingRightText" Grid.Row="2" Grid.Column="1" Text="{Binding ElementName=TestProgressBar, Path=Padding.Right, Mode=TwoWay}"/>

</Grid>
<TextBlock Text="States"/>
<CheckBox x:Name="ShowPausedCheckBox" AutomationProperties.Name="ShowPausedCheckBox" Content="ShowPaused" />
<CheckBox x:Name="ShowErrorCheckBox" AutomationProperties.Name="ShowErrorCheckBox" Content="ShowError"/>
<CheckBox x:Name="ShowIsIndeterminateCheckBox" AutomationProperties.Name="ShowIsIndeterminateCheckBox" Content="IsIndeterminate"/>
</StackPanel>

<StackPanel Style="{ThemeResource StandardGroupingStackPanel}" Margin="0,16,0,0">
<TextBlock Text="Actions" Style="{ThemeResource StandardGroupHeader}"/>
<Button x:Name="UpdateMinMaxButton" AutomationProperties.Name="UpdateMinMaxButton" Content="Update Min and Max" Click="UpdateMinMax_Click"/>
<Button x:Name="UpdateWidthButton" AutomationProperties.Name="UpdateWidthButton" Content="Update Width" Click="UpdateWidth_Click"/>
<Button x:Name="UpdateValueButton" AutomationProperties.Name="UpdateValueButton" Content="Update Value" Click="UpdateValue_Click"/>
<RepeatButton x:Name="ChangeValueButton" AutomationProperties.Name="ChangeValueButton" Content="Hold and Change Value" Click="ChangeValue_Click" />
<Button x:Name="UpdatePaddingButton" AutomationProperties.Name="UpdatePaddingButton" Content="Update Padding Left and Right" Click="UpdatePadding_Click"/>
</StackPanel>

</StackPanel>

<StackPanel Grid.Column="1" Grid.Row="1" Margin="16,0,0,0"
Style="{ThemeResource StandardGroupingStackPanel}">
<TextBlock Text="Properties" Style="{ThemeResource StandardGroupHeader}"/>
<TextBlock Text="Properties" Style="{ThemeResource StandardGroupHeader}"/>

<TextBlock Text="Value" Margin="0, 20, 0, 0"/>
<TextBlock x:Name="ROValueText" AutomationProperties.Name="ROValueText" Margin="0, 0, 0, 20"/>
<TextBlock Text="Value" Margin="0, 20, 0, 0"/>
<TextBlock x:Name="ROValueText" AutomationProperties.Name="ROValueText" Margin="0, 0, 0, 20"/>

<TextBlock Text="Indicator Width" Margin="0, 20, 0, 0"/>
<TextBlock x:Name="IndicatorWidthText" AutomationProperties.Name="IndicatorWidthText" Margin="0, 0, 0, 20"/>
<TextBlock Text="Indicator Width" Margin="0, 20, 0, 0"/>
<TextBlock x:Name="IndicatorWidthText" AutomationProperties.Name="IndicatorWidthText" Margin="0, 0, 0, 20"/>

<TextBlock Text="Is paused:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowPausedText" Text="{x:Bind ShowPausedCheckBox.IsChecked, Mode=OneWay}"/>
<TextBlock Text="Is paused:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowPausedText" Text="{x:Bind ShowPausedCheckBox.IsChecked, Mode=OneWay}"/>

<TextBlock Text="Is error:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowErrorText" Text="{x:Bind ShowErrorCheckBox.IsChecked, Mode=OneWay}"/>
<TextBlock Text="Is error:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowErrorText" Text="{x:Bind ShowErrorCheckBox.IsChecked, Mode=OneWay}"/>

<TextBlock Text="Is indeterminate:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowIsIndeterminateText" Text="{x:Bind ShowIsIndeterminateCheckBox.IsChecked, Mode=OneWay}"/>
<TextBlock Text="Is indeterminate:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowIsIndeterminateText" Text="{x:Bind ShowIsIndeterminateCheckBox.IsChecked, Mode=OneWay}"/>

<TextBlock x:Name="VisualStateText" AutomationProperties.Name="VisualStateText" Margin="0, 20, 0, 0" />
<Button x:Name="NavigateToReTemplatePage" AutomationProperties.Name="NavigateToReTemplatePage">ProgressBar Re-Template Page</Button>
</StackPanel>
</Grid>
</ScrollViewer>
<TextBlock x:Name="VisualStateText" AutomationProperties.Name="VisualStateText" Margin="0, 20, 0, 0" />
<Button x:Name="NavigateToReTemplatePage" AutomationProperties.Name="NavigateToReTemplatePage">ProgressBar Re-Template Page</Button>
</StackPanel>
</Grid>
</local:TestPage>
</local:TestPage>

0 comments on commit 03950bf

Please sign in to comment.