예제 #1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (LeftWindowCommands == null)
            {
                LeftWindowCommands = new WindowCommands();
            }
            if (RightWindowCommands == null)
            {
                RightWindowCommands = new WindowCommands();
            }
            if (WindowButtonCommands == null)
            {
                WindowButtonCommands = new WindowButtonCommands();
            }
            if (HamburgerMenuBox == null)
            {
                HamburgerMenuBox = new HamburgerMenuBox();
            }

            WindowButtonCommands.ParentWindow = this;

            var windowTitleBar = GetTemplateChild(WINDOW_TITLE_BAR) as UIElement;

            if (windowTitleBar != null)
            {
                windowTitleBar.MouseMove += NiansiWindowTitleBar_MouseMove;
            }
        }
예제 #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.HamburgerMenuBox = ((NiansiThemes.Wpf.HamburgerMenuBox)(target));
         return;
     }
     this._contentLoaded = true;
 }