xaml - How can I prevent this UserControl's text from falling off the left side of the screen? -
Currently when I populate the text block with a lot of text, especially when connecting to site 26 Name is too long
, looks like:
This is the definition of User Control:
& lt; StackPanel Vertical Element = "Center" & gt; & Lt; Progress bar IIiEmentment = "True" /> & Lt; TextBlockName = "txtOverlayText" FontSize = "25" foreground = "white" horizontal align = "center" /> & Lt; / StackPanel & gt;
The text is supposed to be centered and if it is too long then it should not fall from the left side of the screen, rather it will appear on the left side and whatever can be 'right' Should not be fit on the sides should be replaced with dots, e.g.
Connecting to Site 26 is a name ...
Is there a way to do this?
Ok, so for some time we are mostly in xaml based accessories Super work drachma Where you can slap on TextTrimming = "WordEllipsis"
on some and finally get those friendly dots.
Although only a tip, sometimes a TextBlock's parent calls the panel to do so, so you have to impose a width value on some, or have to swap the parent panel, As it sometimes has to be changed based on things like Layout of StackPanel
, to trim the grid
.
Anyhow, hope this helps, cheers!
Comments
Post a Comment