Coffeehouse Thread

6 posts

WPF Buttons

Back to Forum: Coffeehouse
  • User profile image
    jh71283

    I know that it have been the case since the day dot, and I have obviously worked around it before, but I have ran into this issue so many times today that it's not even funny.

    Why the hell does the WPF button not have a native ability to wrap text?

    I know I can add a textblock to achieve this, but whoop de bloody do.

    What next - I go to a dealer to pick up my new car and it has no wheels?
    Just so I can have the choice of wheels and have the pleasure of putting them on myself of course!


    Rant Over...

  • User profile image
    DCMonkey

    What would WrapText do on a button that had no text?

  • User profile image
    stevo_

    Button isn't exclusively text.. I don't like the idea of poluting a class with properties that don't always make sense.. attached properties is partially there to stop monolithic confusing ui controls.

  • User profile image
    jh71283

    DCMonkey said:
    What would WrapText do on a button that had no text?
    Nothing!

    I see the point of having the control a clean as possible, but at times it can be pretty frustrating.

  • User profile image
    wkempf

    jh71283 said:
    DCMonkey said:
    *snip*
    Nothing!

    I see the point of having the control a clean as possible, but at times it can be pretty frustrating.
    Then apply a style/template.  Problem solved.

  • User profile image
    nightski

    wkempf said:
    jh71283 said:
    *snip*
    Then apply a style/template.  Problem solved.
    Agreed, extremely easy to solve this problem.  In fact, you don't even have to apply a style.  If you just set the content of the button to a textblock with textwrap enabled it will wrap....

    Also the distinction should be made.  Your issue is not with the Button control at all, it is with the default template.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.