0

I have a TextBlock that contains some text in some Run elements, and which is set to CharacterEllipsis textclipping mode. However I also have a few InlineUIElements that contains some custom buttons.

The problem is the buttons are showing up outside of the bounds of the TextBlock when they should be "clipped".

Am I missing some explicit setting somewhere to make these elements respect the bounds of the parent? Oddly, the text is clipped just fine, and shows the character ellipsis.

devios1
  • 36,899
  • 45
  • 162
  • 260

1 Answers1

1

You can set ClipToBounds to True on the TextBlock. It will still behave a little bit weird, though: all of the InlineUIContainers will be aligned with the start of the ellipsis, so you will get a little bit of every one of them on the edge of the TextBlock.

Quartermeister
  • 57,579
  • 7
  • 124
  • 111