Some properties don't "stick" when set in the Visual Studio designer

2 posts, 1 answers
  1. Emily
    Emily avatar
    12 posts
    Member since:
    Feb 2016

    Posted 04 Mar 2016 Link to this post


    I've noticed that a number of properties appear to be changeable in the Visual Studio 2013 designer, but the changes don't actually get persisted to the code-behind for the designer, so they don't actually "stick". For example, I changed the value of the RadDropDownButtonElement.Children(DropDownEditorLayoutPanel).Children(ActionButtonElement).TextWrap from false to true for a button in our ribbon bar, in the Visual Studio designer. It looked like it worked (ie the button appearance updated in the designer to show the text as being wrapped), but when I ran the program the text didn't wrap. I went back and looked at the code and there was no setting for that value in the code-behind for the designer. When I closed and re-opened the designer window, the text had reverted to not being wrapped and the property value had been reset to false. This seems like a bug to me. Is there something I'm missing?


    Thank you,


  2. Answer
    Hristo avatar
    1508 posts

    Posted 07 Mar 2016 Link to this post

    Hello Emily,

    Thank you for writing.

    This setting actually needs to be defined on the TextPrimitve object. I am sending you a short video showing the result on my end. If you would like to perform this change via code at run-time you can do it like this:
    this.radDropDownButtonElement1.FindDescendant<TextPrimitive>().TextWrap = true;

    I hope this helps. Please let me know if you need further assistance.

    Hristo Merdjanov
    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 Feedback Portal and vote to affect the priority of the items
Back to Top