如何在TextBlock中模仿以下模板?

时间:2012-07-19 04:03:42

标签: c# xaml styles microsoft-metro textblock

我正在寻找两个地铁应用程序,他们使用类似对话框的特定TextBlock样式。

以下快照来自TweetPro。观看textBlock样式,其中包含:

  

Te gustaria programar ..?

这是从Messaging应用程序中获取的,并观察紫色对话框。

enter image description here enter image description here

我想在我的应用程序中实现这种文本块样式,但我真的没有太多定制控件的经验。所以,我需要一些帮助来实现这个textBlock对话框样式!提前谢谢!

1 个答案:

答案 0 :(得分:1)

试试这个:

    <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>