Changing Bordercolor RadSpinEditor

4 posts, 1 answers
  1. ronny
    ronny avatar
    15 posts
    Member since:
    Mar 2011

    Posted 15 Apr 2011 Link to this post

    How can i change the bordercolor of the RadSpinEditor via Code?

    In RadSpinEditor1.SpinElement i didn`t find anything like bordercolor.
  2. Answer
    Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 20 Apr 2011 Link to this post

    Hello Ronny,

    Thank you for your question.

    RadSpinEditor's BorderPrimitive is a child element of SpinElement. You can use the following code snippet to define its color:
    BorderPrimitive spinEditorBorder = this.radSpinEditor1.SpinElement.Children[1] as BorderPrimitive;
    spinEditorBorder.ForeColor = Color.Red;

    I hope it helps.

    Best regards,
    Alexander
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. ronny
    ronny avatar
    15 posts
    Member since:
    Mar 2011

    Posted 20 Apr 2011 Link to this post

    Hi Alexander,

    thanks for your reply. It works fine. But i think it would be easier, if a property can be set to change the border color.

    Regards, Ronny
  5. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 22 Apr 2011 Link to this post

    Hello Ronny,

    Thank you for your suggestion.
     
    BorderPrimitive is a complex element which contains a set of properties for customization like BoxStyle, GradientStyle, Widths, Colors, and others. Exposing them in SpinElement would make the API heavier. Nevertheless, I agree that the BorderPrimitive itself could be exposed as a property in its parent element.

    Do not hesitate to contact us again if you have additional questions.

    Best regards,
    Alexander
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top