Add reset button to settings flyout (#1073)
This commit is contained in:
@@ -4226,6 +4226,10 @@
|
||||
<value>Units</value>
|
||||
<comment>Heading for Unit's on the settings</comment>
|
||||
</data>
|
||||
<data name="ResetViewButton.Content" xml:space="preserve">
|
||||
<value>Reset view</value>
|
||||
<comment>Hyperlink button to reset the view of the graph</comment>
|
||||
</data>
|
||||
<data name="GraphSettingsXMax.Header" xml:space="preserve">
|
||||
<value>X-Max</value>
|
||||
<comment>X maximum value header</comment>
|
||||
|
@@ -102,11 +102,19 @@
|
||||
FontSize="20"
|
||||
FontWeight="Medium"
|
||||
AutomationProperties.HeadingLevel="Level1"/>
|
||||
<TextBlock x:Name="GridHeading"
|
||||
x:Uid="GridHeading"
|
||||
Margin="0,12,0,6"
|
||||
Style="{StaticResource SubTitleTextBoxStyle}"
|
||||
AutomationProperties.HeadingLevel="Level2"/>
|
||||
<Grid Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:Name="GridHeading"
|
||||
x:Uid="GridHeading"
|
||||
Style="{StaticResource SubTitleTextBoxStyle}"
|
||||
AutomationProperties.HeadingLevel="Level2"/>
|
||||
<HyperlinkButton x:Uid="ResetViewButton"
|
||||
Grid.Column="1"
|
||||
Click="ResetViewButton_Clicked"/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
|
@@ -61,3 +61,8 @@ void GraphingSettings::RefreshRanges()
|
||||
{
|
||||
ViewModel->InitRanges();
|
||||
}
|
||||
|
||||
void GraphingSettings::ResetViewButton_Clicked(Object ^ sender, RoutedEventArgs ^ e)
|
||||
{
|
||||
ViewModel->ResetView();
|
||||
}
|
||||
|
@@ -23,5 +23,6 @@ namespace CalculatorApp
|
||||
void RefreshRanges();
|
||||
private:
|
||||
void GridSettingsTextBox_PreviewKeyDown(Platform::Object ^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs ^ e);
|
||||
void ResetViewButton_Clicked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user