protected override bool ShouldPaintChild(RadElement element) { if (this.checkMarkPrimitive != null && this.paintSystemSkin.HasValue) { CheckPrimitive checkElement = this.checkMarkPrimitive.CheckElement; bool? paintSystemSkin1 = this.paintSystemSkin; int num1 = paintSystemSkin1.GetValueOrDefault() ? 0 : (paintSystemSkin1.HasValue ? 1 : 0); checkElement.ShouldPaint = num1 != 0; BorderPrimitive border = this.checkMarkPrimitive.Border; bool? paintSystemSkin2 = this.paintSystemSkin; int num2 = paintSystemSkin2.GetValueOrDefault() ? 0 : (paintSystemSkin2.HasValue ? 1 : 0); border.ShouldPaint = num2 != 0; FillPrimitive fill = this.checkMarkPrimitive.Fill; bool? paintSystemSkin3 = this.paintSystemSkin; int num3 = paintSystemSkin3.GetValueOrDefault() ? 0 : (paintSystemSkin3.HasValue ? 1 : 0); fill.ShouldPaint = num3 != 0; } bool?paintSystemSkin = this.paintSystemSkin; if ((!paintSystemSkin.GetValueOrDefault() ? 0 : (paintSystemSkin.HasValue ? 1 : 0)) == 0) { return(base.ShouldPaintChild(element)); } if (element != this.ButtonFillElement) { return(element != this.BorderElement); } return(false); }
/// <summary> /// Creates child elements. /// </summary> protected override void CreateChildElements() { this.overFlowPrimitive = new OverflowPrimitive(ArrowDirection.Down); this.overFlowPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.overFlowPrimitive.AutoSize = false; this.overFlowPrimitive.Alignment = ContentAlignment.BottomLeft; this.overFlowPrimitive.Class = "overFlowButton"; this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "overFlowButtonFill"; this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "overFlowBorder"; this.borderPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.borderPrimitive.Visibility = ElementVisibility.Hidden; this.hiddenItems = new HiddenItemsPrimitive(); this.hiddenItems.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; this.hiddenItems.AutoSize = true; this.hiddenItems.Class = "OverFlowArrows"; this.hiddenItems.Visibility = ElementVisibility.Hidden; this.hiddenItems.BackColor = Color.White; this.hiddenItems.BackColor2 = Color.Black; this.Children.Add(this.fillPrimitive); this.Children.Add(this.borderPrimitive); this.Children.Add(this.hiddenItems); this.Children.Add(this.overFlowPrimitive); }
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() { int num1 = (int)this.SetDefaultValueOverride(RadButtonItem.TextImageRelationProperty, (object)TextImageRelation.ImageBeforeText); this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadMenuItemFillPrimitive"; this.fillPrimitive.BackColor = Color.Empty; this.fillPrimitive.GradientStyle = GradientStyles.Solid; this.Children.Add((RadElement)this.fillPrimitive); this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadMenuItemBorderPrimitive"; this.Children.Add((RadElement)this.borderPrimitive); this.layout = new RadMenuItemLayout(); this.layout.Class = "RadMenuItemLayout"; this.Children.Add((RadElement)this.layout); int num2 = (int)this.layout.ImagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, (RadObject)this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay); int num3 = (int)this.layout.ImagePrimitive.BindProperty(ImagePrimitive.ImageProperty, (RadObject)this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay); int num4 = (int)this.layout.ImagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, (RadObject)this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay); int num5 = (int)this.layout.Checkmark.BindProperty(RadCheckmark.CheckStateProperty, (RadObject)this, RadMenuItem.CheckStateProperty, PropertyBindingOptions.OneWay); int num6 = (int)this.layout.Text.BindProperty(TextPrimitive.TextProperty, (RadObject)this, RadItem.TextProperty, PropertyBindingOptions.OneWay); int num7 = (int)this.layout.Text.BindProperty(VisualElement.ForeColorProperty, (RadObject)this, VisualElement.ForeColorProperty, PropertyBindingOptions.TwoWay); int num8 = (int)this.layout.Description.BindProperty(VisualElement.FontProperty, (RadObject)this, RadMenuItem.DescriptionFontProperty, PropertyBindingOptions.OneWay); int num9 = (int)this.layout.Shortcut.BindProperty(TextPrimitive.TextProperty, (RadObject)this, RadMenuItem.HintTextProperty, PropertyBindingOptions.OneWay); int num10 = (int)this.layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.DisplayStyleProperty, (RadObject)this, RadButtonItem.DisplayStyleProperty, PropertyBindingOptions.OneWay); int num11 = (int)this.layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.ImageAlignmentProperty, (RadObject)this, RadButtonItem.ImageAlignmentProperty, PropertyBindingOptions.OneWay); int num12 = (int)this.layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.TextAlignmentProperty, (RadObject)this, RadButtonItem.TextAlignmentProperty, PropertyBindingOptions.OneWay); int num13 = (int)this.layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.TextImageRelationProperty, (RadObject)this, RadButtonItem.TextImageRelationProperty, PropertyBindingOptions.OneWay); }
protected override void CreateChildElements() { this.fill = new FillPrimitive(); this.fill.Class = "GripFill"; this.Children.Add((RadElement)this.fill); this.border = new BorderPrimitive(); this.border.Class = "GripBorder"; this.border.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.Children.Add((RadElement)this.border); this.gripItem = new SizeGripItem(); this.gripItem.StretchHorizontally = false; this.gripItem.StretchVertically = false; this.gripItem.Class = "GripNS"; this.gripItem.Image.Class = "GripNSImage"; this.gripItem.SizingMode = SizeGripItem.SizingModes.Vertical; this.gripItem.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; this.gripItem.Alignment = System.Drawing.ContentAlignment.BottomCenter; this.Children.Add((RadElement)this.gripItem); this.gripItem2 = new SizeGripItem(); this.gripItem2.StretchHorizontally = false; this.gripItem2.StretchVertically = false; this.gripItem2.Class = "GripNSEW"; this.gripItem2.Image.Class = "GripNSEWImage"; this.gripItem2.SizingMode = SizeGripItem.SizingModes.Both; this.gripItem2.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; this.gripItem2.RightToLeft = this.RightToLeft; this.gripItem2.Alignment = System.Drawing.ContentAlignment.MiddleRight; this.Children.Add((RadElement)this.gripItem2); }
protected override void CreateChildElements() { this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadMenuHeaderItemFillPrimitive"; this.fillPrimitive.BackColor = Color.Empty; this.fillPrimitive.GradientStyle = GradientStyles.Solid; this.fillPrimitive.Name = "MenuHeaderItemFill"; this.Children.Add((RadElement)this.fillPrimitive); this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadMenuHeaderItemBorderPrimitive"; this.borderPrimitive.Name = "MenuHeaderItemBorder"; this.Children.Add((RadElement)this.borderPrimitive); this.imagePrimitive = new ImagePrimitive(); int num1 = (int)this.imagePrimitive.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, (object)true); int num2 = (int)this.imagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, (RadObject)this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay); int num3 = (int)this.imagePrimitive.BindProperty(ImagePrimitive.ImageProperty, (RadObject)this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay); int num4 = (int)this.imagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, (RadObject)this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay); this.imagePrimitive.Class = "RadMenuHeaderItemImagePrimitive"; this.Children.Add((RadElement)this.imagePrimitive); this.textPrimitive = new TextPrimitive(); this.textPrimitive.Class = "RadMenuHeaderItemText"; this.Children.Add((RadElement)this.textPrimitive); int num5 = (int)this.textPrimitive.BindProperty(TextPrimitive.TextProperty, (RadObject)this, RadItem.TextProperty, PropertyBindingOptions.TwoWay); int num6 = (int)this.textPrimitive.BindProperty(VisualElement.FontProperty, (RadObject)this, VisualElement.FontProperty, PropertyBindingOptions.TwoWay); }
protected override void CreateChildElements() { base.CreateChildElements(); this.editorContentElement = new RadCalculatorEditorContentElement(this); this.Children.Add((RadElement)this.editorContentElement); this.arrowButton = new RadCalculatorArrowButtonElement(); this.arrowButton.MinSize = new Size(RadArrowButtonElement.RadArrowButtonDefaultSize.Width, this.arrowButton.ArrowFullSize.Height); this.arrowButton.ClickMode = ClickMode.Press; this.arrowButton.Click += new EventHandler(this.popupOpenButton_Click); this.arrowButton.KeyPress += new KeyPressEventHandler(this.arrowButton_KeyPress); this.Children.Add((RadElement)this.arrowButton); this.calculatorContentElement = new RadCalculatorContentElement(this); RadCalculatorContentElement calculatorContentElement = new RadCalculatorContentElement(this); calculatorContentElement.Visibility = ElementVisibility.Collapsed; this.Children.Add((RadElement)calculatorContentElement); this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "CalculatorBorder"; this.Children.Add((RadElement)this.borderPrimitive); this.fillPrimitive = new FillPrimitive(); int num1 = (int)this.fillPrimitive.BindProperty(RadElement.AutoSizeModeProperty, (RadObject)this, RadElement.AutoSizeModeProperty, PropertyBindingOptions.TwoWay); this.fillPrimitive.Class = "CalculatorFill"; int num2 = (int)this.fillPrimitive.SetDefaultValueOverride(RadElement.ZIndexProperty, (object)-1); this.fillPrimitive.RadPropertyChanged += new RadPropertyChangedEventHandler(this.fillPrimitive_RadPropertyChanged); this.Children.Add((RadElement)this.fillPrimitive); this.memoryElement = new RadCalculatorMemoryElement(); this.Children.Add((RadElement)this.memoryElement); }
private RadElement CreateHeaderColumnElement() { this.headerElement = new RadElement(); this.headerElement.Visibility = ElementVisibility.Collapsed; this.headerColumnFill = new FillPrimitive(); this.headerColumnFill.Class = "RadSubMenuPanelHeaderFill"; this.headerElement.Children.Add((RadElement)this.headerColumnFill); this.headerColumnBorder = new BorderPrimitive(); this.headerColumnBorder.Class = "RadSubMenuPanelHeaderBorder"; this.headerElement.Children.Add((RadElement)this.headerColumnBorder); this.headerColumnElement = new ImageAndTextLayoutPanel(); this.headerColumnElement.Class = "RadSubMenuPanelHeaderColumn"; this.headerColumnElement.ZIndex = 1; this.headerColumnElement.AngleTransform = 270f; this.headerElement.Children.Add((RadElement)this.headerColumnElement); this.headerColumnText = new TextPrimitive(); int num1 = (int)this.headerColumnText.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, (object)true); this.headerColumnText.Class = "RadMenuItemTextPrimitive"; this.headerColumnElement.Children.Add((RadElement)this.headerColumnText); this.headerColumnImage = new ImagePrimitive(); int num2 = (int)this.headerColumnImage.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, (object)true); this.headerColumnImage.Class = "RadMenuItemImagePrimitive"; this.headerColumnElement.Children.Add((RadElement)this.headerColumnImage); return(this.headerElement); }
protected override void CreateChildElements() { // fill this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadMenuItemFillPrimitive"; this.fillPrimitive.Name = "MenuButtonItemFill"; this.fillPrimitive.BackColor = Color.Empty; this.fillPrimitive.GradientStyle = GradientStyles.Solid; this.Children.Add(this.fillPrimitive); // border this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadMenuItemBorderPrimitive"; this.borderPrimitive.Name = "MenuButtonItemBorder"; this.Children.Add(this.borderPrimitive); this.buttonElement = new RadButtonElement(); this.buttonElement.CanFocus = false; this.buttonElement.Click += buttonElement_Click; this.buttonElement.ImagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay); this.buttonElement.ImagePrimitive.BindProperty(ImagePrimitive.ImageProperty, this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay); this.buttonElement.ImagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay); this.buttonElement.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.Children.Add(this.buttonElement); this.buttonElement.BindProperty(RadButtonElement.TextProperty, this, RadButtonItem.TextProperty, PropertyBindingOptions.TwoWay); }
/// <summary> /// Creates child elements /// </summary> protected override void CreateChildElements() { this.stripLayout = new ToolStripElementLayout(); this.stripLayout.Orientation = Orientation.Horizontal; this.stripLayout.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren; this.stripLayout.Class = "ToolStripElementLayout"; this.border = new BorderPrimitive(); this.stripFill = new FillPrimitive(); this.stripFill.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.stripFill.Class = "ToolStripElementFill"; this.Margin = new Padding(this.Margin.Left, 1, this.Margin.Right, this.Margin.Bottom); this.Children.Add(this.stripLayout); border.Class = "ToolStripElementBorder"; border.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.Children.Add(border); this.items = new RadItemOwnerCollection(); this.items.ItemTypes = new Type[] { typeof(RadToolStripItem) }; this.items.ItemsChanged += new ItemChangedDelegate(items_ItemsChanged); this.items.Owner = stripLayout; }
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); }
private void afterSelected() { string ret = ""; foreach (RadItem ri in this.Items) { RadCheckComboBoxItem chkcbx = ri as RadCheckComboBoxItem; if (chkcbx == null) { return; } FillPrimitive fp = ri.Children[0] as FillPrimitive; TextPrimitive tp = ri.Children[2].Children[1].Children[0] as TextPrimitive; ret += chkcbx.Text //+ ",Active=" + chkcbx.Active //+ ",IsMouseOver=" + chkcbx.IsMouseOver //+ ",BackColor=" + chkcbx.BackColor.ToString() + ",FillPrimitive.BackColor=" + fp.BackColor.ToString() + ",FillPrimitive.Visibility=" + fp.Visibility.ToString() + ",FillPrimitive.Bounds=" + fp.Bounds.ToString() //+ ",FillPrimitive.ForeColor=" + fp.ForeColor.ToString() //+ ",TextPrimitive.BackColor=" + tp.BackColor.ToString() + ",TextPrimitive.ForeColor=" + tp.ForeColor.ToString() + ";\r\n"; } System.Diagnostics.Debug.WriteLine(ret); }
private void setSelectedColor(RadItem selectedItem) { foreach (RadItem ri in this.ComboBoxElement.ListBoxElement.Items) { if (ri == selectedItem) { FillPrimitive fp = ri.Children[0] as FillPrimitive; fp.Visibility = ElementVisibility.Visible; fp.GradientStyle = GradientStyles.Linear; //fp.BackColor = Color.Orange; fp.BackColor = Color.FromArgb(245, 201, 154); fp.BackColor2 = Color.FromArgb(250, 174, 96); fp.BackColor3 = Color.FromArgb(248, 142, 42); fp.BackColor4 = Color.FromArgb(250, 193, 101); BorderPrimitive bp = ri.Children[1] as BorderPrimitive; bp.Visibility = ElementVisibility.Hidden; TextPrimitive tp = ri.Children[2].Children[1].Children[0] as TextPrimitive; tp.ForeColor = Color.Black; } else { FillPrimitive fp = ri.Children[0] as FillPrimitive; //fp.BackColor = Color.White; fp.Visibility = ElementVisibility.Hidden; BorderPrimitive bp = ri.Children[1] as BorderPrimitive; bp.Visibility = ElementVisibility.Hidden; TextPrimitive tp = ri.Children[2].Children[1].Children[0] as TextPrimitive; tp.ForeColor = Color.Black; } } }
protected override void CreateChildElements() { this.scrollPanel = this.CreateScrollLayoutPanel(); //this.scrollPanel.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.scrollPanel.Scroll += delegate(object sender, ScrollPanelEventArgs args) { OnScroll(args); }; this.scrollPanel.ScrollNeedsChanged += delegate(object sender, ScrollNeedsEventArgs args) { OnScrollNeedsChanged(args); }; this.scrollPanel.ScrollParametersChanged += delegate(object sender, RadPanelScrollParametersEventArgs args) { OnScrollParametersChanged(args); }; this.border = new BorderPrimitive(); this.border.Class = "RadScrollViewBorder"; this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadScrollViewFill"; this.fillPrimitive.GradientAngle = 45f; this.Children.Add(this.fillPrimitive); this.Children.Add(this.border); this.Children.Add(this.scrollPanel); this.scrollPanel.AutoSize = this.AutoSize; this.scrollPanel.AutoSizeMode = this.AutoSizeMode; this.scrollPanel.BindProperty(RadElement.AutoSizeProperty, this, RadElement.AutoSizeProperty, PropertyBindingOptions.OneWay); this.scrollPanel.BindProperty(RadElement.AutoSizeModeProperty, this, RadElement.AutoSizeModeProperty, PropertyBindingOptions.OneWay); }
/// <summary> /// create child items /// </summary> protected override void CreateChildElements() { this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadPanelBorder"; this.borderPrimitive.BoxStyle = BorderBoxStyle.OuterInnerBorders; this.fillPrimitive = new FillPrimitive(); fillPrimitive.BackColor = Color.Transparent; fillPrimitive.BackColor2 = Color.Transparent; fillPrimitive.BackColor3 = Color.Transparent; fillPrimitive.BackColor4 = Color.Transparent; fillPrimitive.Class = "RadPanelFill"; this.textPrimitive = new TextPrimitive(); this.textPrimitive.Alignment = ContentAlignment.MiddleLeft; this.textPrimitive.BindProperty(TextPrimitive.TextProperty, this, RadItem.TextProperty, PropertyBindingOptions.TwoWay); this.imagePrimitive = new ImagePrimitive(); this.imagePrimitive.Alignment = ContentAlignment.MiddleLeft; this.Children.Add(this.fillPrimitive); this.Children.Add(this.borderPrimitive); this.Children.Add(this.textPrimitive); this.Children.Add(this.imagePrimitive); }
public Form1() { InitializeComponent(); border = (BorderPrimitive)this.radPanel1.PanelElement.Children[1]; fill = (FillPrimitive)this.radPanel1.PanelElement.Children[0]; }
public override object EditValue( ITypeDescriptorContext context, System.IServiceProvider provider, object value) { if (value == null) { return((object)null); } RadGradientDialog radGradientDialog = new RadGradientDialog(); FillPrimitive fillPrimitive = (FillPrimitive)value; PropertyDescriptorCollection properties = TypeDescriptor.GetProperties((object)fillPrimitive); radGradientDialog.Fill.BackColor = (Color)properties.Find("BackColor", true).GetValue((object)fillPrimitive); radGradientDialog.Fill.BackColor2 = (Color)properties.Find("BackColor2", true).GetValue((object)fillPrimitive); radGradientDialog.Fill.BackColor3 = (Color)properties.Find("BackColor3", true).GetValue((object)fillPrimitive); radGradientDialog.Fill.BackColor4 = (Color)properties.Find("BackColor4", true).GetValue((object)fillPrimitive); radGradientDialog.Fill.GradientAngle = (float)properties.Find("GradientAngle", true).GetValue((object)fillPrimitive); radGradientDialog.Fill.GradientPercentage = (float)properties.Find("GradientPercentage", true).GetValue((object)fillPrimitive); radGradientDialog.Fill.GradientPercentage2 = (float)properties.Find("GradientPercentage2", true).GetValue((object)fillPrimitive); radGradientDialog.Fill.GradientStyle = (GradientStyles)properties.Find("GradientStyle", true).GetValue((object)fillPrimitive); if (radGradientDialog.ShowDialog() == DialogResult.OK) { properties.Find("BackColor", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.BackColor); properties.Find("BackColor2", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.BackColor2); properties.Find("BackColor3", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.BackColor3); properties.Find("BackColor4", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.BackColor4); properties.Find("GradientAngle", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.GradientAngle); properties.Find("GradientPercentage", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.GradientPercentage); properties.Find("GradientPercentage2", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.GradientPercentage2); properties.Find("GradientStyle", false).SetValue((object)fillPrimitive, (object)radGradientDialog.Fill.GradientStyle); } return(value); }
protected override void CreateChildElements() { this.horizontalScrollBar = new RadScrollBarElement(); this.horizontalScrollBar.ScrollType = ScrollType.Horizontal; this.horizontalScrollBar.Visibility = ElementVisibility.Collapsed; this.horizontalScrollBar.Minimum = 0; this.horizontalScrollBar.ZIndex = 1000; this.horizontalScrollBar.Class = "ScrollPanelHorizontalScrollBar"; this.horizontalScrollBar.ThemeRole = "RadScrollBarElement"; this.Children.Add(this.horizontalScrollBar); this.verticalScrollBar = new RadScrollBarElement(); this.verticalScrollBar.ScrollType = ScrollType.Vertical; this.verticalScrollBar.Visibility = ElementVisibility.Collapsed; this.verticalScrollBar.Minimum = 0; this.verticalScrollBar.ZIndex = 1000; this.verticalScrollBar.Class = "ScrollPanelVerticalScrollBar"; this.verticalScrollBar.ThemeRole = "RadScrollBarElement"; this.Children.Add(this.verticalScrollBar); this.blankSpot = new FillPrimitive(); this.blankSpot.Class = "ScrollPanelBlankSpotFill"; this.blankSpot.Visibility = ElementVisibility.Collapsed; this.blankSpot.ZIndex = 1000; this.blankSpot.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None; this.Children.Add(this.blankSpot); this.horizontalScrollBar.Scroll += OnHScroll; this.verticalScrollBar.Scroll += OnVScroll; this.horizontalScrollBar.ScrollParameterChanged += new EventHandler(OnScrollBarParameterChanged); this.verticalScrollBar.ScrollParameterChanged += new EventHandler(OnScrollBarParameterChanged); }
private Color GetFillPrimitiveAverageColor(FillPrimitive fill) { Color result = fill.BackColor; if (fill.NumberOfColors == 2) { result = Color.FromArgb( (byte)(result.A + fill.BackColor2.A) / 2, (byte)(result.R + fill.BackColor2.R) / 2, (byte)(result.G + fill.BackColor2.G) / 2, (byte)(result.B + fill.BackColor2.B) / 2); } else if (fill.NumberOfColors == 3) { result = Color.FromArgb( (byte)(result.A + fill.BackColor2.A + fill.BackColor3.A) / 3, (byte)(result.R + fill.BackColor2.R + fill.BackColor3.R) / 3, (byte)(result.G + fill.BackColor2.G + fill.BackColor3.G) / 3, (byte)(result.B + fill.BackColor2.B + fill.BackColor3.B) / 3); } else if (fill.NumberOfColors == 4) { result = Color.FromArgb( (byte)(result.A + fill.BackColor2.A + fill.BackColor3.A + fill.BackColor3.A) / 4, (byte)(result.R + fill.BackColor2.R + fill.BackColor3.R + fill.BackColor3.R) / 4, (byte)(result.G + fill.BackColor2.G + fill.BackColor3.G + fill.BackColor3.G) / 4, (byte)(result.B + fill.BackColor2.B + fill.BackColor3.B + fill.BackColor3.B) / 4); } return(result); }
protected override void CreateChildElements() { base.CreateChildElements(); this.arrowButton = this.CreateArrowButtonElement(); int num1 = (int)this.arrowButton.Border.SetDefaultValueOverride(RadElement.VisibilityProperty, (object)ElementVisibility.Collapsed); this.arrowButton.ClickMode = ClickMode.Press; this.arrowButton.Click += new EventHandler(this.arrow_Click); this.arrowButton.ZIndex = 1; this.arrowButton.StretchHorizontally = false; this.arrowButton.StretchVertically = true; this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "DropDownListBorder"; this.Children.Add((RadElement)this.borderPrimitive); this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "DropDownFill"; this.fillPrimitive.ZIndex = -1; this.fillPrimitive.RadPropertyChanged += new RadPropertyChangedEventHandler(this.fillPrimitive_RadPropertyChanged); this.Children.Add((RadElement)this.fillPrimitive); StackLayoutElement stackLayoutElement = new StackLayoutElement(); stackLayoutElement.CanFocus = false; stackLayoutElement.StretchVertically = true; stackLayoutElement.StretchHorizontally = true; stackLayoutElement.Class = "DropDownListStack"; stackLayoutElement.FitInAvailableSize = true; this.Children.Add((RadElement)stackLayoutElement); this.containerElement = new RadDropDownListEditableAreaElement((RadDropDownListElement)null); this.editableElement = (RadTextBoxElement)this.containerElement.TextBox; this.editableElement.Visibility = ElementVisibility.Hidden; this.containerElement.DrawText = true; stackLayoutElement.Children.Add((RadElement)this.containerElement); stackLayoutElement.Children.Add((RadElement)this.arrowButton); int num2 = (int)this.BindProperty(RadItem.TextProperty, (RadObject)this.editableElement, RadItem.TextProperty, PropertyBindingOptions.TwoWay); }
private void PaintTitleBarExtensions(IGraphics graphics) { RadRibbonBar ribbonBar = this.GetRibbonBar(); if (ribbonBar == null) { return; } if (ribbonBar.RibbonBarElement.Children.Count > 5) { FillPrimitive titleBarFill = ribbonBar.RibbonBarElement.CaptionFill as FillPrimitive; BorderPrimitive fillPrimitiveBorder = ribbonBar.RibbonBarElement.CaptionBorder as BorderPrimitive; if (titleBarFill != null) { this.PaintExtensionsFill(graphics, titleBarFill); } if (fillPrimitiveBorder != null && fillPrimitiveBorder.Visibility == ElementVisibility.Visible) { this.PaintExtensionsBorders(graphics, titleBarFill, fillPrimitiveBorder); } } }
protected override void CreateChildElements() { this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadMenuItemFillPrimitive"; this.fillPrimitive.Name = "MenuComboItemFill"; this.fillPrimitive.BackColor = Color.Empty; this.fillPrimitive.GradientStyle = GradientStyles.Solid; this.Children.Add((RadElement)this.fillPrimitive); this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Visibility = ElementVisibility.Collapsed; this.borderPrimitive.Class = "RadMenuComboItemBorderPrimitive"; this.borderPrimitive.Name = "MenuComboItemBorder"; this.Children.Add((RadElement)this.borderPrimitive); this.imagePrimitive = new ImagePrimitive(); int num1 = (int)this.imagePrimitive.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, (object)true); int num2 = (int)this.imagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, (RadObject)this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay); int num3 = (int)this.imagePrimitive.BindProperty(ImagePrimitive.ImageProperty, (RadObject)this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay); int num4 = (int)this.imagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, (RadObject)this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay); this.imagePrimitive.Class = "RadMenuComboItemImagePrimitive"; this.Children.Add((RadElement)this.imagePrimitive); this.comboBoxElement = new RadDropDownListElement(); this.comboBoxElement.MinSize = new Size(100, 20); this.comboBoxElement.BindingContext = new BindingContext(); this.Children.Add((RadElement)this.comboBoxElement); if (!this.DesignMode) { return; } this.comboBoxElement.ArrowButton.RoutedEventBehaviors.Add((RoutedEventBehavior) new RadMenuComboItem.CancelMouseBehavior()); }
protected override void CreateChildElements() { // fill this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadMenuHeaderItemFillPrimitive"; this.fillPrimitive.BackColor = Color.Empty; this.fillPrimitive.GradientStyle = GradientStyles.Solid; this.fillPrimitive.Name = "MenuHeaderItemFill"; this.Children.Add(this.fillPrimitive); // border this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadMenuHeaderItemBorderPrimitive"; this.borderPrimitive.Name = "MenuHeaderItemBorder"; this.Children.Add(this.borderPrimitive); // image this.imagePrimitive = new ImagePrimitive(); this.imagePrimitive.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, true); this.imagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay); this.imagePrimitive.BindProperty(ImagePrimitive.ImageProperty, this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay); this.imagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay); this.imagePrimitive.Class = "RadMenuHeaderItemImagePrimitive"; this.Children.Add(this.imagePrimitive); this.textPrimitive = new TextPrimitive(); this.textPrimitive.Class = "RadMenuHeaderItemText"; this.Children.Add(this.textPrimitive); this.textPrimitive.BindProperty(TextPrimitive.TextProperty, this, RadButtonItem.TextProperty, PropertyBindingOptions.TwoWay); }
private void PaintExtensionsBorders( IGraphics graphics, FillPrimitive titleBarFill, BorderPrimitive fillPrimitiveBorder) { Rectangle rectangle1 = new Rectangle(new Point(1, titleBarFill.ControlBoundingRectangle.Y + 1), new Size(3, titleBarFill.ControlBoundingRectangle.Height)); int y1 = (double)fillPrimitiveBorder.BottomWidth > 1.0 ? (int)((double)rectangle1.Bottom - (double)fillPrimitiveBorder.BottomWidth) : rectangle1.Bottom - 2; int y2 = (double)fillPrimitiveBorder.BottomWidth > 1.0 ? (int)((double)rectangle1.Bottom - (double)fillPrimitiveBorder.BottomWidth / 2.0) : rectangle1.Bottom - 1; Point point1 = new Point(rectangle1.X, y1); Point point2 = new Point(rectangle1.Right, y1); Point point3 = new Point(rectangle1.X, y2); Point point4 = new Point(rectangle1.Right, y2); graphics.DrawLine(fillPrimitiveBorder.BottomShadowColor, point1.X, point1.Y, point2.X, point2.Y); graphics.DrawLine(fillPrimitiveBorder.BottomColor, point3.X, point3.Y, point4.X, point4.Y); Rectangle rectangle2 = new Rectangle(new Point(this.Size.Width - 4, titleBarFill.ControlBoundingRectangle.Y + 1), new Size(3, titleBarFill.ControlBoundingRectangle.Height)); int y3 = (double)fillPrimitiveBorder.BottomWidth > 1.0 ? (int)((double)rectangle2.Bottom - (double)fillPrimitiveBorder.BottomWidth) : rectangle2.Bottom - 2; int y4 = (double)fillPrimitiveBorder.BottomWidth > 1.0 ? (int)((double)rectangle2.Bottom - (double)fillPrimitiveBorder.BottomWidth / 2.0) : rectangle2.Bottom - 1; Point point5 = new Point(rectangle2.X, y3); Point point6 = new Point(rectangle2.Right, y3); Point point7 = new Point(rectangle2.X, y4); Point point8 = new Point(rectangle2.Right, y4); graphics.DrawLine(fillPrimitiveBorder.BottomShadowColor, point5.X, point5.Y, point6.X, point6.Y); graphics.DrawLine(fillPrimitiveBorder.BottomColor, point7.X, point7.Y, point8.X, point8.Y); }
protected override void CreateChildElements() { this.SetDefaultValueOverride(TextImageRelationProperty, TextImageRelation.ImageBeforeText); // fill this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadMenuItemFillPrimitive"; this.fillPrimitive.BackColor = Color.Empty; this.fillPrimitive.GradientStyle = GradientStyles.Solid; this.Children.Add(this.fillPrimitive); // border this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadMenuItemBorderPrimitive"; this.Children.Add(this.borderPrimitive); // layout this.layout = new RadMenuItemLayout(); this.layout.Class = "RadMenuItemLayout"; this.Children.Add(layout); // bindings layout.ImagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay); layout.ImagePrimitive.BindProperty(ImagePrimitive.ImageProperty, this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay); layout.ImagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay); layout.Checkmark.BindProperty(RadCheckmark.CheckStateProperty, this, RadMenuItem.CheckStateProperty, PropertyBindingOptions.OneWay); layout.Text.BindProperty(TextPrimitive.TextProperty, this, RadButtonItem.TextProperty, PropertyBindingOptions.OneWay); layout.Description.BindProperty(TextPrimitive.FontProperty, this, RadMenuItem.DescriptionFontProperty, PropertyBindingOptions.OneWay); layout.Shortcut.BindProperty(TextPrimitive.TextProperty, this, RadMenuItem.HintTextProperty, PropertyBindingOptions.OneWay); layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.DisplayStyleProperty, this, RadButtonItem.DisplayStyleProperty, PropertyBindingOptions.OneWay); layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.ImageAlignmentProperty, this, RadButtonItem.ImageAlignmentProperty, PropertyBindingOptions.OneWay); layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.TextAlignmentProperty, this, RadButtonItem.TextAlignmentProperty, PropertyBindingOptions.OneWay); layout.InternalLayoutPanel.BindProperty(ImageAndTextLayoutPanel.TextImageRelationProperty, this, RadButtonItem.TextImageRelationProperty, PropertyBindingOptions.OneWay); }
private RadElement CreateHeaderColumnElement() { headerElement = new RadElement(); headerElement.Visibility = ElementVisibility.Collapsed; // fill headerColumnFill = new FillPrimitive(); headerColumnFill.Class = "RadSubMenuPanelHeaderFill"; headerElement.Children.Add(headerColumnFill); // border headerColumnBorder = new BorderPrimitive(); headerColumnBorder.Class = "RadSubMenuPanelHeaderBorder"; headerElement.Children.Add(headerColumnBorder); headerColumnElement = new ImageAndTextLayoutPanel(); headerColumnElement.Class = "RadSubMenuPanelHeaderColumn"; headerColumnElement.ZIndex = 1; headerColumnElement.AngleTransform = 270; headerElement.Children.Add(headerColumnElement); // text headerColumnText = new TextPrimitive(); headerColumnText.SetValue(ImageAndTextLayoutPanel.IsTextPrimitiveProperty, true); headerColumnText.Class = "RadMenuItemTextPrimitive"; headerColumnElement.Children.Add(headerColumnText); // image headerColumnImage = new ImagePrimitive(); headerColumnImage.SetValue(ImageAndTextLayoutPanel.IsImagePrimitiveProperty, true); headerColumnImage.Class = "RadMenuItemImagePrimitive"; headerColumnElement.Children.Add(this.headerColumnImage); return(headerElement); }
protected override void CreateChildElements() { this.arrow = new ArrowPrimitive(ArrowDirection.Down); this.arrow.Class = "RadArrowButtonArrow"; this.arrow.AutoSize = false; this.arrow.Alignment = ContentAlignment.MiddleCenter; this.overflowArrow = new OverflowPrimitive(ArrowDirection.Down); this.overflowArrow.Class = "RadArrowButtonOverflowArrow"; this.overflowArrow.AutoSize = false; this.overflowArrow.Alignment = ContentAlignment.MiddleCenter; this.overflowArrow.Visibility = ElementVisibility.Collapsed; this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadArrowButtonFill"; this.fillPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadArrowButtonBorder"; this.borderPrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.imagePrimitive = new ImagePrimitive(); this.imagePrimitive.Class = "RadArrowButtonImage"; this.imagePrimitive.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize; this.imagePrimitive.Alignment = ContentAlignment.MiddleCenter; this.Children.Add(this.fillPrimitive); this.Children.Add(this.borderPrimitive); this.Children.Add(this.arrow); this.Children.Add(this.overflowArrow); this.Children.Add(this.imagePrimitive); }
protected override void CreateChildElements() { this.fillPrimitive = new FillPrimitive(); this.fillPrimitive.Class = "RadMenuItemFillPrimitive"; this.fillPrimitive.Name = "MenuButtonItemFill"; this.fillPrimitive.BackColor = Color.Empty; this.fillPrimitive.GradientStyle = GradientStyles.Solid; this.Children.Add((RadElement)this.fillPrimitive); this.borderPrimitive = new BorderPrimitive(); this.borderPrimitive.Class = "RadMenuItemBorderPrimitive"; this.borderPrimitive.Name = "MenuButtonItemBorder"; this.Children.Add((RadElement)this.borderPrimitive); this.buttonElement = new RadButtonElement(); this.buttonElement.CanFocus = false; this.buttonElement.Click += new EventHandler(this.buttonElement_Click); int num1 = (int)this.buttonElement.ImagePrimitive.BindProperty(ImagePrimitive.ImageIndexProperty, (RadObject)this, RadButtonItem.ImageIndexProperty, PropertyBindingOptions.TwoWay); int num2 = (int)this.buttonElement.ImagePrimitive.BindProperty(ImagePrimitive.ImageProperty, (RadObject)this, RadButtonItem.ImageProperty, PropertyBindingOptions.TwoWay); int num3 = (int)this.buttonElement.ImagePrimitive.BindProperty(ImagePrimitive.ImageKeyProperty, (RadObject)this, RadButtonItem.ImageKeyProperty, PropertyBindingOptions.TwoWay); this.buttonElement.TextImageRelation = TextImageRelation.ImageBeforeText; this.Children.Add((RadElement)this.buttonElement); int num4 = (int)this.buttonElement.BindProperty(RadItem.TextProperty, (RadObject)this, RadItem.TextProperty, PropertyBindingOptions.TwoWay); int num5 = (int)this.SetDefaultValueOverride(RadButtonItem.TextImageRelationProperty, (object)this.buttonElement.TextImageRelation); int num6 = (int)this.SetDefaultValueOverride(RadButtonItem.ImageAlignmentProperty, (object)this.buttonElement.ImageAlignment); int num7 = (int)this.SetDefaultValueOverride(RadButtonItem.TextAlignmentProperty, (object)this.buttonElement.TextAlignment); int num8 = (int)this.buttonElement.BindProperty(RadButtonItem.TextImageRelationProperty, (RadObject)this, RadButtonItem.TextImageRelationProperty, PropertyBindingOptions.TwoWay); int num9 = (int)this.buttonElement.BindProperty(RadButtonItem.ImageAlignmentProperty, (RadObject)this, RadButtonItem.ImageAlignmentProperty, PropertyBindingOptions.TwoWay); int num10 = (int)this.buttonElement.BindProperty(RadButtonItem.TextAlignmentProperty, (RadObject)this, RadButtonItem.TextAlignmentProperty, PropertyBindingOptions.TwoWay); }
protected override void CreateChildElements() { this.fill = new FillPrimitive(); this.border = new BorderPrimitive(); this.Children.Add((RadElement)this.fill); this.Children.Add((RadElement)this.border); }
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); }