示例#1
0
        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;
            }
        }
示例#2
0
 /// <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);
 }
示例#3
0
		public static void SetApplicationBar(PhoneApplicationPage obj, BindableApplicationBar value)
		{
			obj.SetValue(ApplicationBarProperty, value);
		}
示例#4
0
 public BindableApplicationBarIconButtonCollection(BindableApplicationBar applicationBar)
     : base(applicationBar)
 {
 }
示例#5
0
 public BindableApplicationBarMenuItemCollection(BindableApplicationBar applicationBar)
     : base(applicationBar)
 {
 }
示例#6
0
 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;
            }
        }