Add preview tag to Graphing feature (#907)

* Add preview tag to Graphing

* Fix Graph Settings button in dark mode
This commit is contained in:
Rudy Huyn
2020-01-08 10:34:05 -08:00
committed by Eric Wong
parent 4ac76c66da
commit f9c049a84b
11 changed files with 200 additions and 35 deletions

View File

@@ -0,0 +1,57 @@
<UserControl x:Class="CalculatorApp.Controls.PreviewTagControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="300"
d:DesignWidth="400"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<Style x:Key="PreviewTagRectStyle" TargetType="Rectangle">
<Setter Property="Opacity" Value="0.86"/>
<Setter Property="Fill" Value="{ThemeResource SystemAccentColor}"/>
</Style>
<Style x:Key="PreviewTagTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Margin" Value="4,0,4,1"/>
</Style>
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<Style x:Key="PreviewTagRectStyle" TargetType="Rectangle">
<Setter Property="Opacity" Value="0.86"/>
<Setter Property="Fill" Value="{ThemeResource SystemAccentColor}"/>
</Style>
<Style x:Key="PreviewTagTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Margin" Value="4,0,4,1"/>
</Style>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<Style x:Key="PreviewTagRectStyle" TargetType="Rectangle">
<Setter Property="Fill" Value="{ThemeResource SystemColorWindowBrush}"/>
<Setter Property="Stroke" Value="{ThemeResource SystemColorWindowTextBrush}"/>
<Setter Property="StrokeThickness" Value="1"/>
</Style>
<Style x:Key="PreviewTagTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{ThemeResource SystemColorWindowTextBrush}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Margin" Value="6,2,6,3"/>
</Style>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Rectangle Style="{ThemeResource PreviewTagRectStyle}"
RadiusX="2"
RadiusY="2"/>
<TextBlock Style="{ThemeResource PreviewTagTextStyle}"
FontWeight="SemiBold"
Text="Preview"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,23 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "pch.h"
#include "PreviewTagControl.xaml.h"
using namespace CalculatorApp;
using namespace CalculatorApp::Controls;
using namespace Platform;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Controls::Primitives;
using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation;
PreviewTagControl::PreviewTagControl()
{
InitializeComponent();
}

View File

@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "Controls\PreviewTagControl.g.h"
namespace CalculatorApp::Controls
{
[Windows::Foundation::Metadata::WebHostHidden]
public ref class PreviewTagControl sealed
{
public:
PreviewTagControl();
};
}