diff --git a/FluentWeather.Uwp/Controls/HistoricalWeatherGauge.xaml b/FluentWeather.Uwp/Controls/HistoricalWeatherGauge.xaml new file mode 100644 index 0000000..e2b2f8b --- /dev/null +++ b/FluentWeather.Uwp/Controls/HistoricalWeatherGauge.xaml @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FluentWeather.Uwp/Controls/HistoricalWeatherGauge.xaml.cs b/FluentWeather.Uwp/Controls/HistoricalWeatherGauge.xaml.cs new file mode 100644 index 0000000..225e5fb --- /dev/null +++ b/FluentWeather.Uwp/Controls/HistoricalWeatherGauge.xaml.cs @@ -0,0 +1,50 @@ +using FluentWeather.Abstraction.Models; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +//https://go.microsoft.com/fwlink/?LinkId=234236 上介绍了“用户控件”项模板 + +namespace FluentWeather.Uwp.Controls +{ + public sealed partial class HistoricalWeatherGauge : UserControl + { + public HistoricalWeatherGauge() + { + this.InitializeComponent(); + } + + public HistoricalDailyWeatherBase HistoricalDailyWeather + { + get => (HistoricalDailyWeatherBase)GetValue(HistoricalDailyWeatherProperty); + set => SetValue(HistoricalDailyWeatherProperty, value); + } + + public static readonly DependencyProperty HistoricalDailyWeatherProperty = + DependencyProperty.Register(nameof(HistoricalDailyWeather), typeof(HistoricalDailyWeatherBase), typeof(HistoricalWeatherGauge), new PropertyMetadata(default)); + + + + public WeatherDailyBase WeatherToday + { + get => (WeatherDailyBase)GetValue(WeatherTodayProperty); + set => SetValue(WeatherTodayProperty, value); + } + + public static readonly DependencyProperty WeatherTodayProperty = + DependencyProperty.Register(nameof(WeatherToday), typeof(WeatherDailyBase), typeof(HistoricalWeatherGauge), new PropertyMetadata(default)); + + + } +} diff --git a/FluentWeather.Uwp/FluentWeather.Uwp.csproj b/FluentWeather.Uwp/FluentWeather.Uwp.csproj index 4d9f65f..c733212 100644 --- a/FluentWeather.Uwp/FluentWeather.Uwp.csproj +++ b/FluentWeather.Uwp/FluentWeather.Uwp.csproj @@ -172,6 +172,9 @@ UpdateDialog.xaml + + HistoricalWeatherGauge.xaml + HourlyDataChart.xaml @@ -489,6 +492,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/FluentWeather.Uwp/Pages/MainPage.xaml b/FluentWeather.Uwp/Pages/MainPage.xaml index 3572187..6f5180d 100644 --- a/FluentWeather.Uwp/Pages/MainPage.xaml +++ b/FluentWeather.Uwp/Pages/MainPage.xaml @@ -66,6 +66,7 @@ Duration="0:0:0.8" /> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + + + + + + @@ -34,12 +34,12 @@ - - - - - - + + + + + +