Пример #1
0
            protected override void InitializeTextElement()
            {
                base.InitializeTextElement();
                this.TextBoxElement.TextBoxItem.NullText = "Enter search criteria";
                searchButton.Click += new EventHandler(button_Click);
                searchButton.Margin = new Padding(0, 0, 0, 0);
                searchButton.Text   = string.Empty;
                searchButton.Image  = Properties.Resources.SearchIcon;

                StackLayoutElement stackPanel = new StackLayoutElement();

                stackPanel.Orientation = Orientation.Horizontal;
                stackPanel.Margin      = new Padding(1, 0, 1, 0);
                stackPanel.Children.Add(searchButton);
                RadTextBoxItem tbItem = this.TextBoxElement.TextBoxItem;

                this.TextBoxElement.Children.Remove(tbItem);

                DockLayoutPanel dockPanel = new DockLayoutPanel();

                dockPanel.Children.Add(stackPanel);
                dockPanel.Children.Add(tbItem);
                DockLayoutPanel.SetDock(tbItem, Telerik.WinControls.Layouts.Dock.Left);
                DockLayoutPanel.SetDock(stackPanel, Telerik.WinControls.Layouts.Dock.Right);
                this.TextBoxElement.Children.Add(dockPanel);
            }
Пример #2
0
        protected override void OnTabStripAlignmentChanged(EventArgs e)
        {
            switch (this.TabStripAlignment)
            {
            case TabStripAlignment.Top:
                this.documentButtonsLayout.Alignment = ContentAlignment.TopRight;
                this.documentButtonsLayout.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(0, 2, 0, 0));
                DockLayoutPanel.SetDock(this.closeButton, Telerik.WinControls.Layouts.Dock.Right);
                DockLayoutPanel.SetDock(this.overflowMenuButton, Telerik.WinControls.Layouts.Dock.Right);
                break;

            case TabStripAlignment.Bottom:
                this.documentButtonsLayout.Alignment = ContentAlignment.BottomRight;
                this.documentButtonsLayout.SetDefaultValueOverride(RadElement.MarginProperty, new Padding(0, 0, 0, 2));
                DockLayoutPanel.SetDock(this.closeButton, Telerik.WinControls.Layouts.Dock.Right);
                DockLayoutPanel.SetDock(this.overflowMenuButton, Telerik.WinControls.Layouts.Dock.Right);
                break;

            case TabStripAlignment.Left:
                this.documentButtonsLayout.Alignment = ContentAlignment.BottomLeft;
                DockLayoutPanel.SetDock(this.closeButton, Telerik.WinControls.Layouts.Dock.Top);
                DockLayoutPanel.SetDock(this.overflowMenuButton, Telerik.WinControls.Layouts.Dock.Top);
                break;

            case TabStripAlignment.Right:
                this.documentButtonsLayout.Alignment = ContentAlignment.BottomRight;
                DockLayoutPanel.SetDock(this.closeButton, Telerik.WinControls.Layouts.Dock.Top);
                DockLayoutPanel.SetDock(this.overflowMenuButton, Telerik.WinControls.Layouts.Dock.Top);
                break;
            }

            this.tabStripElement.ItemContainer.BringToFront();

            base.OnTabStripAlignmentChanged(e);
        }
Пример #3
0
        protected override void InitializeFields()
        {
            base.InitializeFields();

            this.text       = new TextPrimitive();
            this.text.Class = "AlertWindowTextCaptionText";

            this.closeButton = new RadButtonElement();
            this.closeButton.SetDefaultValueOverride(RadButtonItem.DisplayStyleProperty, DisplayStyle.Image);
            this.closeButton.ThemeRole = "AlertCloseButton";

            this.pinButton = new RadToggleButtonElement();
            this.pinButton.SetDefaultValueOverride(RadButtonItem.DisplayStyleProperty, DisplayStyle.Image);
            this.pinButton.ThemeRole = "AlertWindowPinButton";

            this.optionsButton = new RadDropDownButtonElement();
            this.optionsButton.ArrowButton.SetDefaultValueOverride(RadElement.VisibilityProperty, ElementVisibility.Collapsed);
            this.optionsButton.ThemeRole = "AlertWindowOptionsButton";

            this.buttonsLayoutPanel            = new StackLayoutPanel();
            this.buttonsLayoutPanel.Class      = "AlertWindowButtonsLayoutPanel";
            this.mainLayoutPanel               = new DockLayoutPanel();
            this.mainLayoutPanel.Class         = "AlertWindowMainLayoutPanel";
            this.mainLayoutPanel.LastChildFill = true;

            this.MinSize = new System.Drawing.Size(0, 15);
        }
        public Point ShowControl(RadDirection popupDirection, int ownerOffset)
        {
            bool flag = false;

            this.DropDownAnimationDirection = popupDirection;
            if (this.OwnerElement is RadDateTimePickerElement)
            {
                this.SizingGrip.MinSize                = new Size(10, 10);
                this.SizingGrip.Visibility             = ElementVisibility.Visible;
                this.SizingGrip.GripItemNSEW.Alignment = ContentAlignment.BottomRight;
            }
            if (this.SizingGrip != null)
            {
                if (flag)
                {
                    DockLayoutPanel.SetDock((RadElement)this.SizingGrip, Dock.Top);
                }
                else
                {
                    DockLayoutPanel.SetDock((RadElement)this.SizingGrip, Dock.Bottom);
                }
            }
            if (!(this.OwnerElement as RadDateTimePickerElement).RightToLeft)
            {
                this.SizingGrip.RightToLeft = false;
            }
            else
            {
                this.SizingGrip.RightToLeft = true;
            }
            this.AutoUpdateBounds();
            this.ShowPopup(this.OwnerControl.RectangleToScreen(this.OwnerElement.ControlBoundingRectangle));
            return(this.Location);
        }
Пример #5
0
        protected override void CreateChildItems(RadElement parent)
        {
            base.CreateChildItems(parent);
            panel = new StackLayoutPanel();
            panel.StretchVertically = false;

            addButton                     = new RadButtonElement();
            addButton.Text                = "AddButton";
            addButton.MinSize             = new Size(200, 20);
            addButton.StretchVertically   = true;
            addButton.StretchHorizontally = true;
            addButton.Click              += this.AddButton_Click;
            panel.Children.Add(addButton);


            deleteButton                     = new RadButtonElement();
            deleteButton.Text                = "DeleteButton";
            deleteButton.MinSize             = new Size(200, 20);
            deleteButton.StretchVertically   = true;
            deleteButton.StretchHorizontally = true;
            deleteButton.Click              += this.DeleteButton_Click;
            panel.Children.Add(deleteButton);
            base.SizingGripDockLayout.Children.Insert(1, this.panel);

            DockLayoutPanel.SetDock(this.SizingGrip, Telerik.WinControls.Layouts.Dock.Bottom);
            DockLayoutPanel.SetDock(panel, Telerik.WinControls.Layouts.Dock.Bottom);
        }
Пример #6
0
        public void ShowControl(RadDirection popupDirection, int ownerOffset)
		{
			if (this.Visible)
				return;

			bool corected = false;
			Point location = RadPopupHelper.GetValidLocationForDropDown(popupDirection,
				this.Size, this.OwnerElement, ownerOffset, ref corected);

			if (this.grip != null)
			{
				if (corected)
					DockLayoutPanel.SetDock(grip, Telerik.WinControls.Layouts.Dock.Top);		
				else
					DockLayoutPanel.SetDock(grip, Telerik.WinControls.Layouts.Dock.Bottom);		
			}

            this.Location = location;

			this.AutoUpdateBounds();
			if (this.AnimationEnabled)
			{
				this.AnimateDropDown(true);
			}
			else
			{
				this.Show();
			}
        }
Пример #7
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            this.dockLayout = new DockLayoutPanel();
            this.dockLayout.StretchHorizontally = true;
            this.dockLayout.StretchVertically   = false;

            this.label = new RadLabelElement();
            this.label.SetValue(DockLayoutPanel.DockProperty, (this.RightToLeft) ? Dock.Right : Dock.Left);
            this.label.Class    = "FooterDate";
            this.label.TextWrap = false;

            this.todayButtonElement      = new RadButtonElement();
            this.todayButtonElement.Text = "Today";
            this.todayButtonElement.SetValue(DockLayoutPanel.DockProperty, (this.RightToLeft) ? Dock.Left : Dock.Right);
            this.todayButtonElement.Margin = new Padding(5, 0, 5, 0);
            this.todayButtonElement.Click += new EventHandler(todayButtonElement_Click);

            this.clearButtonElement      = new RadButtonElement();
            this.clearButtonElement.Text = "Clear";
            this.clearButtonElement.SetValue(DockLayoutPanel.DockProperty, (this.RightToLeft) ? Dock.Left : Dock.Right);
            this.clearButtonElement.Margin     = new Padding(5, 0, 5, 0);
            this.clearButtonElement.Visibility = ElementVisibility.Visible;
            this.clearButtonElement.Click     += new EventHandler(clearButtonElement_Click);

            this.dockLayout.Children.Add(this.todayButtonElement);
            this.dockLayout.Children.Add(this.clearButtonElement);
            this.dockLayout.Children.Add(this.label);

            this.Children.Add(this.dockLayout);
        }
Пример #8
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            //init section
            this.GroupHolderStackLayout.Orientation = Orientation.Vertical;
            this.gripElement.SizingMode             = SizingMode.UpDownAndRightBottom;
            this.scrollViewer.Viewport              = this.GroupHolderStackLayout;
            this.scrollViewer.ShowFill              = true;
            this.scrollViewer.ShowBorder            = false;
            this.scrollViewer.HorizontalScrollState = ScrollState.AlwaysHide;
            this.scrollViewer.ScrollLayoutPanel.MeasureWithAvaibleSize = true;
            this.mainLayout.LastChildFill = true;

            this.menuElement.AllItemsEqualHeight = true;

            //dock
            DockLayoutPanel.SetDock(this.filtersDropDownButton, Dock.Top);
            DockLayoutPanel.SetDock(this.gripElement, Dock.Bottom);
            DockLayoutPanel.SetDock(this.menuElement, Dock.Bottom);
            this.scrollViewer.Class             = "RadGalleryPopupScrollViewer";
            this.scrollViewer.FillElement.Class = "RadGalleryPopupScrollViewerFill";

            //children section
            this.gripElement.SizingMode = this.dropDownSizingMode;
            this.mainLayout.Children.Add(this.filtersDropDownButton);
            this.mainLayout.Children.Add(this.gripElement);
            this.mainLayout.Children.Add(this.menuElement);
            this.mainLayout.Children.Add(this.scrollViewer);
            this.Children.Add(this.mainLayout);

            this.WireEvents();//resize events
        }
Пример #9
0
        private void InitializeChildren()
        {
            this.dockLayout = new DockLayoutPanel();
            if (this.Calendar.MultiViewRows == 1 && this.Calendar.MultiViewColumns == 1)
            {
                this.calendarVisualElement = new MonthViewElement(this.calendar, this.calendar.DefaultView);
            }
            else
            {
                this.calendarVisualElement = new MultiMonthViewElement(this.calendar, this.calendar.DefaultView);
            }

            this.calendarStatusElement = new CalendarStatusElement(this);
            this.calendarStatusElement.SetValue(DockLayoutPanel.DockProperty, Dock.Bottom);
            this.calendarStatusElement.SetValue(BoxLayout.StripPositionProperty, BoxLayout.StripPosition.Last);
            if (true == this.Calendar.ShowFooter)
            {
                this.calendarStatusElement.Visibility = ElementVisibility.Visible;
            }

            this.dockLayout.Children.Add(this.calendarStatusElement);
            this.calendarNavigationElement = new CalendarNavigationElement(this);
            this.CalendarNavigationElement.SetValue(DockLayoutPanel.DockProperty, Dock.Top);
            this.calendarNavigationElement.SetValue(BoxLayout.StripPositionProperty, BoxLayout.StripPosition.First);
            this.calendarNavigationElement.Visibility = (this.Calendar.ShowHeader) ? ElementVisibility.Visible : ElementVisibility.Collapsed;
            this.dockLayout.Children.Add(this.calendarNavigationElement);
            this.dockLayout.Children.Add(this.calendarVisualElement);
            this.Children.Add(this.dockLayout);
        }
Пример #10
0
        protected override void OnRightToLeftChanged(EventArgs e)
        {
            base.OnRightToLeftChanged(e);

            DockLayoutPanel.SetDock(this.captionText,
                                    (this.RightToLeft == System.Windows.Forms.RightToLeft.Yes) ?
                                    Telerik.WinControls.Layouts.Dock.Right :
                                    Telerik.WinControls.Layouts.Dock.Left);

            DockLayoutPanel.SetDock(this.actionMenuButton,
                                    (this.RightToLeft == System.Windows.Forms.RightToLeft.Yes) ?
                                    Telerik.WinControls.Layouts.Dock.Left :
                                    Telerik.WinControls.Layouts.Dock.Right);

            DockLayoutPanel.SetDock(this.autoHideButton,
                                    (this.RightToLeft == System.Windows.Forms.RightToLeft.Yes) ?
                                    Telerik.WinControls.Layouts.Dock.Left :
                                    Telerik.WinControls.Layouts.Dock.Right);

            DockLayoutPanel.SetDock(this.closeButton,
                                    (this.RightToLeft == System.Windows.Forms.RightToLeft.Yes) ?
                                    Telerik.WinControls.Layouts.Dock.Left :
                                    Telerik.WinControls.Layouts.Dock.Right);

            this.captionText.TextAlignment = (this.RightToLeft == System.Windows.Forms.RightToLeft.Yes) ? ContentAlignment.MiddleRight : ContentAlignment.MiddleLeft;
        }
Пример #11
0
        protected override void CreateChildElements()
        {
            this.LastChildFill   = true;
            this.BorderThickness = Padding.Empty;

            this.header        = new RadLabelElement();
            this.header.Margin = new Padding(0, 0, 0, 4);
            DockLayoutPanel.SetDock(this.header, Telerik.WinControls.Layouts.Dock.Top);
            this.Children.Add(this.header);

            this.viewer = new RadScrollViewer();
            this.viewer.BorderThickness = Padding.Empty;
            this.viewer.ShowBorder      = false;
            this.viewer.ShowFill        = false;
            //we do not vertical scrollbar
            this.viewer.VerticalScrollState = ScrollState.AlwaysHide;

            this.itemsPanel             = new WrapLayoutPanel();
            this.itemsPanel.Orientation = Orientation.Vertical;

            RadCanvasViewport viewport = new RadCanvasViewport();

            viewport.Children.Add(this.itemsPanel);
            this.viewer.Viewport = viewport;

            this.Children.Add(this.viewer);
        }
Пример #12
0
 private RadElement CreateWindowPanesList()
 {
     this.documentWindowList = new QuickNavigatorList();
     this.documentWindowList.Header.LabelText.Class = "QuickNavigatorDocumentWindowListHeader";
     this.documentWindowList.Header.Class           = "QuickNavigatorDocumentWindowListHeaderLabel";
     DockLayoutPanel.SetDock(this.documentWindowList, Telerik.WinControls.Layouts.Dock.Left);
     return(this.documentWindowList);
 }
Пример #13
0
 protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
 {
     base.OnPropertyChanged(e);
     if (e.Property == RadElement.RightToLeftProperty)
     {
         DockLayoutPanel.SetDock(this.text, (this.RightToLeft) ? Dock.Right : Dock.Left);
         DockLayoutPanel.SetDock(this.buttonsLayoutPanel, (this.RightToLeft) ? Dock.Left : Dock.Right);
     }
 }
Пример #14
0
        protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
        {
            base.OnPropertyChanged(e);

            if (e.Property == RightToLeftProperty)
            {
                DockLayoutPanel.SetDock(this.stackLayout, (bool)e.NewValue ? Dock.Left : Dock.Right);
            }
        }
Пример #15
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parent"></param>
        protected override void CreateChildItems(RadElement parent)
        {
            base.CreateChildItems(parent);

            this.documentButtonsLayout       = new DockLayoutPanel();
            this.documentButtonsLayout.Class = "documentButtonsLayout";
            this.documentButtonsLayout.StretchHorizontally = false;
            this.documentButtonsLayout.StretchVertically   = false;
            this.documentButtonsLayout.Alignment           = ContentAlignment.TopRight;
            this.documentButtonsLayout.ZIndex = 10;
            this.documentButtonsLayout.Margin = new Padding(0, 2, 0, 0);

            //window.Children.Add(documentButtonsLayout);
            this.splitPanelElement.Children.Add(documentButtonsLayout);
            this.tabStripElement.ContentArea.Visibility = ElementVisibility.Visible;

            this.closeButton       = new RadButtonElement();
            this.closeButton.Class = "CloseButton";
            this.closeButton.ButtonFillElement.Class = "CloseButtonFill";
            this.closeButton.SetDefaultValueOverride(RadElement.MarginProperty, new System.Windows.Forms.Padding(0, 0, 2, 0));
            this.closeButton.ClickMode           = ClickMode.Release;
            this.closeButton.Click              += new EventHandler(closeButton_Click);
            this.closeButton.ZIndex              = 5;
            this.closeButton.StretchHorizontally = false;
            this.closeButton.StretchVertically   = false;

            DockLayoutPanel.SetDock(closeButton, Telerik.WinControls.Layouts.Dock.Right);
            this.documentButtonsLayout.Children.Add(closeButton);

            this.overflowMenuButton = new OverflowDropDownButtonElement();
            this.overflowMenuButton.SetDefaultValueOverride(RadElement.MarginProperty, new System.Windows.Forms.Padding(0, 0, 2, 0));
            this.overflowMenuButton.ImageAlignment                       = System.Drawing.ContentAlignment.MiddleRight;
            this.overflowMenuButton.ShowArrow                            = false;
            this.overflowMenuButton.Class                                = "OverflowDropDownButton";
            this.overflowMenuButton.DisplayStyle                         = DisplayStyle.Image;
            this.overflowMenuButton.BorderElement.Visibility             = ElementVisibility.Collapsed;
            this.overflowMenuButton.ActionButton.Class                   = "OverflowDropDownActionButton";
            this.overflowMenuButton.ActionButton.ButtonFillElement.Class = "OverflowDropDownButtonFill";
            this.overflowMenuButton.StretchHorizontally                  = false;
            this.overflowMenuButton.StretchVertically                    = false;
            this.overflowMenuButton.MouseDown                           += new System.Windows.Forms.MouseEventHandler(activeDocumentsMenuDropDownButton_MouseDown);
            this.overflowMenuButton.ZIndex                               = 10;
            DockLayoutPanel.SetDock(overflowMenuButton, Telerik.WinControls.Layouts.Dock.Right);
            this.documentButtonsLayout.Children.Add(this.overflowMenuButton);

            this.tabStripElement.Alignment      = ContentAlignment.TopLeft;
            this.tabStripElement.StripAlignment = StripViewAlignment.Top;
            this.tabStripElement.AllowDrag      = true;
            this.splitPanelElement.Visibility   = ElementVisibility.Hidden;

            this.tabStripElement.ItemContainer.BringToFront();

            this.SetToolTips();
        }
Пример #16
0
 /// <summary>
 /// Returns a flag indicating whether the sizing element is at the bottom of the window.
 /// If true, the size of the popup should increase. If false, the size should decrease.
 /// </summary>
 /// <returns></returns>
 private bool IsSizerAtBottom()
 {
     if (this.UseNewLayoutSystem)
     {
         return(DockLayoutPanel.GetDock(this.Parent) == Dock.Bottom);
     }
     else
     {
         return(this.Parent.Alignment == ContentAlignment.BottomCenter);
     }
 }
Пример #17
0
        protected override void OnDropDownOpening(CancelEventArgs e)
        {
            base.OnDropDownOpening(e);

            if (this.ComboBoxElement.ListBoxElement.Parent != null)
            {
                DockLayoutPanel p = (DockLayoutPanel)this.ComboBoxElement.ListBoxElement.Parent;
                p.Children.Remove(this.ComboBoxElement.ListBoxElement);
                p.Children.Add(_h);
            }
        }
Пример #18
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.buttonsLayoutPanel.Children.Add((RadElement)this.optionsButton);
     this.buttonsLayoutPanel.Children.Add((RadElement)this.pinButton);
     this.buttonsLayoutPanel.Children.Add((RadElement)this.closeButton);
     this.mainLayoutPanel.Children.Add((RadElement)this.buttonsLayoutPanel);
     this.mainLayoutPanel.Children.Add((RadElement)this.text);
     DockLayoutPanel.SetDock((RadElement)this.text, this.RightToLeft ? Dock.Right : Dock.Left);
     DockLayoutPanel.SetDock((RadElement)this.buttonsLayoutPanel, this.RightToLeft ? Dock.Left : Dock.Right);
     this.Children.Add((RadElement)this.mainLayoutPanel);
 }
        public PropertyGridUITypeEditorElement(Type editedType)
        {
            this.EditedType = editedType;
            DockLayoutPanel dockLayoutPanel = new DockLayoutPanel();

            dockLayoutPanel.LastChildFill = true;
            this.Children.Remove((RadElement)this.TextBoxItem);
            this.TextBoxItem.Alignment = ContentAlignment.MiddleLeft;
            dockLayoutPanel.Children.Add((RadElement)this.editorButton);
            dockLayoutPanel.Children.Add((RadElement)this.TextBoxItem);
            this.Children.Add((RadElement)dockLayoutPanel);
        }
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
     this.fill         = new FillPrimitive();
     this.fill.Class   = "TitleFill";
     this.Children.Add((RadElement)this.fill);
     this.layout = new DockLayoutPanel();
     this.layout.StretchVertically   = true;
     this.layout.StretchHorizontally = true;
     this.layout.LastChildFill       = false;
     this.Children.Add((RadElement)this.layout);
     this.systemButtons                         = new StackLayoutPanel();
     this.systemButtons.ZIndex                  = 10;
     this.systemButtons.Alignment               = ContentAlignment.MiddleRight;
     this.minimizeButton                        = (RadButtonElement) new RadImageButtonElement();
     this.minimizeButton.StretchHorizontally    = false;
     this.minimizeButton.StretchVertically      = false;
     this.minimizeButton.Class                  = "MinimizeButton";
     this.minimizeButton.ButtonFillElement.Name = "MinimizeButtonFill";
     this.minimizeButton.CanFocus               = false;
     this.minimizeButton.ThemeRole              = "MDIStripMinimizeButton";
     this.systemButtons.Children.Add((RadElement)this.minimizeButton);
     this.maximizeButton = (RadButtonElement) new RadImageButtonElement();
     this.maximizeButton.StretchHorizontally = false;
     this.maximizeButton.StretchVertically   = false;
     this.maximizeButton.Class = "MaximizeButton";
     this.maximizeButton.ButtonFillElement.Name = "MaximizeButtonFill";
     this.maximizeButton.CanFocus  = false;
     this.maximizeButton.ThemeRole = "MDIStripMaximizeButton";
     this.systemButtons.Children.Add((RadElement)this.maximizeButton);
     this.closeButton = (RadButtonElement) new RadImageButtonElement();
     this.closeButton.StretchHorizontally = false;
     this.closeButton.StretchVertically   = false;
     this.closeButton.Class = "CloseButton";
     this.closeButton.ButtonFillElement.Name = "CloseButtonFill";
     this.closeButton.CanFocus  = false;
     this.closeButton.ThemeRole = "MDIStripCloseButton";
     this.systemButtons.Children.Add((RadElement)this.closeButton);
     this.mdiFormIcon       = new ImagePrimitive();
     this.mdiFormIcon.Class = "MdiStripIcon";
     this.mdiFormIcon.StretchHorizontally = false;
     this.mdiFormIcon.StretchVertically   = false;
     this.mdiFormIcon.CanFocus            = false;
     this.mdiFormIcon.Margin      = new Padding(1, 1, 0, 0);
     this.mdiFormIcon.MaxSize     = new Size(16, 16);
     this.mdiFormIcon.ImageLayout = ImageLayout.Stretch;
     this.layout.Children.Add((RadElement)this.mdiFormIcon);
     this.layout.Children.Add((RadElement)this.systemButtons);
     DockLayoutPanel.SetDock((RadElement)this.systemButtons, Dock.Right);
     DockLayoutPanel.SetDock((RadElement)this.mdiFormIcon, Dock.Left);
 }
Пример #21
0
        public ToolbarTextBoxElement()
        {
            RadTextBoxItem textBoxItem = this.TextBoxItem;

            this.Children.Remove((RadElement)textBoxItem);
            this.SetSearchButonLocation();
            this.dockPanel = new DockLayoutPanel();
            this.dockPanel.LastChildFill = true;
            this.dockPanel.Children.Add((RadElement)this.searchButton);
            this.dockPanel.Children.Add((RadElement)textBoxItem);
            this.Children.Add((RadElement)this.dockPanel);
            this.RadPropertyChanged += new RadPropertyChangedEventHandler(this.ToolbarTextBoxElement_RadPropertyChanged);
        }
Пример #22
0
 private void SetDockingAlignmentUponRtlChange(bool rtlState)
 {
     if (rtlState)
     {
         DockLayoutPanel.SetDock((RadElement)this.titleBarIcon, Dock.Right);
         DockLayoutPanel.SetDock((RadElement)this.systemButtons, Dock.Left);
     }
     else
     {
         DockLayoutPanel.SetDock((RadElement)this.titleBarIcon, Dock.Left);
         DockLayoutPanel.SetDock((RadElement)this.systemButtons, Dock.Right);
     }
 }
Пример #23
0
 protected override void CreateChildItems(RadElement parent)
 {
     base.CreateChildItems(parent);
     this.sizingGrip                 = new SizeGripElement();
     this.sizingGrip.SizingMode      = SizingMode.None;
     this.sizingGrip.MinSize         = new Size(0, 12);
     this.sizingGripDockLayout       = new DockLayoutPanel();
     this.sizingGripDockLayout.Class = "PopupPanel";
     this.sizingGripDockLayout.Children.Add((RadElement)this.sizingGrip);
     this.sizingGripDockLayout.LastChildFill = true;
     DockLayoutPanel.SetDock((RadElement)this.sizingGrip, Dock.Bottom);
     parent.Children.Add((RadElement)this.sizingGripDockLayout);
 }
Пример #24
0
        private void SetupDockPanelLayout()
        {
            var xtraScrollableControl = new XtraScrollableControl();

            xtraScrollableControl.Dock = DockStyle.Fill;
            var dockLayoutPanel = new DockLayoutPanel {
                Dock = DockStyle.Fill, AutoScroll = true
            };

            _currentGridLayout = dockLayoutPanel;
            xtraScrollableControl.Controls.Add(dockLayoutPanel);
            xtraTabPageResultsGrid.Controls.Add(xtraScrollableControl);
        }
Пример #25
0
        protected virtual void InitializeChildren()
        {
            this.DisposeChildren();
            this.dockLayout   = new DockLayoutPanel();
            this.titleElement = new TitleElement();
            int num = (int)this.titleElement.SetValue(DockLayoutPanel.DockProperty, (object)Dock.Top);

            this.titleElement.StretchVertically = false;
            this.titleElement.Text       = "Some Text Here";
            this.titleElement.Visibility = ElementVisibility.Collapsed;
            this.dockLayout.Children.Add((RadElement)this.titleElement);
            this.CreateTableElement();
            this.Children.Add((RadElement)this.dockLayout);
        }
Пример #26
0
        public GridSearchCellTextBoxElement()
        {
            RadTextBoxItem textBoxItem = this.TextBoxItem;

            this.Children.Remove((RadElement)textBoxItem);
            this.SetSearchButonLocation();
            this.dockPanel = new DockLayoutPanel();
            this.dockPanel.LastChildFill = true;
            this.dockPanel.Alignment     = ContentAlignment.MiddleLeft;
            this.dockPanel.Children.Add((RadElement)this.searchInfoLabel);
            this.dockPanel.Children.Add((RadElement)textBoxItem);
            this.Children.Add((RadElement)this.dockPanel);
            this.RadPropertyChanged += new RadPropertyChangedEventHandler(this.GridSearchCellTextBoxElement_RadPropertyChanged);
        }
Пример #27
0
        protected override void CreateChildItems(RadElement parent)
        {
            DockLayoutPanel panel = new DockLayoutPanel();
            panel.Class = "PopupPanel";

            grip = new SizeGripElement();
			grip.SizingMode = SizingMode.None;
            DockLayoutPanel.SetDock(grip, Telerik.WinControls.Layouts.Dock.Bottom);
            panel.Children.Add(grip);

            if (this.popupListBoxElement != null)
                panel.Children.Add(this.popupListBoxElement);

            parent.Children.Add(panel);
        }
Пример #28
0
        protected override void CreateChildElements()
        {
            this.Padding = new Padding(1);

            //create header
            this.header = new RadLabelElement();
            this.header.TextAlignment         = ContentAlignment.MiddleLeft;
            this.header.Class                 = HeaderClass;
            this.header.borderPrimitive.Class = "QuickNavigatorHeaderBorder";
            this.header.LabelFill.Class       = "QuickNavigatorHeaderFill";
            this.header.LabelText.Class       = "QuickNavigatorHeaderText";

            DockLayoutPanel.SetDock(this.header, Telerik.WinControls.Layouts.Dock.Top);
            this.Children.Add(this.header);

            //create footer
            this.footer       = new RadLabelElement();
            this.footer.Class = FooterClass;
            this.footer.borderPrimitive.Class = "QuickNavigatorFooterBorder";
            this.footer.LabelFill.Class       = "QuickNavigatorFooterFill";
            this.footer.LabelText.Class       = "QuickNavigatorFooterText";
            this.footer.TextAlignment         = ContentAlignment.MiddleLeft;
            DockLayoutPanel.SetDock(this.footer, Telerik.WinControls.Layouts.Dock.Bottom);
            this.Children.Add(this.footer);

            //a strip layout panel that will hold tool windows, documents and preview
            this.listPanel = new DockLayoutPanel();
            this.listPanel.LastChildFill = true;
            this.listPanel.Margin        = new Padding(4);

            //create tool window list
            this.listPanel.Children.Add(this.CreateToolPanesList());
            //create document window list
            this.listPanel.Children.Add(this.CreateWindowPanesList());

            //create the preview - a simple label
            this.preview       = new RadLabelElement();
            this.preview.Class = PreviewClass;
            DockLayoutPanel.SetDock(this.preview, Telerik.WinControls.Layouts.Dock.Left);
            this.listPanel.Children.Add(this.preview);

            this.contentFill       = new FillPrimitive();
            this.contentFill.Class = "QuickNavigatorContentFill";
            this.contentFill.Children.Add(this.listPanel);

            //add the list content as the last child of the main panel
            this.Children.Add(this.contentFill);
        }
Пример #29
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parent"></param>
        protected override void CreateChildItems(RadElement parent)
        {
            base.CreateChildItems(parent);

            this.CreateCaption();
            this.window               = new DockLayoutPanel();
            this.window.Margin        = this.GetDefaultWindowMargin();
            this.window.FitToSizeMode = RadFitToSizeMode.FitToParentBounds;
            this.splitPanelElement.Children.Add(this.window);
            DockLayoutPanel.SetDock(this.caption, Telerik.WinControls.Layouts.Dock.Top);
            this.window.Children.Add(this.caption);
            this.window.Children.Add(this.tabStripElement);

            this.tabStripElement.ItemFitMode = StripViewItemFitMode.Shrink;

            this.SetToolTips();
        }
Пример #30
0
        public ToolbarTextBoxElement()
        {
            RadTextBoxItem item = this.TextBoxItem;

            this.Children.Remove(item);

            this.searchButton.SetValue(DockLayoutPanel.DockProperty, Dock.Right);

            DockLayoutPanel dockPanel = new DockLayoutPanel();

            dockPanel.LastChildFill = true;

            dockPanel.Children.Add(this.searchButton);
            dockPanel.Children.Add(item);

            this.Children.Add(dockPanel);
        }