protected override void CreateChildElements() { this.verticalLayout = new StripLayoutPanel(); this.verticalLayout.Orientation = Orientation.Vertical; this.verticalLayout.EqualChildrenWidth = true; this.verticalLayout.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; this.verticalLayout.Class = "ToolStripLayout"; this.toolStripFill = new FillPrimitive(); this.toolStripFill.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.toolStripFill.Class = "Fill"; this.items.Owner = verticalLayout; this.Children.Add(toolStripFill); this.Children.Add(verticalLayout); }
protected override void CreateChildElements() { base.CreateChildElements(); background = new FillPrimitive(); background.ZIndex = BackgroundZedIndex; background.Class = "DropDownButtonBackground"; Children.Add(background); content = new StripLayoutPanel(); content.Orientation = System.Windows.Forms.Orientation.Vertical; content.EqualChildrenWidth = true; content.ZIndex = ContentZedIndex; Children.Add(content); border = new BorderPrimitive(); border.ZIndex = BorderZedIndex; Children.Add(border); }
protected override void CreateChildElements() { this.fill = new FillPrimitive(); this.fill.Class = "BreadCrumbFill"; this.border = new BorderPrimitive(); this.border.Class = "BreadCrumbBorder"; this.strip = new StripLayoutPanel(); this.imgPr = new ImagePrimitive(); this.imgPr.Class = "BreadCrumbImage"; this.fill.Visibility = ElementVisibility.Hidden; this.border.Visibility = ElementVisibility.Hidden; this.Children.Add(this.fill); this.Children.Add(this.border); this.Children.Add(this.strip); this.items.Owner = this.strip; }
protected override void CreateChildElements() { this.BackColor = Color.Gray; this.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; this.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; this.Margin = new Padding(10); ElementWithCaptionLayoutPanel layoutPanel = new ElementWithCaptionLayoutPanel(); layoutPanel.CaptionOnTop = true; captionFillPrimitive = new FillPrimitive(); captionFillPrimitive.Class = "CaptionFill"; captionFillPrimitive.ShouldHandleMouseInput = true; captionFillPrimitive.AutoSizeMode = RadAutoSizeMode.Auto; //Set higher level of z-order, to allow caption to appear above any inner elements captionFillPrimitive.ZIndex = 0; captionFillPrimitive.NotifyParentOnMouseInput = true; bodyFillPrimitive = new FillPrimitive(); bodyFillPrimitive.Class = "BodyFill"; bodyFillPrimitive.AutoSizeMode = RadAutoSizeMode.Auto; StripLayoutPanel stripPanel = new StripLayoutPanel(); stripPanel.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; stripPanel.Orientation = Orientation.Horizontal; picturePrimitive = new ImagePrimitive(); picturePrimitive.BindProperty(ImagePrimitive.ImageProperty, this, BusinessCardElement.PictureProperty, PropertyBindingOptions.OneWay); picturePrimitive.Visibility = ElementVisibility.Collapsed; picturePrimitive.Margin = new Padding(10); picturePrimitive.MinSize = new Size(25, 110); stripPanel.Children.Add(picturePrimitive); this.optionalItems.Add(picturePrimitive); StripLayoutPanel textStripPanel = new StripLayoutPanel(); textStripPanel.Class = "DetailsPanel"; textStripPanel.Orientation = Orientation.Vertical; textStripPanel.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; textStripPanel.Padding = new Padding(5); TextPrimitive nameTextPrimitive = new TextPrimitive(); nameTextPrimitive.Text = "Name"; nameTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.NameProperty, PropertyBindingOptions.OneWay); textStripPanel.Children.Add(nameTextPrimitive); TextPrimitive companyTextPrimitive = new TextPrimitive(); companyTextPrimitive.Text = "Company"; companyTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.CompanyProperty, PropertyBindingOptions.OneWay); textStripPanel.Children.Add(companyTextPrimitive); TextPrimitive departmentTextPrimitive = new TextPrimitive(); departmentTextPrimitive.Text = "Position"; departmentTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.PositionProperty, PropertyBindingOptions.OneWay); departmentTextPrimitive.Visibility = ElementVisibility.Collapsed; departmentTextPrimitive.Class = "DetailsItem"; textStripPanel.Children.Add(departmentTextPrimitive); this.optionalItems.Add(departmentTextPrimitive); TextPrimitive phoneTextPrimitive = new TextPrimitive(); phoneTextPrimitive.Text = "Phone"; phoneTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.PhoneProperty, PropertyBindingOptions.OneWay); phoneTextPrimitive.Visibility = ElementVisibility.Collapsed; phoneTextPrimitive.Class = "DetailsItem"; textStripPanel.Children.Add(phoneTextPrimitive); this.optionalItems.Add(phoneTextPrimitive); TextPrimitive faxTextPrimitive = new TextPrimitive(); faxTextPrimitive.Text = "Fax"; faxTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.FaxProperty, PropertyBindingOptions.OneWay); faxTextPrimitive.Visibility = ElementVisibility.Collapsed; faxTextPrimitive.Class = "DetailsItem"; textStripPanel.Children.Add(faxTextPrimitive); this.optionalItems.Add(faxTextPrimitive); TextPrimitive emailTextPrimitive = new TextPrimitive(); emailTextPrimitive.Text = "E-mail"; emailTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.EmailProperty, PropertyBindingOptions.OneWay); emailTextPrimitive.Visibility = ElementVisibility.Collapsed; emailTextPrimitive.Class = "DetailsItem"; textStripPanel.Children.Add(emailTextPrimitive); this.optionalItems.Add(emailTextPrimitive); TextPrimitive addressTextPrimitive = new TextPrimitive(); addressTextPrimitive.Text = "Address"; addressTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.AddressProperty, PropertyBindingOptions.OneWay); addressTextPrimitive.Visibility = ElementVisibility.Collapsed; addressTextPrimitive.Class = "DetailsItem"; textStripPanel.Children.Add(addressTextPrimitive); this.optionalItems.Add(addressTextPrimitive); stripPanel.Children.Add(textStripPanel); bodyFillPrimitive.Children.Add(stripPanel); captionTextPrimitive = new TextPrimitive(); captionTextPrimitive.Text = "Name"; captionTextPrimitive.Font = new Font(this.Font, FontStyle.Bold); captionTextPrimitive.BindProperty(TextPrimitive.TextProperty, this, BusinessCardElement.NameProperty, PropertyBindingOptions.OneWay); captionTextPrimitive.MinSize = new Size(120, 10); captionFillPrimitive.Children.Add(captionTextPrimitive); layoutPanel.Children.Add(captionFillPrimitive); captionFillPrimitive.SetValue(ElementWithCaptionLayoutPanel.CaptionElementProperty, true); layoutPanel.Children.Add(bodyFillPrimitive); this.Children.Add(layoutPanel); BorderPrimitive borderPrimitive = new BorderPrimitive(); borderPrimitive.BorderThickness = new Padding(2); this.Children.Add(borderPrimitive); }