2012-07-19 36 views
0

我在看两个地铁应用程序,他们使用的是类似于对话框的特定TextBlock风格。如何在TextBlock中模仿以下模板?

以下快照是从TweetPro拍摄。观看textBlock风格说:

Te gustaria programar ..?

这是取自消息应用程序,并观看紫色对话框。

enter image description hereenter image description here

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

回答

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>