Example #1
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            StackLayoutElement stack = new StackLayoutElement();

            stack.StretchVertically   = true;
            stack.FitInAvailableSize  = true;
            stack.Orientation         = System.Windows.Forms.Orientation.Horizontal;
            stack.Padding             = new System.Windows.Forms.Padding(2);
            stack.ElementSpacing      = 5;
            stack.StretchHorizontally = false;
            this.Children.Add(stack);

            colorBox = new LightVisualElement();
            colorBox.GradientStyle            = Telerik.WinControls.GradientStyles.Solid;
            colorBox.DrawFill                 = true;
            colorBox.NotifyParentOnMouseInput = true;
            colorBox.MinSize                  = new Size(colorBoxSizeWidth, 0);
            colorBox.MaxSize                  = new Size(colorBoxSizeWidth, 0);
            colorBox.DrawBorder               = true;
            colorBox.BorderColor              = Color.Black;
            colorBox.BorderGradientStyle      = GradientStyles.Solid;
            colorBox.NotifyParentOnMouseInput = true;
            colorBox.StretchHorizontally      = false;
            stack.Children.Add(colorBox);

            textBox = new LightVisualElement();
            textBox.NotifyParentOnMouseInput = true;
            textBox.TextAlignment            = ContentAlignment.MiddleLeft;
            textBox.StretchHorizontally      = false;
            stack.Children.Add(textBox);
        }
Example #2
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            StackLayoutElement stackLayoutElement = new StackLayoutElement();

            stackLayoutElement.StretchVertically   = true;
            stackLayoutElement.FitInAvailableSize  = true;
            stackLayoutElement.Orientation         = Orientation.Horizontal;
            stackLayoutElement.Padding             = new Padding(2);
            stackLayoutElement.ElementSpacing      = 5;
            stackLayoutElement.StretchHorizontally = false;
            this.Children.Add((RadElement)stackLayoutElement);
            this.colorBox = new LightVisualElement();
            this.colorBox.GradientStyle            = GradientStyles.Solid;
            this.colorBox.DrawFill                 = true;
            this.colorBox.NotifyParentOnMouseInput = true;
            this.colorBox.MinSize                  = new Size(30, 0);
            this.colorBox.MaxSize                  = new Size(30, 0);
            this.colorBox.DrawBorder               = true;
            this.colorBox.BorderColor              = Color.Black;
            this.colorBox.BorderGradientStyle      = GradientStyles.Solid;
            this.colorBox.NotifyParentOnMouseInput = true;
            this.colorBox.StretchHorizontally      = false;
            stackLayoutElement.Children.Add((RadElement)this.colorBox);
            this.textBox = new LightVisualElement();
            this.textBox.NotifyParentOnMouseInput = true;
            this.textBox.TextAlignment            = ContentAlignment.MiddleLeft;
            this.textBox.StretchHorizontally      = false;
            stackLayoutElement.Children.Add((RadElement)this.textBox);
        }
Example #3
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);
            }
Example #4
0
            private void CreateStackElement(GridRowElement row)
            {
                this.stack = new StackLayoutElement();
                this.stack.AutoSizeMode        = Telerik.WinControls.RadAutoSizeMode.FitToAvailableSize;
                this.stack.AutoSize            = true;
                this.stack.StretchHorizontally = true;
                this.stack.Alignment           = ContentAlignment.BottomCenter;
                this.stack.DrawFill            = true;
                this.stack.BackColor           = Color.White;
                int i = 0;

                while (i < row.RowInfo.Cells.Count)
                {
                    SummaryCellElement element = new SummaryCellElement();
                    element.ColumnName          = row.RowInfo.Cells[i].ColumnInfo.Name;
                    element.StretchHorizontally = false;
                    element.StretchVertically   = true;
                    element.DrawBorder          = true;
                    element.BorderGradientStyle = Telerik.WinControls.GradientStyles.Solid;
                    element.BorderColor         = Color.LightBlue;
                    element.ForeColor           = Color.Black;
                    element.GradientStyle       = GradientStyles.Solid;
                    this.stack.Children.Add(element);
                    i += 1;
                }

                this.Children.Add(this.stack);
            }
Example #5
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            _stack = new StackLayoutElement {
                Orientation = Orientation.Horizontal, AutoSize = false, Margin = new Padding(2)
            };
            _headerElement = new LightVisualElement {
                AutoSize = false, Margin = default(Padding)
            };
            _hasErrorsElement = new LightVisualElement {
                AutoSize = false, Margin = default(Padding)
            };

            _progressElement = new RadProgressBarElement {
                AutoSize      = false,
                Margin        = new Padding(0, 3, 0, 0),
                SmoothingMode = SmoothingMode.AntiAlias
            };

            _stack.Children.Add(_headerElement);
            _stack.Children.Add(_progressElement);
            _stack.Children.Add(_hasErrorsElement);

            this.Children.Add(_stack);
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            layout                     = new StackLayoutElement();
            layout.Orientation         = Orientation.Vertical;
            layout.FitInAvailableSize  = true;
            layout.StretchVertically   = true;
            layout.StretchHorizontally = true;
            this.Children.Add(layout);
        }
Example #7
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     mainContainer             = new StackLayoutElement();
     mainContainer.Orientation = Orientation.Vertical;
     headersContainer          = new StackLayoutElement();
     // headersContainer.Orientation = Orientation.Horizontal;
     nodeContentContainer = new StackLayoutElement();
     mainContainer.Children.Add(headersContainer);
     mainContainer.Children.Add(nodeContentContainer);
     this.Children.Add(mainContainer);
 }
Example #8
0
        protected override void OnPreviewDragOver(RadDragOverEventArgs e)
        {
            base.OnPreviewDragOver(e);

            StackLayoutElement dropTarget    = e.HitTarget as StackLayoutElement;
            TaskElement        draggedObject = e.DragInstance as TaskElement;

            if (draggedObject != null && dropTarget != null && dropTarget != draggedObject.Parent)
            {
                e.CanDrop = true;
            }
        }
Example #9
0
        protected override void OnPreviewDragDrop(RadDropEventArgs e)
        {
            StackLayoutElement dropTarget    = e.HitTarget as StackLayoutElement;
            TaskElement        draggedObject = e.DragInstance as TaskElement;

            if (draggedObject != null && dropTarget != null)
            {
                draggedObject.Parent.Children.Remove(draggedObject);
                dropTarget.Children.Add(draggedObject);
            }

            base.OnPreviewDragDrop(e);
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            stack                     = new StackLayoutElement();
            stack.Orientation         = Orientation.Horizontal;
            stack.StretchHorizontally = true;

            checkBoxElement.StretchHorizontally = false;
            checkBoxElement.CheckStateChanged  += checkBoxElement_CheckStateChanged;
            textElement.TextAlignment           = ContentAlignment.MiddleLeft;
            this.Children.Add(stack);
            stack.Children.Add(checkBoxElement);
            stack.Children.Add(textElement);
        }
Example #11
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            header = new ColumnHeaderElement();
            this.Children.Add(header);

            content                     = new StackLayoutElement();
            content.Orientation         = Orientation.Vertical;
            content.StretchHorizontally = true;
            content.StretchVertically   = true;
            content.AllowDrop           = true;
            this.Children.Add(content);
        }
Example #12
0
        private void PrepareLogo()
        {
            StackLayoutElement logoLayout = new StackLayoutElement();
            logoLayout.Orientation = Orientation.Horizontal;
            logoLayout.Margin = new System.Windows.Forms.Padding(110, 610, 0, 0);
            logoLayout.StretchHorizontally = false;

            this.logoTlieta = new RadImageItem();
            this.logoTlieta.Image = Tlieta.Pdms.Properties.Resources.TLIETA250;
            this.logoTlieta.BackColor = Color.Transparent;
            this.logoTlieta.BorderThickness = new Padding(0, 0, 0, 0);
            logoLayout.Children.Add(this.logoTlieta);

            this.radPanorama1.PanoramaElement.Children.Add(logoLayout);
        }
Example #13
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            int  rowsCount    = 8;
            int  columnsCount = 10;
            Size boxSize      = new Size(16, 16);

            this.stackLayout                          = new StackLayoutElement();
            this.stackLayout.Orientation              = Orientation.Vertical;
            this.stackLayout.StretchHorizontally      = true;
            this.stackLayout.StretchVertically        = true;
            this.stackLayout.NotifyParentOnMouseInput = true;
            this.Children.Add(this.stackLayout);

            this.header = new LightVisualElement();
            this.header.TextAlignment     = ContentAlignment.MiddleLeft;
            this.header.StretchVertically = false;
            this.header.Text          = RadMenuInsertTableItem.HeaderText;
            this.header.DrawFill      = true;
            this.header.Font          = new Font("Segoe UI", 9, FontStyle.Bold);
            this.header.GradientStyle = GradientStyles.Solid;
            this.header.BackColor     = Color.FromArgb(240, 242, 245);
            this.stackLayout.Children.Add(this.header);

            this.uniformGrid = new UniformGrid();
            this.uniformGrid.StretchVertically        = true;
            this.uniformGrid.NotifyParentOnMouseInput = true;
            this.uniformGrid.Rows    = rowsCount;
            this.uniformGrid.Columns = columnsCount;
            this.uniformGrid.MinSize = new Size(160, 140);
            this.uniformGrid.Margin  = new Padding(5, 5, 0, 0);
            this.stackLayout.Children.Add(this.uniformGrid);

            for (int i = 1; i <= rowsCount * columnsCount; i++)
            {
                LightVisualElement box = new LightVisualElement();
                box.DrawBorder               = true;
                box.BorderGradientStyle      = GradientStyles.Solid;
                box.BorderBoxStyle           = BorderBoxStyle.OuterInnerBorders;
                box.MaxSize                  = boxSize;
                box.MinSize                  = boxSize;
                box.NotifyParentOnMouseInput = true;
                box.MouseMove               += new MouseEventHandler(OnBoxMouseMove);
                box.MouseDown               += new MouseEventHandler(OnBoxMouseDown);
                this.uniformGrid.Children.Add(box);
            }
        }
Example #14
0
                protected override void CreateChildElements()
                {
                    mainContainer                            = new StackLayoutElement();
                    mainContainer.Orientation                = Orientation.Vertical;
                    mainContainer.StretchHorizontally        = true;
                    mainContainer.StretchVertically          = true;
                    headersContainer                         = new StackLayoutElement();
                    headersContainer.Orientation             = Orientation.Horizontal;
                    nodeContentContainer                     = new StackLayoutElement();
                    nodeContentContainer.StretchHorizontally = true;

                    mainContainer.Children.Add(headersContainer);
                    mainContainer.Children.Add(nodeContentContainer);
                    this.Children.Add(mainContainer);
                    dropDownList = new RadDropDownListElement();
                }
Example #15
0
            protected override void CreateChildElements()
            {
                base.CreateChildElements();
                container = new StackLayoutElement();
                container.StretchVertically   = true;
                container.StretchHorizontally = true;
                container.Orientation         = Orientation.Vertical;
                infoElement = new LightVisualElement();
                infoElement.StretchVertically = false;
                infoElement.MaxSize           = new System.Drawing.Size(0, 30);
                container.Children.Add(infoElement);
                linePrimitive = new LinePrimitive();
                container.Children.Add(linePrimitive);
                unitElement = new LightVisualElement();
                container.Children.Add(unitElement);

                this.Children.Add(container);
            }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            StackLayoutElement stack = new StackLayoutElement();

            stack.StretchVertically   = true;
            stack.StretchHorizontally = true;
            stack.Orientation         = System.Windows.Forms.Orientation.Horizontal;
            stack.ElementSpacing      = 10;
            this.Children.Add(stack);

            this.imagePrimitive = new ReflectiveImagePrimitive();
            this.imagePrimitive.StretchVertically = true;
            stack.Children.Add(this.imagePrimitive);

            this.groupBoxElement                     = new RadGroupBoxElement();
            this.groupBoxElement.Header.Font         = new Font(this.groupBoxElement.Header.Font.FontFamily, 10, FontStyle.Bold);
            this.groupBoxElement.Content.Padding     = new System.Windows.Forms.Padding(20);
            this.groupBoxElement.StretchHorizontally = true;
            this.groupBoxElement.StretchVertically   = true;
            stack.Children.Add(this.groupBoxElement);

            this.groupBoxStackLayout = new StackLayoutElement();
            this.groupBoxStackLayout.StretchHorizontally = true;
            this.groupBoxStackLayout.StretchVertically   = true;
            this.groupBoxElement.Content.Children.Add(this.groupBoxStackLayout);

            this.groupBoxStackLayoutFirstColumn             = new StackLayoutElement();
            this.groupBoxStackLayoutFirstColumn.Orientation = System.Windows.Forms.Orientation.Vertical;
            this.groupBoxStackLayout.Children.Add(this.groupBoxStackLayoutFirstColumn);

            this.labelPosition = new RadLabelElement();
            this.groupBoxStackLayoutFirstColumn.Children.Add(labelPosition);

            this.labelBirthDate = new RadLabelElement();
            this.groupBoxStackLayoutFirstColumn.Children.Add(labelBirthDate);

            this.labelHireDate = new RadLabelElement();
            this.groupBoxStackLayoutFirstColumn.Children.Add(labelHireDate);

            this.labelNotes = new NoteElement();
            this.groupBoxStackLayout.Children.Add(labelNotes);
        }
Example #17
0
            protected override void CreateChildElements()
            {
                base.CreateChildElements();
                container                   = new StackLayoutElement();
                container.Orientation       = Orientation.Vertical;
                container.StretchVertically = true;

                descriptionElement = new LightVisualElement();
                descriptionElement.StretchVertically = false;
                container.Children.Add(descriptionElement);
                linePrimitive = new LinePrimitive();
                container.Children.Add(linePrimitive);
                selectButton = new RadButtonElement();
                container.Children.Add(selectButton);

                this.Children.Add(container);
                selectButton.Text   = "Select all child nodes";
                selectButton.Click += selectButton_Click;
            }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            StackLayoutElement stack = new StackLayoutElement();

            stack.Orientation = Orientation.Horizontal;
            this.Children.Add(stack);

            checkbox = new RadCheckBoxElement();
            checkbox.ToggleStateChanged += new StateChangedEventHandler(checkbox_ToggleStateChanged);
            stack.Children.Add(checkbox);

            content = new LightVisualElement();
            content.StretchHorizontally      = false;
            content.StretchVertically        = true;
            content.TextAlignment            = ContentAlignment.MiddleLeft;
            content.NotifyParentOnMouseInput = true;
            stack.Children.Add(content);
        }
        public IndicatedDecimalCellElement(GridViewColumn column, GridRowElement row) : base(column, row)
        {
            //this code adds a registration for RadDropDownListArrowButtonElement in order to allow its usage in other controls
            Theme      theme = ThemeRepository.ControlDefault;
            StyleGroup sg    = theme.FindStyleGroup("Telerik.WinControls.UI.RadSpinEditor");

            sg.Registrations.Add(new StyleRegistration("Telerik.WinControls.UI.RadSpinElementUpButton"));
            sg.Registrations.Add(new StyleRegistration("Telerik.WinControls.UI.RadSpinElementDownButton"));

            indicatorUP                   = new RadSpinElementUpButton();
            indicatorUP.Class             = "UpButton";
            indicatorUP.Arrow.Direction   = ArrowDirection.Up;
            indicatorUP.StretchVertically = true;
            indicatorUP.Click            += indicator_Click;
            indicatorUP.Tag               = true;

            indicatorDown                   = new RadSpinElementDownButton();
            indicatorDown.Class             = "DownButton";
            indicatorDown.Arrow.Direction   = ArrowDirection.Down;
            indicatorDown.StretchVertically = true;
            indicatorDown.Click            += indicator_Click;
            indicatorDown.Tag               = false;

            StackLayoutElement layout = new StackLayoutElement();

            layout.Orientation         = System.Windows.Forms.Orientation.Vertical;
            layout.Alignment           = System.Drawing.ContentAlignment.MiddleRight;
            layout.StretchHorizontally = false;
            layout.StretchVertically   = true;
            layout.MaxSize             = new System.Drawing.Size(20, 18);
            layout.FitToSizeMode       = RadFitToSizeMode.FitToParentBounds;
            layout.Children.Add(indicatorUP);
            layout.Children.Add(indicatorDown);
            layout.Margin         = new System.Windows.Forms.Padding(0, 1, 4, 1);
            layout.ElementSpacing = 0;

            this.Children.Add(layout);
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            stack = new StackLayoutElement();
            stack.FitInAvailableSize       = true;
            stack.StretchHorizontally      = false;
            stack.StretchVertically        = false;
            stack.ShouldHandleMouseInput   = false;
            stack.NotifyParentOnMouseInput = true;
            this.Children.Add(stack);

            box                          = new LightVisualElement();
            box.DrawFill                 = true;
            box.DrawBorder               = true;
            box.GradientStyle            = GradientStyles.Solid;
            box.BorderGradientStyle      = GradientStyles.Solid;
            box.BorderColor              = Color.White;
            box.MinSize                  = new System.Drawing.Size(15, 15);
            box.Padding                  = new System.Windows.Forms.Padding(4);
            box.StretchHorizontally      = false;
            box.StretchVertically        = false;
            box.ShouldHandleMouseInput   = false;
            box.NotifyParentOnMouseInput = true;
            stack.Children.Add(box);

            text                          = new LightVisualElement();
            text.DrawFill                 = false;
            text.DrawBorder               = false;
            text.ForeColor                = Color.Black;
            text.Font                     = new System.Drawing.Font("Segoe UI", 9.0f);
            text.TextAlignment            = ContentAlignment.TopLeft;
            text.Padding                  = new System.Windows.Forms.Padding(2, 0, 0, 0);
            text.StretchVertically        = false;
            text.StretchHorizontally      = false;
            text.ShouldHandleMouseInput   = false;
            text.NotifyParentOnMouseInput = true;
            stack.Children.Add(text);
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            this.stackLayout                     = new StackLayoutElement();
            this.stackLayout.Orientation         = System.Windows.Forms.Orientation.Vertical;
            this.stackLayout.StretchVertically   = true;
            this.stackLayout.StretchHorizontally = true;
            this.Children.Add(this.stackLayout);

            this.titleBar      = new RadTitleBarElement();
            this.titleBar.Text = "Column Chooser";
            this.titleBar.StretchVertically         = false;
            this.titleBar.AllowResize               = false;
            this.titleBar.CloseButton.Visibility    = ElementVisibility.Collapsed;
            this.titleBar.MinimizeButton.Visibility = ElementVisibility.Collapsed;
            this.titleBar.MaximizeRestore          += new TitleBarSystemEventHandler(TitleBar_MaximizeRestore);
            this.stackLayout.Children.Add(this.titleBar);

            this.columnChooser = new ColumnChooserElement();
            this.columnChooser.StretchVertically = true;
            this.stackLayout.Children.Add(this.columnChooser);
        }
        /// <summary>
        /// Creates the stack layouts for the textbox and the button on the same
        /// horizontal.
        /// </summary>
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            StackLayoutElement stack = new StackLayoutElement();

            stack.Orientation         = Orientation.Vertical;
            stack.StretchVertically   = true;
            stack.StretchHorizontally = true;

            StackLayoutElement first = new StackLayoutElement();

            first.Orientation         = Orientation.Horizontal;
            first.StretchHorizontally = true;
            first.StretchVertically   = true;

            RadTextBoxElement textBox = new RadTextBoxElement();

            textBox.Text     = TextboxText;
            textBox.MinSize  = new Size(75, 0);
            textBox.KeyDown += textBox_KeyDown;

            RadButtonElement button = new RadButtonElement();

            button.Text    = "OK";
            button.MaxSize = new Size(50, 20);
            button.Click  += button_Click;

            first.Children.Add(textBox);
            first.Children.Add(button);

            stack.Children.Add(first);
            stack.Margin  = new Padding(5, 0, 0, 0);
            stack.MinSize = new Size(120, 0);

            this.Children.Add(stack);
        }
Example #23
0
        private void PrepareFooter()
        {
            StackLayoutElement footerLayout = new StackLayoutElement();
            footerLayout.Orientation = Orientation.Horizontal;
            footerLayout.Margin = new System.Windows.Forms.Padding(700, 600, 0, 0);
            footerLayout.StretchHorizontally = false;

            this.doctorLabel = new LightVisualElement();
            this.doctorLabel.Text = ConfigurationSettings.AppSettings["Doctor"].ToString();
            this.doctorLabel.Font = new Font("Segoe UI Light", 45, GraphicsUnit.Point);
            this.doctorLabel.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.doctorLabel.ForeColor = Color.White;
            this.doctorLabel.TextAlignment = ContentAlignment.MiddleLeft;
            this.doctorLabel.StretchHorizontally = false;
            footerLayout.Children.Add(this.doctorLabel);

            StackLayoutElement serialLayout = new StackLayoutElement();
            serialLayout.Orientation = Orientation.Vertical;
            serialLayout.Margin = new System.Windows.Forms.Padding(750, 680, 0, 0);
            serialLayout.StretchHorizontally = false;
            
            this.suffixLabel = new LightVisualElement();
            this.suffixLabel.Text = ConfigurationSettings.AppSettings["Suffix"].ToString();
            this.suffixLabel.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            this.suffixLabel.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.suffixLabel.ForeColor = Color.White;
            this.suffixLabel.TextAlignment = ContentAlignment.MiddleLeft;
            this.suffixLabel.StretchHorizontally = false;
            serialLayout.Children.Add(this.suffixLabel);

            this.suffix2Label = new LightVisualElement();
            this.suffix2Label.Text = ConfigurationSettings.AppSettings["Suffix2"].ToString();
            this.suffix2Label.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            this.suffix2Label.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.suffix2Label.ForeColor = Color.White;
            this.suffix2Label.TextAlignment = ContentAlignment.MiddleLeft;
            this.suffix2Label.StretchHorizontally = false;
            serialLayout.Children.Add(this.suffix2Label);

            //this.suffix3Label = new LightVisualElement();
            //this.suffix3Label.Text = ConfigurationSettings.AppSettings["Suffix3"].ToString();
            //this.suffix3Label.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            //this.suffix3Label.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            //this.suffix3Label.ForeColor = Color.White;
            //this.suffix3Label.TextAlignment = ContentAlignment.MiddleLeft;
            //this.suffix3Label.StretchHorizontally = false;
            //serialLayout.Children.Add(this.suffix3Label);

            //this.suffix4Label = new LightVisualElement();
            //this.suffix4Label.Text = ConfigurationSettings.AppSettings["Suffix4"].ToString();
            //this.suffix4Label.Font = new Font("Segoe UI Light", 15, GraphicsUnit.Point);
            //this.suffix4Label.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            //this.suffix4Label.ForeColor = Color.White;
            //this.suffix4Label.TextAlignment = ContentAlignment.MiddleLeft;
            //this.suffix4Label.StretchHorizontally = false;
            //serialLayout.Children.Add(this.suffix4Label);

            this.radPanorama1.PanoramaElement.Children.Add(footerLayout);
            this.radPanorama1.PanoramaElement.Children.Add(serialLayout);
        }
Example #24
0
        private void PrepareHeader()
        {
            StackLayoutElement headerLayout = new StackLayoutElement();
            headerLayout.Orientation = Orientation.Horizontal;
            headerLayout.Margin = new System.Windows.Forms.Padding(0, 35, 0, 0);
            headerLayout.NotifyParentOnMouseInput = true;
            headerLayout.ShouldHandleMouseInput = false;
            headerLayout.StretchHorizontally = false;

            this.backButton = new RadImageItem();
            this.backButton.Margin = new Padding(40, 0, 28, 0);
            this.backButton.Click += new EventHandler(backButton_Click);
            this.backButton.Visibility = ElementVisibility.Hidden;
            this.backButton.Image = Tlieta.Pdms.Properties.Resources.back;
            this.backButton.BackColor = Color.Transparent;
            this.backButton.BorderThickness = new Padding(0, 0, 0, 0);
            headerLayout.Children.Add(this.backButton);

            this.headerLabel = new LightVisualElement();
            this.headerLabel.Text = ConfigurationSettings.AppSettings["ApplicationLabel"].ToString();
            this.headerLabel.Font = new Font("Segoe UI Light", 35, GraphicsUnit.Point);
            this.headerLabel.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
            this.headerLabel.ForeColor = Color.White;
            this.headerLabel.TextAlignment = ContentAlignment.MiddleLeft;
            this.headerLabel.MaxSize = new Size(1030, 110);
            this.headerLabel.NotifyParentOnMouseInput = true;
            this.headerLabel.ShouldHandleMouseInput = false;
            this.headerLabel.StretchHorizontally = false;
            headerLayout.Children.Add(this.headerLabel);

            //StackLayoutElement headerLogo = new StackLayoutElement();
            //headerLogo.Margin = new System.Windows.Forms.Padding(1220, 60, 0, 0);
            //headerLogo.StretchHorizontally = false;

            //this.logoTlietaHeader = new RadImageItem();
            //this.logoTlietaHeader.Image = Tlieta.Pdms.Properties.Resources.TLIETA90;
            //this.logoTlietaHeader.BackColor = Color.Transparent;
            //this.logoTlietaHeader.Margin = new Padding(0, 0, 20, 0);
            //this.logoTlietaHeader.BorderThickness = new Padding(0, 0, 0, 0);
            //headerLogo.Children.Add(this.logoTlietaHeader);

            this.radPanorama1.PanoramaElement.Children.Add(headerLayout);
            //this.radPanorama1.PanoramaElement.Children.Add(headerLogo);
        }
Example #25
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            //left part
            this.stackLayout                          = new StackLayoutElement();
            this.stackLayout.Orientation              = Orientation.Vertical;
            this.stackLayout.ShouldHandleMouseInput   = false;
            this.stackLayout.NotifyParentOnMouseInput = true;
            this.stackLayout.StretchHorizontally      = true;

            this.titleElement                          = new LightVisualElement();
            this.titleElement.Font                     = new Font("Segoe UI", 12, FontStyle.Regular);
            this.titleElement.TextAlignment            = ContentAlignment.MiddleLeft;
            this.titleElement.StretchHorizontally      = true;
            this.titleElement.ShouldHandleMouseInput   = false;
            this.titleElement.NotifyParentOnMouseInput = true;

            this.priceElement = new LightVisualElement();
            this.priceElement.StretchHorizontally      = true;
            this.priceElement.TextAlignment            = ContentAlignment.MiddleLeft;
            this.priceElement.ShouldHandleMouseInput   = false;
            this.priceElement.NotifyParentOnMouseInput = true;

            this.descriptionElement = new LightVisualElement();
            this.descriptionElement.StretchHorizontally = true;
            this.descriptionElement.Font                     = new Font("Segoe UI", 7, FontStyle.Regular);
            this.descriptionElement.TextAlignment            = ContentAlignment.MiddleLeft;
            this.descriptionElement.ShouldHandleMouseInput   = false;
            this.descriptionElement.NotifyParentOnMouseInput = true;

            this.stackLayout.Children.Add(this.titleElement);
            this.stackLayout.Children.Add(this.priceElement);
            this.stackLayout.Children.Add(this.descriptionElement);

            //right part

            this.stackLayout2                          = new StackLayoutElement();
            this.stackLayout2.Orientation              = Orientation.Horizontal;
            this.stackLayout2.ShouldHandleMouseInput   = false;
            this.stackLayout2.NotifyParentOnMouseInput = true;
            this.stackLayout2.StretchHorizontally      = true;
            this.stackLayout2.StretchVertically        = true;

            this.buttonElement1        = new RadButtonElement();
            this.buttonElement1.Text   = "-";
            this.buttonElement1.Margin = new Padding(15);
            this.buttonElement1.Click += ButtonElement1_Click;
            this.stackLayout2.Children.Add(this.buttonElement1);

            this.amountElement        = new RadLabelElement();
            this.amountElement.Margin = new Padding(15);

            this.amountElement.TextAlignment = ContentAlignment.MiddleCenter;
            this.stackLayout2.Children.Add(amountElement);

            this.buttonElement2        = new RadButtonElement();
            this.buttonElement2.Margin = new Padding(15);
            this.buttonElement2.Text   = "+";
            this.buttonElement2.Click += ButtonElement2_Click;
            this.stackLayout2.Children.Add(this.buttonElement2);

            //combine
            this.stackLayout3                          = new StackLayoutElement();
            this.stackLayout3.Orientation              = Orientation.Horizontal;
            this.stackLayout3.ShouldHandleMouseInput   = false;
            this.stackLayout3.NotifyParentOnMouseInput = true;
            this.stackLayout3.StretchHorizontally      = true;

            this.stackLayout3.Children.Add(stackLayout);
            this.stackLayout3.Children.Add(stackLayout2);
            this.Children.Add(this.stackLayout3);
        }