private void PerformStyle_NotActive() { Telerik.WinControls.Primitives.FillPrimitive prmFill = (Telerik.WinControls.Primitives.FillPrimitive) this.ButtonElement.Children[0]; Telerik.WinControls.Primitives.BorderPrimitive prmBorder = (Telerik.WinControls.Primitives.BorderPrimitive) this.ButtonElement.Children[2]; prmBorder.Visibility = ElementVisibility.Hidden; prmFill.GradientStyle = GradientStyles.OfficeGlassRect; prmFill.BackColor = prmFill.BackColor2 = prmFill.BackColor3 = prmFill.BackColor4 = Color.Transparent; }
private void PerformStyle_Active() { Telerik.WinControls.Primitives.FillPrimitive prmFill = (Telerik.WinControls.Primitives.FillPrimitive) this.ButtonElement.Children[0]; Telerik.WinControls.Primitives.BorderPrimitive prmBorder = (Telerik.WinControls.Primitives.BorderPrimitive) this.ButtonElement.Children[2]; //prmBorder.Visibility = ElementVisibility.Visible; prmFill.GradientStyle = GradientStyles.Linear; prmFill.ResetValue(FillPrimitive.BackColorProperty); prmFill.ResetValue(FillPrimitive.BackColor2Property); prmFill.ResetValue(FillPrimitive.BackColor3Property); prmFill.ResetValue(FillPrimitive.BackColor4Property); }
public CSToggleButton2() { Telerik.WinControls.Primitives.FillPrimitive prmFill = (Telerik.WinControls.Primitives.FillPrimitive) this.ButtonElement.Children[0]; ImageAndTextLayoutPanel imgTxtPanel = (ImageAndTextLayoutPanel)this.ButtonElement.Children[1]; Telerik.WinControls.Primitives.BorderPrimitive prmBorder = (Telerik.WinControls.Primitives.BorderPrimitive) this.ButtonElement.Children[2]; Telerik.WinControls.Primitives.FocusPrimitive prmFocus = (Telerik.WinControls.Primitives.FocusPrimitive) this.ButtonElement.Children[3]; prmFill.GradientStyle = GradientStyles.OfficeGlassRect; prmFill.BackColor = prmFill.BackColor2 = prmFill.BackColor3 = prmFill.BackColor4 = Color.Transparent; prmBorder.Visibility = ElementVisibility.Hidden; prmBorder.Margin = new System.Windows.Forms.Padding(4); prmFocus.Visibility = ElementVisibility.Hidden; this.ToggleStateChanged += new StateChangedEventHandler(CSToggleButton2_ToggleStateChanged); this.MouseEnter += new EventHandler(CSToggleButton2_MouseEnter); this.MouseLeave += new EventHandler(CSToggleButton2_MouseLeave); }