diff options
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) { |