internal void AddItem(BindableApplicationBar applicationBar) { if (!_isAttached) { _applicationBar = applicationBar; if (this is BindableApplicationBarIconButton) { _applicationBar.InternalApplicationBar.Buttons.Add(InternalItem); } else { _applicationBar.InternalApplicationBar.MenuItems.Add(InternalItem); } if (Command != null) { IsEnabled = Command.CanExecute(CommandParameter); } _isAttached = true; } }
/// <summary> /// Sets the Application Bar of the page. /// </summary> /// <param name="obj">The page. </param> /// <param name="value">The <see cref="BindableApplicationBar"/>.</param> public static void SetApplicationBar(PhoneApplicationPage obj, BindableApplicationBar value) { obj.SetValue(ApplicationBarProperty, value); }
public static void SetApplicationBar(PhoneApplicationPage obj, BindableApplicationBar value) { obj.SetValue(ApplicationBarProperty, value); }
public BindableApplicationBarIconButtonCollection(BindableApplicationBar applicationBar) : base(applicationBar) { }
public BindableApplicationBarMenuItemCollection(BindableApplicationBar applicationBar) : base(applicationBar) { }
protected BindableApplicationBarItemCollection(BindableApplicationBar applicationBar) { ApplicationBar = applicationBar; CollectionChanged += OnCollectionChanged; }
internal void AddItem(BindableApplicationBar applicationBar) { if (!_isAttached) { _applicationBar = applicationBar; if (this is BindableApplicationBarIconButton) _applicationBar.InternalApplicationBar.Buttons.Add(InternalItem); else _applicationBar.InternalApplicationBar.MenuItems.Add(InternalItem); if (Command != null) IsEnabled = Command.CanExecute(CommandParameter); _isAttached = true; } }