Exemple #1
0
        internal void ShowWindow()
        {
            Debug.Assert(this.dockManager != null, "Null RadDock reference.");
            if (this.dockManager == null)
            {
                return;
            }

            //ensure proper AutoHideButton state
            RadToggleButtonElement autoHideButton = this.ToolStrip.AutoHideButton;
            if (autoHideButton != null)
            {
                autoHideButton.ToggleState = ToggleState.Off;
            }

            bool animate = this.dockManager.AutoHideAnimation == AutoHideAnimateMode.AnimateShow ||
                            this.dockManager.AutoHideAnimation == AutoHideAnimateMode.Both;

            if (animate)
            {
                int animationFlags = (int)this.GetAnimationFlags(this.AutoHideDock, AnimationType.Slide, true);
                TelerikHelper.AnimateWindow(this.Handle, this.animationDuration, animationFlags);
                base.Show();
            }
            else
            {
                NativeMethods.ShowWindow(Handle, NativeMethods.SW_SHOWNOACTIVATE);
            }
        }
        /// <summary>
        /// HeaderPresenterElement
        /// </summary>
        /// <param name="toggleCollapseButton"></param>
        /// <param name="label"></param>
        public OrgHeaderPresenterElement(RadToggleButtonElement toggleCollapseButton, RadLabelElement label)
        {
            this.StretchVertically = false;

            this.label = label;
            this.label.StretchHorizontally = false;
            this.label.Font           = new Font(this.label.Font.FontFamily, 14);
            this.toggleCollapseButton = toggleCollapseButton;
            this.teamMembers          = new RadLabelElement();

            this.Children.Add(this.label);
            this.Children.Add(this.toggleCollapseButton);
            this.Children.Add(this.teamMembers);

            this.teamMembers.LabelFill.Visibility = Telerik.WinControls.ElementVisibility.Visible;

            this.teamMembers.ForeColor                = Color.White;
            this.teamMembers.LabelFill.BackColor      = Color.Black;
            this.teamMembers.LabelFill.NumberOfColors = 1;
            this.teamMembers.Click += this.teamMembers_Click;
        }
Exemple #3
0
        private void CreateCaption()
        {
            this.caption       = new ToolWindowCaptionElement();
            this.caption.Class = "ToolWindowCaption";
            this.caption.RadPropertyChanged += new RadPropertyChangedEventHandler(caption_RadPropertyChanged);

            this.captionFill = new FillPrimitive();
            this.captionFill.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
            this.captionFill.Class        = "TitleFill";
            this.caption.Children.Add(this.captionFill);

            this.captionBorder       = new BorderPrimitive();
            this.captionBorder.Class = "TitleBorder";
            this.caption.Children.Add(this.captionBorder);

            this.captionLayout        = new DockLayoutPanel();
            this.captionLayout.Class  = "CaptionButtonsLayout";
            this.captionLayout.Margin = new Padding(0, 2, 0, 2);
            this.caption.Children.Add(this.captionLayout);

            this.closeButton = new RadButtonElement();
            this.closeButton.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(1, 0, 1, 0));
            this.closeButton.Class = "CloseButton";
            this.closeButton.ButtonFillElement.Class = "CloseButtonFill";
            this.closeButton.MinSize   = new Size(7, 7);
            this.closeButton.ClickMode = ClickMode.Release;
            this.closeButton.Click    += new EventHandler(captionCloseButton_Click);
            DockLayoutPanel.SetDock(this.closeButton, Telerik.WinControls.Layouts.Dock.Right);
            this.captionLayout.Children.Add(closeButton);

            this.autoHideButton       = new RadToggleButtonElement();
            this.autoHideButton.Class = "AutoHideButton";
            this.autoHideButton.ButtonFillElement.Class = "AutoHideButtonFill";
            this.autoHideButton.MinSize = new Size(7, 7);
            this.autoHideButton.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(1, 0, 1, 0));
            this.autoHideButton.ClickMode   = ClickMode.Release;
            this.autoHideButton.ToggleState = ToggleState.On;
            this.autoHideButton.Click      += new EventHandler(captionAutoHideButton_Click);
            DockLayoutPanel.SetDock(this.autoHideButton, Telerik.WinControls.Layouts.Dock.Right);
            this.captionLayout.Children.Add(autoHideButton);

            this.actionMenuButton = new OverflowDropDownButtonElement();
            this.actionMenuButton.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(1, 0, 1, 0));
            this.actionMenuButton.ImageAlignment = System.Drawing.ContentAlignment.MiddleRight;
            this.actionMenuButton.ShowArrow      = false;
            this.actionMenuButton.Class          = "SystemDropDownButton";
            this.actionMenuButton.ActionButton.ButtonFillElement.Class = "SystemDropDownButtonFill";
            this.actionMenuButton.ActionButton.Class = "SystemDropDownActionButton";
            this.actionMenuButton.MinSize            = new Size(7, 7);
            this.actionMenuButton.DisplayStyle       = DisplayStyle.Image;
            this.actionMenuButton.Text = "";
            this.actionMenuButton.BorderElement.Visibility = ElementVisibility.Collapsed;
            this.actionMenuButton.MouseDown += new MouseEventHandler(captionSystemDownButton_MouseDown);
            DockLayoutPanel.SetDock(this.actionMenuButton, Telerik.WinControls.Layouts.Dock.Right);
            this.captionLayout.Children.Add(this.actionMenuButton);

            this.captionText       = new TextPrimitive();
            this.captionText.Text  = "ToolTabStrip";
            this.captionText.Class = "TitleCaption";
            this.captionText.StretchHorizontally = true;
            this.captionText.StretchVertically   = true;
            this.captionText.TextAlignment       = ContentAlignment.MiddleLeft;
            DockLayoutPanel.SetDock(this.captionText, Telerik.WinControls.Layouts.Dock.Left);
            this.captionLayout.Children.Add(captionText);
        }