From 17fdde66d94155fc62a034fa6658995bef6fd6e5 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 22 Mar 2016 13:02:25 -0700 Subject: Initial import --- Xamarin.Forms.Platform.UAP/FormsCommandBar.cs | 37 + Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml | 199 ++++ .../IToolBarForegroundBinder.cs | 10 + Xamarin.Forms.Platform.UAP/MasterDetailControl.cs | 222 ++++ .../MasterDetailPageRenderer.cs | 312 ++++++ Xamarin.Forms.Platform.UAP/PageControl.xaml | 10 + .../Properties/AssemblyInfo.cs | 60 ++ .../Properties/Xamarin.Forms.Platform.UAP.rd.xml | 33 + Xamarin.Forms.Platform.UAP/Resources.xaml | 1091 ++++++++++++++++++++ Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs | 208 ++++ Xamarin.Forms.Platform.UAP/StepperControl.cs | 227 ++++ Xamarin.Forms.Platform.UAP/TabbedPageRenderer.cs | 264 +++++ .../Xamarin.Forms.Platform.UAP.csproj | 450 ++++++++ Xamarin.Forms.Platform.UAP/project.json | 16 + 14 files changed, 3139 insertions(+) create mode 100644 Xamarin.Forms.Platform.UAP/FormsCommandBar.cs create mode 100644 Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml create mode 100644 Xamarin.Forms.Platform.UAP/IToolBarForegroundBinder.cs create mode 100644 Xamarin.Forms.Platform.UAP/MasterDetailControl.cs create mode 100644 Xamarin.Forms.Platform.UAP/MasterDetailPageRenderer.cs create mode 100644 Xamarin.Forms.Platform.UAP/PageControl.xaml create mode 100644 Xamarin.Forms.Platform.UAP/Properties/AssemblyInfo.cs create mode 100644 Xamarin.Forms.Platform.UAP/Properties/Xamarin.Forms.Platform.UAP.rd.xml create mode 100644 Xamarin.Forms.Platform.UAP/Resources.xaml create mode 100644 Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs create mode 100644 Xamarin.Forms.Platform.UAP/StepperControl.cs create mode 100644 Xamarin.Forms.Platform.UAP/TabbedPageRenderer.cs create mode 100644 Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj create mode 100644 Xamarin.Forms.Platform.UAP/project.json (limited to 'Xamarin.Forms.Platform.UAP') diff --git a/Xamarin.Forms.Platform.UAP/FormsCommandBar.cs b/Xamarin.Forms.Platform.UAP/FormsCommandBar.cs new file mode 100644 index 00000000..2ca665af --- /dev/null +++ b/Xamarin.Forms.Platform.UAP/FormsCommandBar.cs @@ -0,0 +1,37 @@ +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; + +namespace Xamarin.Forms.Platform.UWP +{ + public class FormsCommandBar : CommandBar + { + Windows.UI.Xaml.Controls.Button _moreButton; + + public FormsCommandBar() + { + PrimaryCommands.VectorChanged += OnCommandsChanged; + SecondaryCommands.VectorChanged += OnCommandsChanged; + } + + protected override void OnApplyTemplate() + { + base.OnApplyTemplate(); + _moreButton = GetTemplateChild("MoreButton") as Windows.UI.Xaml.Controls.Button; + UpdateMore(); + } + + void OnCommandsChanged(IObservableVector sender, IVectorChangedEventArgs args) + { + UpdateMore(); + } + + void UpdateMore() + { + if (_moreButton == null) + return; + + _moreButton.Visibility = PrimaryCommands.Count > 0 || SecondaryCommands.Count > 0 ? Visibility.Visible : Visibility.Collapsed; + } + } +} \ No newline at end of file diff --git a/Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml b/Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml new file mode 100644 index 00000000..c573552a --- /dev/null +++ b/Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Visible + + + + + + + + + + + + + +