qqilihq
qqilihq

Reputation: 11454

Multi line captions for ApplicationBarIconButton

I know, the guidelines advice to keep captions to one line, but still:

Is there a workaround to add (automatic/manual) line breaks to an ApplicationBarIconButton's text caption? E.g. for <shell:ApplicationBarIconButton IconUri="…" Text="button with long title" />, the button's text only shows "button with" when rendered.

(on my German WP7 for example, there are multiline captions in the MS mail application).

Upvotes: 0

Views: 299

Answers (2)

Rishi Jasapara
Rishi Jasapara

Reputation: 638

Try using "sample" + System.Environment.NewLine + "text".

Upvotes: 0

XAMeLi
XAMeLi

Reputation: 6289

You can use &#x0d; in your string in XAML where you'd use \r in C#.

Something like:

Text="button with&#x0d;long title"

If there's enough height, it should work fine. If not, you'd need to change the template for ApplicationBarIconButton

Upvotes: 2

Related Questions