我正在为Windows Phone 7构建一个应用程序,我需要在其中创建一些自定义文本块。请看下面的图片:
是否可以编写我的文本块以便看起来像这样。如果可能,请共享代码。此外,它不一定是文本块,但不应该是按钮。我只想要这种设计并使它们可点击
你可以做这样的事情,
<Border Background="Red" Style="{StaticResource TitleBorder}" Width="38" Margin="0,0,5,0">
<TextBlock Text="City " Height="19" Width="26" />
</Border>
将此样式放入Application.Resources
<Style x:Key="TitleBorder" TargetType="Border">
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="BorderThickness" Value="3"/>
<Setter Property="Margin" Value="0,0,5,0"/>
<Setter Property="BorderBrush" Value="Orange"></Setter>
<Setter Property="Grid.Column" Value="0"/>
</Style>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句