Beispiel #1
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);
        }
Beispiel #2
0
        private void CollapseChunkToDropDown()
        {
            this.ExpandElementToStep((int)ChunkVisibilityState.Expanded);

            ExpandableStackLayout.InvalidateAll(this);

            SizeF thisSize = this.DesiredSize;

            this.elementWithCaptionLayoutPanel.SuspendThemeRefresh();
            this.Children.Remove(this.elementWithCaptionLayoutPanel);
            this.elementWithCaptionLayoutPanel.ResumeThemeRefresh();

            RadItem item = new RadItem();

            item.UseNewLayoutSystem = true;
            item.AutoSizeMode       = RadAutoSizeMode.WrapAroundChildren;
            item.Children.Add(this.elementWithCaptionLayoutPanel);
            item.MaxSize = new Size(0, thisSize.ToSize().Height);
            item.MinSize = thisSize.ToSize();
            RadDropDownMenu menu = this.dropDownElement.DropDownMenu;
            //remove left column from Menu
            RadDropDownMenuElement menuPopup = (RadDropDownMenuElement)menu.PopupElement;
            StackLayoutPanel       menuStack = menuPopup.LayoutPanel as StackLayoutPanel;

            Debug.Assert(menuStack != null, "Chunk menu stack is null");
            menuStack.Orientation = this.Orientation;
            menuPopup.Layout.LeftColumnMinWidth = 0;
            this.dropDownElement.Items.Add(item);
            //fix for Missing theme if chunk is not expanded
            this.dropDownElement.Visibility = ElementVisibility.Visible;
            this.CollapseStep = (int)ChunkVisibilityState.Collapsed;
            menu.SetTheme();
            menu.MouseUp += new MouseEventHandler(this.menu_MouseUp);
        }
Beispiel #3
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            this.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;

            this.systemButtons           = new StackLayoutPanel();
            this.systemButtons.Class     = "RibbonMDIButtonsStackLayout";
            this.systemButtons.Alignment = ContentAlignment.MiddleRight;
            base.Children.Add(this.systemButtons);

            this.minimizeButton        = new RadImageButtonElement();
            this.minimizeButton.Class  = "RibbonMDIMinimizeButton";
            this.minimizeButton.Click += new EventHandler(this.OnMinimize);
            this.minimizeButton.Image  = Properties.Resources.MDIminimize;

            this.systemButtons.Children.Add(minimizeButton);

            this.maximizeButton        = new RadImageButtonElement();
            this.maximizeButton.Class  = "RibbonMDIMaximizeButton";
            this.maximizeButton.Click += new EventHandler(this.OnMaximizeRestore);
            this.maximizeButton.Image  = Properties.Resources.MDImaximize;
            this.systemButtons.Children.Add(maximizeButton);

            this.closeButton        = new RadImageButtonElement();
            this.closeButton.Class  = "RibbonMDICloseButton";
            this.closeButton.Click += new EventHandler(this.OnClose);
            this.closeButton.Image  = Properties.Resources.MDIclose;
            this.systemButtons.Children.Add(closeButton);

            this.Visibility = ElementVisibility.Collapsed;
        }
 protected override void InitializeFields()
 {
     base.InitializeFields();
     this.captionGrip           = new AlertWindowCaptionGrip();
     this.textAndButtonsElement = new AlertWindowTextAndSystemButtonsElement();
     this.mainLayoutPanel       = new StackLayoutPanel();
 }
Beispiel #5
0
        protected override void CreateChildElements()
        {
            fill                = new FillPrimitive();
            fill.BackColor      = Color.FromArgb(253, 253, 253);
            fill.BackColor2     = Color.FromArgb(112, 112, 112);
            fill.NumberOfColors = 2;
            fill.GradientStyle  = GradientStyles.Linear;
            fill.GradientAngle  = 90;
            fill.AutoSizeMode   = RadAutoSizeMode.FitToAvailableSize;
            this.Children.Add(fill);

            border = new BorderPrimitive();
            border.GradientStyle = GradientStyles.Solid;
            border.ForeColor     = Color.FromArgb(0, 0, 0);
            border.AutoSizeMode  = RadAutoSizeMode.FitToAvailableSize;

            this.Children.Add(border);

            panel             = new StackLayoutPanel();
            panel.Orientation = System.Windows.Forms.Orientation.Horizontal;
            //panel.Margin = new System.Windows.Forms.Padding(0, 20, 10, 0);
            panel.Alignment           = ContentAlignment.MiddleCenter;
            panel.StretchHorizontally = false;
            this.Children.Add(panel);

            this.items.Owner = panel;
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            stackLayout             = new StackLayoutPanel();
            stackLayout.Orientation = System.Windows.Forms.Orientation.Horizontal;

            non_timed_option          = new RadRadioButtonElement();
            non_timed_option.Text     = "Non-Timed Session";
            non_timed_option.Margin   = new Padding(5, 3, 0, 0);
            non_timed_option.MouseUp += Non_timed_option_MouseUp;

            timed_option          = new RadRadioButtonElement();
            timed_option.Text     = "Timed Session";
            timed_option.Margin   = new Padding(5, 3, 0, 0);
            timed_option.MouseUp += Timed_option_MouseUp;


            duration               = new RadSpinEditorElement();
            duration.Value         = 50;
            duration.MaxValue      = 999;
            duration.MinValue      = 1;
            duration.AutoSize      = false;
            duration.Size          = new Size(50, 30);
            duration.Margin        = new Padding(5, 5, 0, 0);
            duration.Visibility    = ElementVisibility.Hidden;
            duration.ValueChanged += Duration_ValueChanged;

            stackLayout.Children.Add(non_timed_option);
            stackLayout.Children.Add(timed_option);
            stackLayout.Children.Add(duration);

            this.Children.Add(this.stackLayout);
        }
Beispiel #7
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);
        }
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.searchTextBox = this.CreateSearchTextBox();
     this.Children.Add((RadElement)this.searchTextBox);
     this.waitingBar = this.CreateWaitingBarElement();
     this.Children.Add((RadElement)this.waitingBar);
     this.findPreviousButton = this.CreateFindPreviousButton();
     this.Children.Add((RadElement)this.findPreviousButton);
     this.findNextButton = this.CreateFindNextButton();
     this.Children.Add((RadElement)this.findNextButton);
     this.matchCaseButton                   = this.CreateMatchCaseButton();
     this.chooseColumnsMenuItem             = this.CreateChooseColumnsMenuItem();
     this.matchCaseMenuItem                 = this.CreateMatchCaseMenuItem();
     this.searchFromCurrentPositionMenuItem = this.CreateSearchFromCurrentPositionMenuItem();
     this.optionsButton = this.CreateOptionsButton();
     this.Children.Add((RadElement)this.optionsButton);
     this.buttonsStack        = new StackLayoutPanel();
     this.buttonsStack.Margin = new Padding(0, 1, 0, 2);
     this.Children.Add((RadElement)this.buttonsStack);
     this.closeButton        = this.CreateCloseButton();
     this.closeButton.Class  = "SearchRowCloseButton";
     this.closeButton.Click += new EventHandler(this.CloseButton_Click);
     this.buttonsStack.Children.Add((RadElement)this.closeButton);
 }
Beispiel #9
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.stackLayout = new StackLayoutPanel();
            this.stackLayout.Orientation = Orientation.Horizontal;
            this.stackLayout.EqualChildrenWidth = false;

            this.labelPrefix = new RadLabelElement();
            this.labelPrefix.Text = "+7";
            this.labelPrefix.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.stackLayout.Children.Add(this.labelPrefix);

            this.textBoxNumber = new RadMaskedEditBoxElement();
            this.textBoxNumber.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.textBoxNumber.MinSize = new Size(200,0);
            this.textBoxNumber.TextChanged += textBoxNumber_TextChanged;
            this.textBoxNumber.MaskType = MaskType.Standard;
            this.textBoxNumber.MouseUp += textBoxNumber_MouseUp;
            this.textBoxNumber.Border.Visibility = ElementVisibility.Hidden;
            this.textBoxNumber.TextRenderingHint = TextRenderingHint.SystemDefault;
            this.textBoxNumber.Mask = "(000) 000-0000";
            this.textBoxNumber.Text = "";
            this.stackLayout.Children.Add(this.textBoxNumber);

            this.Children.Add(this.stackLayout);
        }
        protected override void CreateChildElements()
        {
            this.borderPrimitive       = new BorderPrimitive();
            this.borderPrimitive.Class = "ButtonGroupBorder";
            this.fillPrimitive         = new FillPrimitive();
            this.fillPrimitive.Class   = "ButtonGroupFill";
            this.layoutPanel           = new StackLayoutPanel();
            this.items = new RadItemOwnerCollection((RadElement)this.layoutPanel);
            this.items.ItemsChanged += new ItemChangedDelegate(this.ItemChanged);
            this.items.ItemTypes     = new System.Type[16]
            {
                typeof(RadButtonElement),
                typeof(RadCheckBoxElement),
                typeof(RadDropDownListElement),
                typeof(RadDropDownButtonElement),
                typeof(RadImageButtonElement),
                typeof(RadLabelElement),
                typeof(RadMaskedEditBoxElement),
                typeof(RadProgressBarElement),
                typeof(RadRadioButtonElement),
                typeof(RadRepeatButtonElement),
                typeof(RadRibbonBarButtonGroup),
                typeof(RadSplitButtonElement),
                typeof(RadTextBoxElement),
                typeof(RadToggleButtonElement),
                typeof(RadTrackBarElement),
                typeof(RibbonBarGroupSeparator)
            };
            int num = (int)this.layoutPanel.BindProperty(StackLayoutPanel.OrientationProperty, (RadObject)this, RadRibbonBarButtonGroup.OrientationProperty, PropertyBindingOptions.OneWay);

            this.Children.Add((RadElement)this.fillPrimitive);
            this.Children.Add((RadElement)this.layoutPanel);
            this.Children.Add((RadElement)this.borderPrimitive);
        }
        protected virtual StackLayoutPanel CreateStackElement()
        {
            StackLayoutPanel stackLayoutPanel = new StackLayoutPanel();

            stackLayoutPanel.Orientation = Orientation.Vertical;
            stackLayoutPanel.NotifyParentOnMouseInput = true;
            return(stackLayoutPanel);
        }
Beispiel #12
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.panel             = new StackLayoutPanel();
     this.panel.Orientation = Orientation.Horizontal;
     this.Children.Add((RadElement)this.panel);
     this.UpdateGroupingFields();
 }
Beispiel #13
0
        private StackLayoutPanel CreateStackElement()
        {
            StackLayoutPanel stackLayoutPanel = new StackLayoutPanel();

            stackLayoutPanel.Orientation            = Orientation.Vertical;
            stackLayoutPanel.ShouldHandleMouseInput = false;
            return(stackLayoutPanel);
        }
Beispiel #14
0
        protected override void CreateChildElements()
        {
            this.fillPrimitive         = new FillPrimitive();
            fillPrimitive.Class        = "ListBoxItemSelectionFill";
            fillPrimitive.Visibility   = ElementVisibility.Hidden;
            fillPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;

            this.borderElement              = new BorderPrimitive();
            this.borderElement.Class        = "ListBoxItemSelectionBorder";
            this.borderElement.Visibility   = ElementVisibility.Hidden;
            this.borderElement.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;

            this.imagePrimitive = new ImagePrimitive();
            this.imagePrimitive.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, true);
            this.imagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, this, RadListBoxItem.ImageIndexProperty, PropertyBindingOptions.TwoWay);
            this.imagePrimitive.BindProperty(ImagePrimitive.ImageProperty, this, RadListBoxItem.ImageProperty, PropertyBindingOptions.TwoWay);
            this.imagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, this, RadListBoxItem.ImageKeyProperty, PropertyBindingOptions.TwoWay);

            this.textPrimitive             = new TextPrimitive();
            this.textPrimitive.Class       = "ListBoxItemText";
            this.textPrimitive.UseMnemonic = false;
            this.textPrimitive.BindProperty(TextPrimitive.TextProperty, this, RadListBoxItem.TextProperty, PropertyBindingOptions.OneWay);
            this.textPrimitive.BindProperty(TextPrimitive.AlignmentProperty, this, RadListBoxItem.TextAlignmentProperty, PropertyBindingOptions.OneWay);

            this.descriptionTextPrimitive             = new TextPrimitive();
            this.descriptionTextPrimitive.Class       = "ListBoxItemDescriptionText";
            this.descriptionTextPrimitive.UseMnemonic = false;
            this.descriptionTextPrimitive.BindProperty(TextPrimitive.FontProperty, this, RadListBoxItem.DescriptionFontProperty, PropertyBindingOptions.OneWay);

            StackLayoutPanel textPanel = new StackLayoutPanel();

            textPanel.Orientation        = Orientation.Vertical;
            textPanel.EqualChildrenWidth = true;
            textPanel.Children.Add(this.textPrimitive);

            textSeparator = new RadMenuSeparatorItem();
            textSeparator.NotifyParentOnMouseInput = true;
            textSeparator.Class        = "ListBoxItemTextSeparator";
            textSeparator.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
            textSeparator.Visibility   = ElementVisibility.Collapsed;

            textPanel.Children.Add(textSeparator);
            textPanel.Children.Add(this.descriptionTextPrimitive);
            textPanel.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, true);

            this.layoutPanel = new ImageAndTextLayoutPanel();
            this.layoutPanel.StretchHorizontally = false;
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.DisplayStyleProperty, this, RadListBoxItem.DisplayStyleProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.ImageAlignmentProperty, this, RadListBoxItem.ImageAlignmentProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.TextAlignmentProperty, this, RadListBoxItem.TextAlignmentProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.TextImageRelationProperty, this, RadListBoxItem.TextImageRelationProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.Children.Add(this.imagePrimitive);
            this.layoutPanel.Children.Add(textPanel);

            this.Children.Add(fillPrimitive);
            this.Children.Add(this.borderElement);
            this.Children.Add(this.layoutPanel);
        }
Beispiel #15
0
        protected override void CreateChildElements()
        {
            // if there is an old reference we clear it.
            this.contextItem = null;

            this.layoutPanel        = new WrapLayoutPanel();
            this.layoutPanel.ZIndex = 10;
            this.layoutPanel.BindProperty(WrapLayoutPanel.OrientationProperty, this, RadMenuElement.OrientationProperty, PropertyBindingOptions.OneWay);
            //todo:
            //this.layoutPanel.BindProperty(WrapLayoutPanel.Eql, this, RadMenuElement.AllItemsEqualHeightProperty, PropertyBindingOptions.OneWay);

            this.items.Owner = this.layoutPanel;
            this.Children.Add(this.layoutPanel);

            fill = new FillPrimitive();
            fill.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
            fill.Visibility   = ElementVisibility.Collapsed;
            fill.Class        = "MenuFill";
            fill.ZIndex       = 5;
            this.Children.Add(fill);


            this.systemButtons                         = new StackLayoutPanel();
            this.systemButtons.Alignment               = ContentAlignment.MiddleRight;
            this.systemButtons.ZIndex                  = 0;
            this.systemButtons.Class                   = "SystemButtonsStackLayoutPanel";
            this.minimizeButton                        = new RadImageButtonElement();
            this.minimizeButton.StretchHorizontally    = false;
            this.minimizeButton.StretchVertically      = false;
            this.minimizeButton.Class                  = "MinimizeButton";
            this.minimizeButton.ButtonFillElement.Name = "MinimizeButtonFill";
            this.systemButtons.Children.Add(minimizeButton);

            this.maximizeButton = new RadImageButtonElement();
            this.maximizeButton.StretchHorizontally = false;
            this.maximizeButton.StretchVertically   = false;
            this.maximizeButton.Class = "MaximizeButton";
            this.maximizeButton.ButtonFillElement.Name = "MaximizeButtonFill";
            this.systemButtons.Children.Add(maximizeButton);

            this.closeButton = new RadImageButtonElement();
            this.closeButton.StretchHorizontally = false;
            this.closeButton.StretchVertically   = false;
            this.closeButton.Class = "CloseButton";
            this.closeButton.ButtonFillElement.Name = "CloseButtonFill";
            this.systemButtons.Children.Add(closeButton);
            this.systemButtons.ZIndex = 6;
            this.Children.Add(systemButtons);


            this.border         = new BorderPrimitive();
            border.Class        = "MenuBorder";
            border.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
            this.Children.Add(border);

            systemButtons.Visibility = ElementVisibility.Collapsed;
        }
Beispiel #16
0
 protected override void CreateChildElements()
 {
     this.fill = new FillPrimitive();
     this.Children.Add((RadElement)this.fill);
     this.border = new BorderPrimitive();
     this.Children.Add((RadElement)this.border);
     this.layout = new StackLayoutPanel();
     this.Children.Add((RadElement)this.layout);
 }
Beispiel #17
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            this.minMaxCloseButtonsStackLayoutPanel = new StackLayoutPanel();
            this.minMaxCloseButtonsStackLayoutPanel.EqualChildrenHeight = true;
            this.Children.Add(this.minMaxCloseButtonsStackLayoutPanel);

            this.systemButtons             = new StackLayoutPanel();
            this.systemButtons.Class       = "SystemButtonsStackLayout";
            this.systemButtons.Orientation = Orientation.Horizontal;
            this.systemButtons.Alignment   = ContentAlignment.MiddleRight;
            this.minMaxCloseButtonsStackLayoutPanel.Children.Add(this.systemButtons);

            this.minimizeButton = new RadImageButtonElement();
            this.minimizeButton.StateManager = new RibbonBarSystemButtonStateManager().StateManagerInstance;
            this.minimizeButton.ThemeRole    = "RibbonMinimizeButton";
            this.minimizeButton.Class        = "MinimizeButton";
            this.minimizeButton.Image        = Properties.Resources.ribbon_minimize;
            this.minimizeButton.Click       += new EventHandler(this.OnMinimize);

            ClassSelector selector       = new ClassSelector("ButtonFill");
            ClassSelector borderSelector = new ClassSelector("ButtonBorder");

            selector.GetSelectedElements(this.minimizeButton).First.Value.Class       = "CaptionButtonFill";
            borderSelector.GetSelectedElements(this.minimizeButton).First.Value.Class = "CaptionButtonBorder";
            this.systemButtons.Children.Add(minimizeButton);

            this.maximizeButton = new RadImageButtonElement();
            this.maximizeButton.StateManager = new RibbonBarSystemButtonStateManager().StateManagerInstance;
            this.maximizeButton.ThemeRole    = "RibbonMaximizeButton";
            this.maximizeButton.Class        = "MaximizeButton";
            this.maximizeButton.Image        = Properties.Resources.ribbon_maximize;
            this.maximizeButton.Click       += new EventHandler(this.OnMaximizeRestore);
            selector.GetSelectedElements(this.maximizeButton).First.Value.Class       = "CaptionButtonFill";
            borderSelector.GetSelectedElements(this.maximizeButton).First.Value.Class = "CaptionButtonBorder";
            this.systemButtons.Children.Add(maximizeButton);

            this.closeButton = new RadImageButtonElement();
            this.closeButton.StateManager = new RibbonBarSystemButtonStateManager().StateManagerInstance;
            this.closeButton.ThemeRole    = "RibbonCloseButton";
            this.closeButton.Class        = "CloseButton";
            this.closeButton.Image        = Properties.Resources.ribbon_close;
            this.closeButton.Click       += new EventHandler(this.OnClose);
            selector.GetSelectedElements(this.closeButton).First.Value.Class       = "CaptionButtonFill";
            borderSelector.GetSelectedElements(this.closeButton).First.Value.Class = "CaptionButtonBorder";
            this.systemButtons.Children.Add(closeButton);

            this.captionText               = new TextPrimitive();
            this.captionText.Class         = "TitleCaption";
            this.captionText.TextAlignment = ContentAlignment.MiddleCenter;
            captionText.SetValue(RibbonBarCaptionLayoutPanel.CaptionTextProperty, true);
            captionText.BindProperty(TextPrimitive.TextProperty, this, RadItem.TextProperty, PropertyBindingOptions.OneWay);
            this.captionText.FontChanged += new EventHandler(captionText_FontChanged);
        }
Beispiel #18
0
        protected override void CreateChildElements()
        {
            this.internalLayoutPanel       = (ImageAndTextLayoutPanel) new MenuImageAndTextLayout();
            this.internalLayoutPanel.Class = "RadMenuItemInternalLayoutPanel";
            this.Children.Add((RadElement)this.internalLayoutPanel);
            this.checkmark = new RadMenuCheckmark();
            int num1 = (int)this.checkmark.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, (object)true);

            this.checkmark.Alignment = ContentAlignment.MiddleCenter;
            this.checkmark.CheckElement.Alignment = ContentAlignment.MiddleCenter;
            this.checkmark.CheckElement.Class     = "RadMenuItemCheckPrimitive";
            this.internalLayoutPanel.Children.Add((RadElement)this.checkmark);
            this.imagePrimitive = new ImagePrimitive();
            int num2 = (int)this.imagePrimitive.SetValue(RadCheckmark.IsImageProperty, (object)true);

            this.imagePrimitive.Class     = "RadMenuItemImagePrimitive";
            this.imagePrimitive.Alignment = ContentAlignment.MiddleCenter;
            this.imagePrimitive.ZIndex    = this.checkmark.ZIndex + 1;
            this.checkmark.Children.Add((RadElement)this.imagePrimitive);
            this.textPanel = new StackLayoutPanel();
            this.textPanel.StretchHorizontally = false;
            this.textPanel.StretchVertically   = false;
            this.textPanel.Class              = "RadMenuItemTextPanel";
            this.textPanel.Orientation        = Orientation.Vertical;
            this.textPanel.EqualChildrenWidth = true;
            int num3 = (int)this.textPanel.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, (object)true);

            this.internalLayoutPanel.Children.Add((RadElement)this.textPanel);
            this.textPrimitive = new TextPrimitive();
            int num4 = (int)this.textPrimitive.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, (object)true);

            this.textPrimitive.Class = "RadMenuItemTextPrimitive";
            this.textPanel.Children.Add((RadElement)this.textPrimitive);
            this.textSeparator            = new LinePrimitive();
            this.textSeparator.Class      = "RadMenuItemTextSeparator";
            this.textSeparator.Visibility = ElementVisibility.Collapsed;
            this.textPanel.Children.Add((RadElement)this.textSeparator);
            this.descriptionTextPrimitive       = new TextPrimitive();
            this.descriptionTextPrimitive.Class = "RadMenuItemDescriptionText";
            this.textPanel.Children.Add((RadElement)this.descriptionTextPrimitive);
            this.shortcutTextPrimitive            = new TextPrimitive();
            this.shortcutTextPrimitive.Class      = "RadMenuItemShortcutPrimitive";
            this.shortcutTextPrimitive.Visibility = ElementVisibility.Collapsed;
            this.Children.Add((RadElement)this.shortcutTextPrimitive);
            this.arrowPrimitive               = new ArrowPrimitive();
            this.arrowPrimitive.Visibility    = ElementVisibility.Hidden;
            this.arrowPrimitive.Direction     = this.RightToLeft ? Telerik.WinControls.ArrowDirection.Left : Telerik.WinControls.ArrowDirection.Right;
            this.arrowPrimitive.Alignment     = ContentAlignment.MiddleLeft;
            this.arrowPrimitive.Class         = "RadMenuItemArrowPrimitive";
            this.arrowPrimitive.SmoothingMode = SmoothingMode.Default;
            this.arrowPrimitive.MinSize       = Size.Empty;
            this.arrowPrimitive.MaxSize       = Size.Empty;
            this.Children.Add((RadElement)this.arrowPrimitive);
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.checkBox.ToggleStateChanged += this.ToggleStateChanged;
            this.label.StretchHorizontally    = true;
            StackLayoutPanel stack = new StackLayoutPanel();

            stack.Orientation = Orientation.Horizontal;
            stack.Children.Add(checkBox);
            stack.Children.Add(label);
            this.Children.Add(stack);
        }
Beispiel #20
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.itemsLayout = new StackLayoutPanel();
     this.Children.Add((RadElement)this.itemsLayout);
     this.scrollBar               = new RadScrollBarElement();
     this.scrollBar.ScrollType    = ScrollType.Horizontal;
     this.scrollBar.ValueChanged += new EventHandler(this.scrollBar_ValueChanged);
     this.Children.Add((RadElement)this.scrollBar);
     this.scrollService = new ScrollService((RadElement)this, this.scrollBar);
     this.scrollService.EnableInertia = true;
 }
 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);
 }
Beispiel #22
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.stackElement   = this.CreateStackElement();
     this.cityElement    = this.CreateCityElement();
     this.airportElement = this.CreateAirportElement();
     this.dateElement    = this.CreateDateElement();
     this.timeElement    = this.CreateTimeElement();
     this.stackElement.Children.Add((RadElement)this.cityElement);
     this.stackElement.Children.Add((RadElement)this.airportElement);
     this.stackElement.Children.Add((RadElement)this.dateElement);
     this.stackElement.Children.Add((RadElement)this.timeElement);
     this.Children.Add((RadElement)this.stackElement);
 }
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.stackElement       = this.CreateStackElement();
     this.cityElement        = this.CreateCityElement();
     this.imageElement       = this.CreateImageElement();
     this.temperatureElement = this.CreateTemperatureElement();
     this.separator          = this.CreateSeparatorElement();
     this.stackElement.Children.Add((RadElement)this.cityElement);
     this.stackElement.Children.Add((RadElement)this.imageElement);
     this.stackElement.Children.Add((RadElement)this.temperatureElement);
     this.stackElement.Children.Add((RadElement)this.separator);
     this.Children.Add((RadElement)this.stackElement);
 }
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.stackElement    = this.CreateStackElement();
     this.imageElement    = this.CreateImageElement();
     this.titleElement    = this.CreateTitleElement();
     this.subtitleElement = this.CreateSubtitleElement();
     this.textElement     = this.CreateTextElement();
     this.stackElement.Children.Add((RadElement)this.imageElement);
     this.stackElement.Children.Add((RadElement)this.titleElement);
     this.stackElement.Children.Add((RadElement)this.subtitleElement);
     this.stackElement.Children.Add((RadElement)this.textElement);
     this.Children.Add((RadElement)this.stackElement);
 }
Beispiel #25
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.checkBox.ToggleStateChanged += new StateChangedEventHandler(this.ToggleStateChanged);
            this.label.StretchHorizontally    = true;
            this.label.Alignment              = ContentAlignment.MiddleLeft;
            this.label.TextAlignment          = ContentAlignment.MiddleLeft;
            StackLayoutPanel stackLayoutPanel = new StackLayoutPanel();

            stackLayoutPanel.Orientation = Orientation.Horizontal;
            stackLayoutPanel.Children.Add((RadElement)this.checkBox);
            stackLayoutPanel.Children.Add((RadElement)this.label);
            this.Children.Add((RadElement)stackLayoutPanel);
        }
Beispiel #26
0
 protected override void CreateChildElements()
 {
     this.fillPrimitive       = new FillPrimitive();
     this.fillPrimitive.Class = "TextBoxFill";
     this.Children.Add((RadElement)this.fillPrimitive);
     this.borderPrimitive       = new BorderPrimitive();
     this.borderPrimitive.Class = "TextBoxBorder";
     this.Children.Add((RadElement)this.borderPrimitive);
     this.buttonsStack = new StackLayoutPanel();
     this.Children.Add((RadElement)this.buttonsStack);
     this.clearButton        = this.CreateClearButton();
     this.clearButton.Class  = "TextBoxClearButton";
     this.clearButton.Click += new EventHandler(this.ClearButton_Click);
     this.buttonsStack.Children.Add((RadElement)this.clearButton);
 }
 protected override void CreateChildElements()
 {
     this.border = new BorderPrimitive();
     this.border.GradientStyle = GradientStyles.Solid;
     this.border.ForeColor     = Color.FromArgb(0, 0, 0);
     this.border.AutoSizeMode  = RadAutoSizeMode.FitToAvailableSize;
     this.Children.Add(this.border);
     this.panel                     = new StackLayoutPanel();
     this.panel.Orientation         = Orientation.Horizontal;
     this.panel.Margin              = new Padding(0, 20, 10, 0);
     this.panel.Alignment           = ContentAlignment.MiddleCenter;
     this.panel.StretchHorizontally = false;
     this.Children.Add(this.panel);
     this.items.Owner = this.panel;
 }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            operatorElement = new LightVisualElement();
            container       = new StackLayoutPanel();
            dropDown        = new RadDropDownListElement();

            dropDown.BindingContext        = bc;
            dropDown.DropDownStyle         = RadDropDownStyle.DropDownList;
            dropDown.SelectedIndexChanged += dropDown_SelectedIndexChanged;

            this.Children.Add(container);
            container.Children.Add(operatorElement);
            container.Children.Add(dropDown);
        }
Beispiel #29
0
        protected override void CreateChildElements()
        {
            fillPrimitive       = new FillPrimitive();
            fillPrimitive.Class = "ScreenTipFill";
            this.Children.Add(fillPrimitive);


            borderPrimitive       = new BorderPrimitive();
            borderPrimitive.Class = "ScreenTipBorder";
            this.Children.Add(borderPrimitive);

            screenTipPanel             = new StackLayoutPanel();
            screenTipPanel.Orientation = Orientation.Vertical;

            captionLabel          = new RadLabelElement();
            captionLabel.Text     = "ScreenTipCaptionText";
            captionLabel.Class    = "ScreenTipCaptionText";
            captionLabel.TextWrap = true;
            screenTipPanel.Children.Add(captionLabel);

            mainText          = new RadLabelElement();
            mainText.Text     = "ScreenTip Text";
            mainText.Class    = "ScreenTipText";
            mainText.TextWrap = true;
            screenTipPanel.Children.Add(mainText);

            footerLine           = new RadLineItem();
            footerLine.MaxSize   = new Size(0, 4);
            footerLine.Alignment = ContentAlignment.BottomCenter;
            footerLine.Class     = "ScreenTipFooterLine";
            screenTipPanel.Children.Add(footerLine);

            footerText          = new RadLabelElement();
            footerText.Text     = "ScreenTip Footer";
            footerText.Class    = "ScreenTipFooterText";
            footerText.TextWrap = true;
            screenTipPanel.Children.Add(footerText);

            this.Children.Add(screenTipPanel);

            this.footerLine.Visibility = ElementVisibility.Collapsed;
            this.footerText.Visibility = ElementVisibility.Collapsed;

            this.Items.Add(captionLabel);
            this.Items.Add(mainText);
            this.Items.Add(footerLine);
            this.Items.Add(footerText);
        }
Beispiel #30
0
        protected override void CreateChildElements()
        {
            fillPrimitive              = new FillPrimitive();
            fillPrimitive.Class        = "GalleryItemSelectionFill";
            fillPrimitive.Visibility   = ElementVisibility.Hidden;
            fillPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;

            borderPrimitive              = new BorderPrimitive();
            borderPrimitive.Class        = "GalleryItemSelectionBorder";
            borderPrimitive.Visibility   = ElementVisibility.Hidden;
            borderPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;

            this.imagePrimitive = new ImagePrimitive();
            this.imagePrimitive.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, true);
            this.imagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, this, RadGalleryItem.ImageIndexProperty, PropertyBindingOptions.TwoWay);
            this.imagePrimitive.BindProperty(ImagePrimitive.ImageProperty, this, RadGalleryItem.ImageProperty, PropertyBindingOptions.TwoWay);
            this.imagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, this, RadGalleryItem.ImageKeyProperty, PropertyBindingOptions.TwoWay);

            textPrimitive       = new TextPrimitive();
            textPrimitive.Class = "GalleryItemText";
            textPrimitive.BindProperty(TextPrimitive.TextProperty, this, RadGalleryItem.TextProperty, PropertyBindingOptions.OneWay);
            textPrimitive.BindProperty(TextPrimitive.AlignmentProperty, this, RadGalleryItem.TextAlignmentProperty, PropertyBindingOptions.OneWay);

            this.descriptionTextPrimitive       = new TextPrimitive();
            this.descriptionTextPrimitive.Class = "GalleryItemDescriptionText";
            this.descriptionTextPrimitive.BindProperty(TextPrimitive.FontProperty, this, RadGalleryItem.DescriptionFontProperty, PropertyBindingOptions.OneWay);

            StackLayoutPanel textPanel = new StackLayoutPanel();

            textPanel.Orientation        = Orientation.Vertical;
            textPanel.EqualChildrenWidth = true;
            textPanel.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, true);
            textPanel.Children.Add(textPrimitive);
            textPanel.Children.Add(this.descriptionTextPrimitive);


            this.layoutPanel = new ImageAndTextLayoutPanel();
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.DisplayStyleProperty, this, RadGalleryItem.DisplayStyleProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.ImageAlignmentProperty, this, RadGalleryItem.ImageAlignmentProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.TextAlignmentProperty, this, RadGalleryItem.TextAlignmentProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.BindProperty(ImageAndTextLayoutPanel.TextImageRelationProperty, this, RadGalleryItem.TextImageRelationProperty, PropertyBindingOptions.OneWay);
            this.layoutPanel.Children.Add(imagePrimitive);
            this.layoutPanel.Children.Add(textPanel);

            this.Children.Add(fillPrimitive);
            this.Children.Add(borderPrimitive);
            this.Children.Add(this.layoutPanel);
        }
 protected override void CreateChildElements()
 {
     this.fill              = new FillPrimitive();
     this.fill.Class        = "BreadCrumbFill";
     this.border            = new BorderPrimitive();
     this.border.Class      = "BreadCrumbBorder";
     this.strip             = new StackLayoutPanel();
     this.imgPr             = new ImagePrimitive();
     this.imgPr.Class       = "BreadCrumbImage";
     this.fill.Visibility   = ElementVisibility.Hidden;
     this.border.Visibility = ElementVisibility.Hidden;
     this.Children.Add((RadElement)this.fill);
     this.Children.Add((RadElement)this.border);
     this.Children.Add((RadElement)this.strip);
     this.items.Owner = (RadElement)this.strip;
 }