Hi
I'm writing a subclass of a radtileelement and one of it's child LightVisualElements needs to emulate a button.
I've written the following code which emulates a regular/plain windows button but I wondered if there was a quick method to copy the style from the border primitive belonging to a button on the form to my LightVisualElement so that my element will maintain the appearance of a button border without needing to do it all manually. (Ive not touched theming yet as Ive only been doing this a few days so far and want to start feeling comfortable understanding the controls first.)
01.
_buttonElement =
new
LightVisualElement();
02.
_buttonElement.TextAlignment = ContentAlignment.MiddleCenter;
03.
_buttonElement.AutoEllipsis =
true
;
04.
_buttonElement.MinSize =
new
Size(0, 30);
05.
06.
_buttonElement.DrawFill =
true
;
07.
_buttonElement.BackColor = SystemColors.ButtonFace;
08.
09.
_buttonElement.DrawBorder =
true
;
10.
_buttonElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
11.
_buttonElement.BorderBottomColor = SystemColors.ButtonShadow;
12.
_buttonElement.BorderRightColor = SystemColors.ButtonShadow;
13.
_buttonElement.BorderTopColor = SystemColors.ButtonHighlight;
14.
_buttonElement.BorderLeftColor = SystemColors.ButtonHighlight;