mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Add automation properties
This commit is contained in:
parent
957859e393
commit
a91ca49faa
4 changed files with 36 additions and 23 deletions
|
@ -4258,7 +4258,7 @@
|
|||
<value>Hide equation</value>
|
||||
<comment>This is the tooltip/automation name shown when visibility is set to visible in the graphing calculator.</comment>
|
||||
</data>
|
||||
<data name="showEquationButtonAutomationName" xml:space="preserve">
|
||||
<data name="showEquationButtonAutomationName" xml:space="preserve">
|
||||
<value>Show equation %1</value>
|
||||
<comment>{Locked="%1"}, This is the tooltip/automation name shown when visibility is set to hidden in the graphing calculator. %1 is the equation number.</comment>
|
||||
</data>
|
||||
|
@ -4738,4 +4738,7 @@
|
|||
<value>To learn how you can contribute to Windows Calculator, visit the project on%HL%GitHub%HL%.</value>
|
||||
<comment>{Locked="%HL%GitHub%HL%"}. GitHub link, displayed on the settings page.</comment>
|
||||
</data>
|
||||
<data name="BackButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Back</value>
|
||||
</data>
|
||||
</root>
|
|
@ -97,13 +97,15 @@
|
|||
AutomationProperties.HeadingLevel="Level2"
|
||||
TextTrimming="Clip"/>
|
||||
|
||||
<TextBlock Margin="0,0,0,4"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
IsTextSelectionEnabled="True">
|
||||
<Run x:Name="SettingsVersion"/>
|
||||
<LineBreak/>
|
||||
<Run x:Name="SettingsCopyright"/>
|
||||
</TextBlock>
|
||||
<RichTextBlock Margin="0,0,0,4"
|
||||
Style="{StaticResource BodyRichTextBlockStyle}"
|
||||
IsTextSelectionEnabled="True">
|
||||
<Paragraph>
|
||||
<Run x:Name="SettingsVersion"/>
|
||||
<LineBreak/>
|
||||
<Run x:Name="SettingsCopyright"/>
|
||||
</Paragraph>
|
||||
</RichTextBlock>
|
||||
|
||||
<HyperlinkButton Margin="0,-2"
|
||||
HorizontalAlignment="Left"
|
||||
|
@ -134,20 +136,22 @@
|
|||
Style="{StaticResource ButtonRevealStyle}"
|
||||
Click="SettingsFeedbackButtonClick"/>
|
||||
|
||||
<TextBlock x:Name="SettingsContribute"
|
||||
Margin="0,12,12,6"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{ThemeResource BodyTextBlockStyle}"
|
||||
Foreground="{ThemeResource SystemControlPageTextBaseHighBrush}"
|
||||
TextWrapping="Wrap">
|
||||
<Run x:Name="ContributeRunBeforeLink"/>
|
||||
<Hyperlink NavigateUri="https://go.microsoft.com/fwlink/?linkid=2099939"
|
||||
TextDecorations="None"
|
||||
ToolTipService.ToolTip="https://go.microsoft.com/fwlink/?linkid=2099939">
|
||||
<Run x:Name="ContributeRunLink"/>
|
||||
</Hyperlink>
|
||||
<Run x:Name="ContributeRunAfterLink"/>
|
||||
</TextBlock>
|
||||
<RichTextBlock x:Name="SettingsContribute"
|
||||
Margin="0,12,12,6"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{ThemeResource BodyRichTextBlockStyle}"
|
||||
Foreground="{ThemeResource SystemControlPageTextBaseHighBrush}"
|
||||
TextWrapping="Wrap">
|
||||
<Paragraph>
|
||||
<Run x:Name="ContributeRunBeforeLink"/>
|
||||
<Hyperlink NavigateUri="https://go.microsoft.com/fwlink/?linkid=2099939"
|
||||
TextDecorations="None"
|
||||
ToolTipService.ToolTip="https://go.microsoft.com/fwlink/?linkid=2099939">
|
||||
<Run x:Name="ContributeRunLink"/>
|
||||
</Hyperlink>
|
||||
<Run x:Name="ContributeRunAfterLink"/>
|
||||
</Paragraph>
|
||||
</RichTextBlock>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
|
|
@ -38,7 +38,7 @@ SettingsPage::SettingsPage()
|
|||
this->SetVersionString();
|
||||
this->SetCopyrightString();
|
||||
this->InitializeContributeTextBlock();
|
||||
SettingsLightTheme->Focus(::FocusState::Keyboard);
|
||||
SetDefaultFocus();
|
||||
|
||||
if (themevalue != nullptr)
|
||||
{
|
||||
|
@ -90,6 +90,11 @@ void SettingsPage::OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventA
|
|||
}
|
||||
}
|
||||
|
||||
void SettingsPage::SetDefaultFocus()
|
||||
{
|
||||
SettingsLightTheme->Focus(::FocusState::Programmatic);
|
||||
}
|
||||
|
||||
void SettingsPage::InitializeContributeTextBlock()
|
||||
{
|
||||
auto resourceLoader = AppResourceProvider::GetInstance();
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace CalculatorApp
|
|||
|
||||
private:
|
||||
Platform::String ^ m_currentTheme;
|
||||
void SetDefaultFocus();
|
||||
void InitializeContributeTextBlock();
|
||||
void BackButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
||||
void ColorSettingsButtonClicked(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs ^ e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue