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