From 517642b551cab99c3b123a923ad20ad6ca429633 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Wed, 27 Mar 2019 19:52:12 +0100 Subject: [PATCH] [C] alias shell names (#5624) * [C] alias shell names * - change from ShellTab to Tab --- Xamarin.Forms.Core/Shell/Shell.cs | 3 ++- Xamarin.Forms.Core/Shell/ShellContent.cs | 6 +++++- Xamarin.Forms.Core/Shell/ShellItem.cs | 7 ++++++- Xamarin.Forms.Core/Shell/ShellSection.cs | 7 ++++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Xamarin.Forms.Core/Shell/Shell.cs b/Xamarin.Forms.Core/Shell/Shell.cs index 29e2e51..8dc8852 100644 --- a/Xamarin.Forms.Core/Shell/Shell.cs +++ b/Xamarin.Forms.Core/Shell/Shell.cs @@ -12,7 +12,7 @@ using Xamarin.Forms.Internals; namespace Xamarin.Forms { - [ContentProperty("Items")] + [ContentProperty(nameof(Items))] public class Shell : Page, IShellController, IPropertyPropagationController { public static readonly BindableProperty BackButtonBehaviorProperty = @@ -640,6 +640,7 @@ namespace Xamarin.Forms } public ShellItemCollection Items => (ShellItemCollection)GetValue(ItemsProperty); + public ShellItemCollection Flyout => Items; public DataTemplate ItemTemplate { get => (DataTemplate)GetValue(ItemTemplateProperty); diff --git a/Xamarin.Forms.Core/Shell/ShellContent.cs b/Xamarin.Forms.Core/Shell/ShellContent.cs index 4bdbb69..843e24f 100644 --- a/Xamarin.Forms.Core/Shell/ShellContent.cs +++ b/Xamarin.Forms.Core/Shell/ShellContent.cs @@ -12,7 +12,11 @@ using Xamarin.Forms.Internals; namespace Xamarin.Forms { - [ContentProperty("Content")] + public class TabContent : ShellContent + { + } + + [ContentProperty(nameof(Content))] public class ShellContent : BaseShellItem, IShellContentController { static readonly BindablePropertyKey MenuItemsPropertyKey = diff --git a/Xamarin.Forms.Core/Shell/ShellItem.cs b/Xamarin.Forms.Core/Shell/ShellItem.cs index a6b78b5..a8d0a7c 100644 --- a/Xamarin.Forms.Core/Shell/ShellItem.cs +++ b/Xamarin.Forms.Core/Shell/ShellItem.cs @@ -7,7 +7,12 @@ using Xamarin.Forms.Internals; namespace Xamarin.Forms { - [ContentProperty("Items")] + public class FlyoutItem : ShellItem + { + public ShellSectionCollection Tabs => Items; + } + + [ContentProperty(nameof(Items))] public class ShellItem : ShellGroupItem, IShellItemController, IElementConfiguration, IPropertyPropagationController { #region PropertyKeys diff --git a/Xamarin.Forms.Core/Shell/ShellSection.cs b/Xamarin.Forms.Core/Shell/ShellSection.cs index 56e612a..0d05786 100644 --- a/Xamarin.Forms.Core/Shell/ShellSection.cs +++ b/Xamarin.Forms.Core/Shell/ShellSection.cs @@ -8,7 +8,12 @@ using Xamarin.Forms.Internals; namespace Xamarin.Forms { - [ContentProperty("Items")] + public class Tab : ShellSection + { + public ShellContentCollection Content => Items; + } + + [ContentProperty(nameof(Items))] public class ShellSection : ShellGroupItem, IShellSectionController, IPropertyPropagationController { #region PropertyKeys -- 2.7.4