Hi,
I am working on WPF application. I want to know is there a way to fit the long text on my button ?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Shweta LodhaRank #31 · 39.8K reputationPosted Feb 27, 2014, 10:43 AM EST
Give a try to wrap text and set it to Button.Content.
Abhijit PatilRank #700 · 3.4K reputationPosted Feb 27, 2014, 6:08 PM EST
you can use TextWrapping property of textblock
for XAML:
use as per the Shweta mam says
and for C#
MyTextBox.TextWrapping=TextWrapping.Wrap;
Hope it help for u
Regards,
Abhijit Patil.
http://dotnetbyabhipatil.blogspot.in