Create UWP speech bubble control that scales based on content

Viewed 161

I'm trying to create a speech bubble control for my UWP app in c#/XAML that scales based on it's content. It's based on a the following questing:

How to create a speech bubble in UWP?

The problem with the link above is, it does not work with transparency in brushes(=>borders are visible).

Result of the link above

I know I could use a Polygon and just set the Stretch property but with that solution I would also stretch the triangle not just the content rectangle.

So I thought about extending Windows.UI.Xaml.Shapes.Shape (like Rectangle, Circle, Polygon, ... do) but I'm unable to find any documentation about how to do this.

Summary:

  • A speech bubble control that works with transparent brushes and non transparent border brushes.

  • It should scales based on it's content.

  • Only the content rectangle should scale/stretch not the triangle.

0 Answers
Related