예제 #1
0
 protected override void CreateChildElements()
 {
     this.StretchHorizontally = true;
     this.StretchVertically   = true;
     this.GradientStyle       = GradientStyles.Solid;
     this.headerItem          = new BackstageVisualElement();
     this.headerItem.DrawText = false;
     this.headerItem.DrawFill = true;
     this.headerItem.MinSize  = new Size(0, 3);
     this.headerItem.Class    = "BackstageViewHeader";
     this.Children.Add((RadElement)this.headerItem);
     this.titleBarElement       = new RadTitleBarElement();
     this.titleBarElement.Class = "TitleBar";
     this.titleBarElement.TitlePrimitive.Alignment = ContentAlignment.MiddleCenter;
     this.titleBarElement.Close           += new TitleBarSystemEventHandler(this.titleBarElement_Close);
     this.titleBarElement.Minimize        += new TitleBarSystemEventHandler(this.titleBarElement_Minimize);
     this.titleBarElement.MaximizeRestore += new TitleBarSystemEventHandler(this.titleBarElement_MaximizeRestore);
     this.Children.Add((RadElement)this.titleBarElement);
     this.itemsElement          = new BackstageItemsPanelElement(this);
     this.itemsElement.DrawFill = true;
     this.Children.Add((RadElement)this.itemsElement);
     this.contentElement          = new BackstageContentPanelElement();
     this.contentElement.DrawFill = true;
     this.Children.Add((RadElement)this.contentElement);
     base.CreateChildElements();
 }
예제 #2
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            BackstageItemsPanelElement parent = this.Parent as BackstageItemsPanelElement;

            if (parent != null)
            {
                parent.Owner.OnItemClicked(this);
            }
        }
예제 #3
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            if (this.ElementTree == null || this.ElementTree.Control == null)
            {
                return;
            }
            BackstageItemsPanelElement parent = this.Parent as BackstageItemsPanelElement;

            parent.Owner.OnItemClicked((BackstageVisualElement)this);
            parent.Owner.SelectedItem = this;
        }
예제 #4
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            if (this.ElementTree != null && this.ElementTree.Control != null)
            {
                BackstageItemsPanelElement parentElement = (this.Parent as BackstageItemsPanelElement);
                Debug.Assert(parentElement != null, "BackstageTabItem can only be placed in BackstageItemsPanelElement.");

                parentElement.Owner.OnItemClicked(this);

                parentElement.Owner.SelectedItem = this;
            }
        }
예제 #5
0
        protected override void CreateChildElements()
        {
            this.StretchHorizontally = true;
            this.StretchVertically   = true;
            this.GradientStyle       = GradientStyles.Solid;

            this.headerItem          = new BackstageVisualElement();
            this.headerItem.DrawText = false;
            this.headerItem.DrawFill = true;
            this.headerItem.MinSize  = new Size(0, 3);
            this.headerItem.Class    = "BackstageViewHeader";
            this.Children.Add(headerItem);

            this.itemsElement          = new BackstageItemsPanelElement(this);
            this.itemsElement.DrawFill = true;
            this.Children.Add(itemsElement);

            this.contentElement          = new BackstageContentPanelElement();
            this.contentElement.DrawFill = true;
            this.Children.Add(contentElement);

            base.CreateChildElements();
        }