Search code examples
c#xamlstylesmicrosoft-metrotextblock

How to imitate the following template in a TextBlock?


I was looking two metro applications where they're using a particular TextBlock style similar like a dialog.

The following snapshot was taken from TweetPro. Watch the textBlock style where says:

Te gustaria programar..?

This one is taken from Messaging applications, and watch the purple dialogs.

enter image description hereenter image description here

I'd like to implement this textblock style to my application, but I really have no much experience customizing controls. So, I'd need some of help to implement this textBlock dialog style! Thanks in advance!


Solution

  • Try this:

        <StackPanel Orientation="Horizontal" Width="200" Height="50">
            <Path Data="M 17 0 L 0 0 17 10 Z" StrokeThickness="48" Fill="Red" Margin="0,10,0,0" />
            <Border Background="Red" Padding="5" Width="200" Height="50" >
                <TextBox  BorderThickness="0" Background="Transparent" Text="Hello" Foreground="White" />
            </Border>
        </StackPanel>