Exemplo n.º 1
0
 /// <summary></summary>
 /// <param name="owner"></param>
 /// <param name="text"></param>
 /// <param name="image"></param>
 /// <param name="content"></param>
 public PpsWindowPaneObjectInfo(PpsWindowPaneCharmBarControl owner, string text = null, object image = null, object content = null)
 {
     this.owner   = owner ?? throw new ArgumentNullException(nameof(owner));
     this.text    = text;
     this.image   = image;
     this.content = content;
 }         // ctor
Exemplo n.º 2
0
        }         // ctor

        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            charmBarControl  = (PpsWindowPaneCharmBarControl)GetTemplateChild("PART_CharmBar");
            controlPresenter = (ContentPresenter)GetTemplateChild("PART_Control");
            commandBar       = (PpsCommandBar)GetTemplateChild("PART_CommandBar");

            var currentPane = CurrentPane;

            if (currentPane != null)
            {
                charmBarControl.CurrentData = currentPane.CurrentData;
                charmBarControl.HelpKey     = currentPane.HelpKey;
            }

            CommandManager.AddExecutedHandler(this, PaneManager.Shell.DefaultExecutedHandler);
            CommandManager.AddCanExecuteHandler(this, PaneManager.Shell.DefaultCanExecuteHandler);

            UpdateFocus(false);
        }         // proc OnApplyTemplate