Esempio n. 1
0
        public void SetCommandBar(CommandBar commandBar)
        {
            if (_commandBarVisibilityToken > 0)
            {
                _commandBar.UnregisterPropertyChangedCallback(CommandBar.VisibilityProperty, _commandBarVisibilityToken);
                _commandBarVisibilityToken = -1;
            }

            _commandBar = commandBar;
            if (_isInitialized)
            {
                if (_commandBar != null)
                {
                    _commandBarVisibilityToken = _commandBar.RegisterPropertyChangedCallback(CommandBar.VisibilityProperty, OnCommandBarVisibilityChanged);
                }
                _commandBarContainer.Content = _commandBar;
                SetCommandBarVerticalAlignment(this.CommandBarVerticalAlignment);
            }
        }
Esempio n. 2
0
        public void SetCommandBar(CommandBar commandBar)
        {
            if (_commandBarVisibilityToken > 0)
            {
                _commandBar.UnregisterPropertyChangedCallback(CommandBar.VisibilityProperty, _commandBarVisibilityToken);
                _commandBarVisibilityToken = -1;
            }

            _commandBar = commandBar;
            if (_isInitialized)
            {
                if (_commandBar != null)
                {
                    _commandBarVisibilityToken = _commandBar.RegisterPropertyChangedCallback(CommandBar.VisibilityProperty, OnCommandBarVisibilityChanged);
                }
                _commandBarContainer.Content = _commandBar;
                SetCommandBarVerticalAlignment(this.CommandBarVerticalAlignment);
            }
        }