Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            BackstageItemsPanelElement parent = this.Parent as BackstageItemsPanelElement;

            if (parent != null)
            {
                parent.Owner.OnItemClicked(this);
            }
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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();
        }