Esempio n. 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;
            }
        }
Esempio n. 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);
 }
Esempio n. 3
0
		public static void SetApplicationBar(PhoneApplicationPage obj, BindableApplicationBar value)
		{
			obj.SetValue(ApplicationBarProperty, value);
		}
Esempio n. 4
0
 public BindableApplicationBarIconButtonCollection(BindableApplicationBar applicationBar)
     : base(applicationBar)
 {
 }
Esempio n. 5
0
 public BindableApplicationBarMenuItemCollection(BindableApplicationBar applicationBar)
     : base(applicationBar)
 {
 }
Esempio n. 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;
            }
        }