diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-06-17 03:10:18 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-06-17 11:10:18 +0100 |
commit | 925fc0aa588a060eb23fa16c1d225dd030012c23 (patch) | |
tree | 83676c25c29d97d9250516b217020ba85425796d /Xamarin.Forms.Core/MenuItem.cs | |
parent | d44396a4534b1e2bc81143c809e4adaee656ab15 (diff) | |
download | xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.gz xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.bz2 xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.zip |
Prep Cell & friends for removal of InternalsVisibleTo (#142)
* Prep Cell & friends for removal of InternalsVisibleTo
Includes:
- Cell
- EntryCell
- ListView
- MenuItem
- TableView
- ViewCell
- Toolbar
Moved extensions to Internal & removed TPH
* Update docs
* [Controls] Ignore Issue2411 on iOS <9
* [Controls] Formatting for Issue2411
Diffstat (limited to 'Xamarin.Forms.Core/MenuItem.cs')
-rw-r--r-- | Xamarin.Forms.Core/MenuItem.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Xamarin.Forms.Core/MenuItem.cs b/Xamarin.Forms.Core/MenuItem.cs index 3e830445..84ad0327 100644 --- a/Xamarin.Forms.Core/MenuItem.cs +++ b/Xamarin.Forms.Core/MenuItem.cs @@ -3,7 +3,7 @@ using System.Windows.Input; namespace Xamarin.Forms { - public class MenuItem : BaseMenuItem + public class MenuItem : BaseMenuItem, IMenuItemController { public static readonly BindableProperty TextProperty = BindableProperty.Create("Text", typeof(string), typeof(MenuItem), null); @@ -19,6 +19,14 @@ namespace Xamarin.Forms internal static readonly BindableProperty IsEnabledProperty = BindableProperty.Create("IsEnabled", typeof(bool), typeof(ToolbarItem), true); + string IMenuItemController.IsEnabledPropertyName + { + get + { + return IsEnabledProperty.PropertyName; + } + } + public ICommand Command { get { return (ICommand)GetValue(CommandProperty); } @@ -55,6 +63,14 @@ namespace Xamarin.Forms set { SetValue(IsEnabledProperty, value); } } + bool IMenuItemController.IsEnabled + { + get + { + return IsEnabled; + } + } + bool IsEnabledCore { set { SetValueCore(IsEnabledProperty, value); } @@ -69,7 +85,7 @@ namespace Xamarin.Forms handler(this, EventArgs.Empty); } - internal void Activate() + void IMenuItemController.Activate() { if (Command != null) { |