Skip to content

Commit

Permalink
Merge branch 'master' into ExpenseItDemoFocusTransfer
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitmathur authored Feb 11, 2020
2 parents 4a2a659 + 1bb14be commit 45fa1a5
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
<Label Style="{StaticResource ListHeaderTextStyle}">Names</Label>
</Border>

<ListBox Name="peopleListBox" Grid.Column="1" Grid.Row="2"
<ListBox Name="peopleListBox"
AutomationProperties.Name="Names"
Grid.Column="1" Grid.Row="2"
ItemsSource="{Binding Source={StaticResource ExpenseDataSource}, XPath=Person}"
ItemTemplate="{StaticResource nameItemTemplate}">
</ListBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" VerticalAlignment="Top" HorizontalAlignment="Left">

<!-- Expense type and Amount table -->
<DataGrid ItemsSource="{Binding XPath=Expense}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" AutoGenerateColumns="False" RowHeaderWidth="0" >
<DataGrid AutomationProperties.Name="Expense report" ItemsSource="{Binding XPath=Expense}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" AutoGenerateColumns="False" RowHeaderWidth="0" >
<DataGrid.Columns>
<DataGridTextColumn Header="ExpenseType" Binding="{Binding XPath=@ExpenseType}" />
<DataGridTextColumn Header="Amount" Binding="{Binding XPath=@ExpenseAmount}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
</Border>

<ListBox Name="peopleListBox" Grid.Column="1" Grid.Row="2"
AutomationProperties.Name="Names"
ItemsSource="{Binding Source={StaticResource ExpenseDataSource}, XPath=Person}"
ItemTemplate="{StaticResource nameItemTemplate}">
</ListBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


<!-- Expense type and Amount table -->
<DataGrid ItemsSource="{Binding XPath=Expense}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" AutoGenerateColumns="False" RowHeaderWidth="0" >
<DataGrid AutomationProperties.Name="Expense Report" ItemsSource="{Binding XPath=Expense}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" AutoGenerateColumns="False" RowHeaderWidth="0" >

<DataGrid.Columns>
<DataGridTextColumn Header="ExpenseType" Binding="{Binding XPath=@ExpenseType}" />
Expand Down
6 changes: 3 additions & 3 deletions Sample Applications/CustomComboBox/Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<ColumnDefinition Width="1"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ToggleButton FocusVisualStyle="{x:Null}">
<ToggleButton FocusVisualStyle="{x:Null}" AutomationProperties.Name="Play">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
Expand Down Expand Up @@ -232,7 +232,7 @@
</Rectangle.Fill>
</Rectangle>
<Grid Grid.Column="2" Height="37">
<Button FocusVisualStyle="{x:Null}" Command="{Binding Command, RelativeSource={RelativeSource TemplatedParent}}"
<Button AutomationProperties.Name="Watch Now" FocusVisualStyle="{x:Null}" Command="{Binding Command, RelativeSource={RelativeSource TemplatedParent}}"
CommandParameter="{Binding ElementName=lstBx, Path=SelectedItem}"
Content="{TemplateBinding Content}">
<Button.Template>
Expand All @@ -259,7 +259,7 @@
</Grid>
</Grid>
</Border>
<ListBox Name="lstBx" BorderThickness="1" Height="0" Grid.Row="1" Style="{StaticResource listBoxStyle}"
<ListBox Name="lstBx" AutomationProperties.Name="Movies" BorderThickness="1" Height="0" Grid.Row="1" Style="{StaticResource listBoxStyle}"
FocusVisualStyle="{x:Null}"
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ItemsSource}"
DisplayMemberPath="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisplayMemberPath}"
Expand Down
10 changes: 5 additions & 5 deletions Sample Applications/DataBindingDemo/AddProductWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
Style="{StaticResource SmallTitleStyle}" Margin="0,5,0,5">
Item Description:
</TextBlock>
<TextBox Name="DescriptionEntryForm" Grid.Row="1" Grid.Column="1"
<TextBox Name="DescriptionEntryForm" AutomationProperties.Name="Item Description" Grid.Row="1" Grid.Column="1"
Text="{Binding Path=Description, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource TextStyleTextBox}" Margin="8,5,0,5" />

<TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource SmallTitleStyle}" Margin="0,5,0,5">Start Price:</TextBlock>

<TextBox Name="StartPriceEntryForm" Grid.Row="2" Grid.Column="1"
<TextBox Name="StartPriceEntryForm" AutomationProperties.Name="Start Price" Grid.Row="2" Grid.Column="1"
Style="{StaticResource TextStyleTextBox}" Margin="8,5,0,5">
<TextBox.Text>
<Binding Path="StartPrice" UpdateSourceTrigger="PropertyChanged">
Expand All @@ -69,7 +69,7 @@

<TextBlock Grid.Row="3" Grid.Column="0" Style="{StaticResource SmallTitleStyle}" Margin="0,5,0,5">Start Date:</TextBlock>

<TextBox Name="StartDateEntryForm" Grid.Row="3" Grid.Column="1"
<TextBox Name="StartDateEntryForm" AutomationProperties.Name="Start Date" Grid.Row="3" Grid.Column="1"
Validation.ErrorTemplate="{StaticResource ValidationTemplate}"
Style="{StaticResource TextStyleTextBox}" Margin="8,5,0,5">
<TextBox.Text>
Expand All @@ -83,7 +83,7 @@
</TextBox>

<TextBlock Grid.Row="4" Grid.Column="0" Style="{StaticResource SmallTitleStyle}" Margin="0,5,0,5">Category:</TextBlock>
<ComboBox Name="CategoryEntryForm" Grid.Row="4" Grid.Column="1"
<ComboBox Name="CategoryEntryForm" AutomationProperties.Name="Category" Grid.Row="4" Grid.Column="1"
SelectedValue="{Binding Path=Category}"
Style="{StaticResource ComboBoxStyle}"
ItemContainerStyle="{StaticResource ComboBoxItemStyle}" Margin="8,5,0,5">
Expand All @@ -96,7 +96,7 @@
</ComboBox>

<TextBlock Grid.Row="5" Grid.Column="0" Style="{StaticResource SmallTitleStyle}" Margin="0,5,0,5">Special Features:</TextBlock>
<ComboBox Name="SpecialFeaturesEntryForm" Grid.Row="5" Grid.Column="1"
<ComboBox Name="SpecialFeaturesEntryForm" AutomationProperties.Name="Special Features" Grid.Row="5" Grid.Column="1"
SelectedValue="{Binding Path=SpecialFeatures}"
Style="{StaticResource ComboBoxStyle}"
ItemContainerStyle="{StaticResource ComboBoxItemStyle}" Margin="8,5,0,5">
Expand Down
2 changes: 1 addition & 1 deletion Sample Applications/DataBindingDemo/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</CheckBox>


<ListBox Name="Master" Grid.Row="2" Grid.ColumnSpan="3" Margin="8"
<ListBox Name="Master" AutomationProperties.Name="Master" Grid.Row="2" Grid.ColumnSpan="3" Margin="8"
ItemsSource="{Binding Source={StaticResource ListingDataView}}">
<ListBox.GroupStyle>
<GroupStyle
Expand Down
31 changes: 15 additions & 16 deletions Sample Applications/EditingExaminerDemo/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@
<TabControl Name="MainTab" SelectionChanged="UpdateDisplayTabs">
<TabItem Name="RichTab" Header="RichTextBox"
AutomationProperties.HelpText="Make edits in this RichTextBox. As you edit, you can see what your edits look like in real time in the tabs below.">
<RichTextBox Name="MainEditor" TextChanged="UpdateDisplayTabs" AcceptsTab="True" Height="250"
<RichTextBox Name="MainEditor" AutomationProperties.Name="Rich Text" TextChanged="UpdateDisplayTabs" AcceptsTab="True" Height="250"
Width="800" VerticalScrollBarVisibility="Visible" />
</TabItem>
<TabItem Name="PanelTab" Header="Panel" AutomationProperties.HelpText="Panel Tab">
<TabItem Name="PanelTab" AutomationProperties.Name="Panel" Header="Panel" AutomationProperties.HelpText="Panel Tab">
<StackPanel />
</TabItem>
<TabItem Header="Help"
AutomationProperties.HelpText="Help Tab: The content in this tab explains how to use the demo.">
<TabItem Header="Help" AutomationProperties.Name="Help" AutomationProperties.HelpText="Help Tab: The content in this tab explains how to use the demo.">
<FlowDocumentScrollViewer Margin="10" Style="{StaticResource ScrollViewer}">
<FlowDocument
ColumnWidth="400"
ColumnWidth="400" AutomationProperties.Name="Help Text"
IsOptimalParagraphEnabled="True" IsHyphenationEnabled="True">
<Section FontSize="12">
<Paragraph FontSize="22" FontWeight="Bold">Introducing Editing Examiner</Paragraph>
Expand Down Expand Up @@ -153,13 +152,13 @@ Selection = RichTextBox.Selection;
<StackPanel Name="Panel2" Orientation="Horizontal">
<TabControl SelectionChanged="UpdateDisplayTabs" Name="TabControl" HorizontalContentAlignment="Left"
Width="400" Height="250">
<TabItem Header="DocumentTree"
<TabItem Header="DocumentTree"
AutomationProperties.HelpText="The DocumentTree Tab displays the entire TreeView of the document container. It demonstrates how to use the TextElementCollection features. It updates automatically on each TextChanged event of the RichTextBox. This allows you to visualize the document hierarchy.">
<TreeView Name="TextTreeView" />
<TreeView Name="TextTreeView" AutomationProperties.Name="Document Elements"/>
</TabItem>
<TabItem Header="SelectionXaml" Name="TabSelectionXaml"
<TabItem Header="SelectionXaml" Name="TabSelectionXaml"
AutomationProperties.HelpText="This tab displays the underlying XAML of the selected content within the RichTextBox.">
<TextBox Name="SelectionXaml" VerticalScrollBarVisibility="Visible"
<TextBox Name="SelectionXaml" VerticalScrollBarVisibility="Visible" AutomationProperties.Name="Selection Xaml"
AutomationProperties.HelpText="Displays underlying XAML of selected content of RichTextBox.">
<TextBox.ContextMenu>
<ContextMenu>
Expand All @@ -171,9 +170,9 @@ Selection = RichTextBox.Selection;
</TextBox.ContextMenu>
</TextBox>
</TabItem>
<TabItem Header="TextSerializedXaml" Name="TabTextSerializedXaml"
<TabItem Header="TextSerializedXaml" Name="TabTextSerializedXaml"
AutomationProperties.HelpText="By clicking on the Text Serialization tab, the underlying XAML is exposed, using WPF serialization features. The TreeView is instantly updated when the Tab is selected. You can edit your XAML content and set it back to the RichTextBox by right clicking and selecting the correct item.">
<TextBox Name="TextSerializedXaml" VerticalScrollBarVisibility="Visible"
<TextBox Name="TextSerializedXaml" AutomationProperties.Name="Text Serialized Xaml" VerticalScrollBarVisibility="Visible"
AutomationProperties.HelpText="Displays underlying XAML of RichTextBox.">
<TextBox.ContextMenu>
<ContextMenu>
Expand All @@ -185,9 +184,9 @@ Selection = RichTextBox.Selection;
</TextBox.ContextMenu>
</TextBox>
</TabItem>
<TabItem Header="CoreXaml" Name="TabCoreXaml"
<TabItem Header="CoreXaml" Name="TabCoreXaml"
AutomationProperties.HelpText="This tab accesses the WPF core parser in order to parse an object. The object can then be inserted back into the RichTextBox. Alternately you can use this view to see how the RichTextBox content is serialized back to XAML.">
<RichTextBox Name="CoreXaml" VerticalScrollBarVisibility="Visible">
<RichTextBox Name="CoreXaml" AutomationProperties.Name="Core Xaml" VerticalScrollBarVisibility="Visible">
<RichTextBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Cut" Command="Cut" />
Expand All @@ -206,16 +205,16 @@ Selection = RichTextBox.Selection;
Width="400" Height="25">
Immediate Window
</Label>
<TextBox Name="ImmediateWindow" Width="400" Height="205" VerticalScrollBarVisibility="Visible"
<TextBox Name="ImmediateWindow" AutomationProperties.Name="Immediate Window" Width="400" Height="205" VerticalScrollBarVisibility="Visible"
IsReadOnly="True"
AutomationProperties.HelpText="This provides an instant way to invoke methods, and get or set properties." />
<ComboBox Name="CommandInputBox" Width="400" IsEditable="True" LostFocus="CommandInputBox_FocusEvent"
<ComboBox Name="CommandInputBox" AutomationProperties.Name="Command input" Width="400" IsEditable="True" LostFocus="CommandInputBox_FocusEvent"
GotFocus="CommandInputBox_FocusEvent"
AutomationProperties.HelpText="This input box is for command input." />
</StackPanel>
</StackPanel>
<StackPanel Name="Panel4">
<TextBox Name="ErrorMessageBox" Height="60" IsReadOnly="True" Style="{StaticResource ErrorMessageTextBox}">No exception!</TextBox>
<TextBox Name="ErrorMessageBox" AutomationProperties.Name="Error Message Box" Height="60" IsReadOnly="True" Style="{StaticResource ErrorMessageTextBox}">No exception!</TextBox>
</StackPanel>
</StackPanel>
</Window>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<Label Style="{StaticResource Label}" Target="{Binding ElementName=aliasTextBox}" Grid.Column="2" Grid.Row="0">
Email _Alias:
</Label>
<TextBox Name="aliasTextBox" Style="{StaticResource ReadOnlyText}" Grid.Column="3" Grid.Row="0"
<TextBox Name="aliasTextBox" AutomationProperties.Name="Email Alias" Style="{StaticResource ReadOnlyText}" Grid.Column="3" Grid.Row="0"
Text="{Binding Path=Alias}">
<TextBox.ToolTip>
<TextBlock>email alias</TextBlock>
Expand All @@ -63,7 +63,7 @@
Grid.Row="1">
Employee _Number:
</Label>
<TextBox Name="employeeNumberTextBox" Style="{StaticResource ReadOnlyText}" Grid.Column="3"
<TextBox Name="employeeNumberTextBox" AutomationProperties.Name="Employee Number" Style="{StaticResource ReadOnlyText}" Grid.Column="3"
Grid.Row="1" Text="{Binding Path=EmployeeNumber}">
<TextBox.ToolTip>
<TextBlock>employee number</TextBlock>
Expand All @@ -75,7 +75,7 @@
Grid.Row="2">
_Cost Center:
</Label>
<TextBox Name="costCenterTextBox" Style="{StaticResource ReadOnlyText}" Grid.Column="3" Grid.Row="2"
<TextBox Name="costCenterTextBox" AutomationProperties.Name="Cost Center" Style="{StaticResource ReadOnlyText}" Grid.Column="3" Grid.Row="2"
Text="{Binding Path=CostCenter}">
<TextBox.ToolTip>
<TextBlock>cost center</TextBlock>
Expand All @@ -99,7 +99,7 @@
</Button>

<!-- View Chart Button-->
<Button Style="{StaticResource FunctionButton}" Click="viewChartButton_Click" Name="viewExpenseButton">
<Button Style="{StaticResource FunctionButton}" Click="viewChartButton_Click" Name="viewExpenseButton" AutomationProperties.Name="View Chart">
<Button.ToolTip>
<TextBlock>View chart</TextBlock>
</Button.ToolTip>
Expand All @@ -124,7 +124,8 @@
HeadersVisibility="Column"
Name="expenseDataGrid1"
AutoGenerateColumns="False"
CanUserAddRows="False">
CanUserAddRows="False"
AutomationProperties.Name="Expense Report">
<DataGrid.ToolTip>
<TextBlock>Expense Report</TextBlock>
</DataGrid.ToolTip>
Expand Down
Loading

0 comments on commit 45fa1a5

Please sign in to comment.