-1
我正在开发Windows Phone应用程序不Silverlight只是基本的应用程序。 有没有什么办法让我的应用程序的按钮看起来像瓷砖。这意味着我需要在页面内为我的按钮添加拼贴。 我想要做类似于thisWindows phone 8.1按钮造型
但是我收到了错误,例如当我将此代码放在页面上时标记的行中出现“缺省名称空间未定义”。
*<Style x:Key="TileListBoxItemStyle" TargetType="ListBoxItem">*
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="64"/>
<Setter Property="Margin" Value="12,12,0,0"/>
<Setter Property="Background" Value="{StaticResource PhoneAccentBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Width" Value="173"/>
<Setter Property="Height" Value="173"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Grid>
<Rectangle Fill="{TemplateBinding Background}"/>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
不是你的问题清楚的。请澄清你确切需要什么。 – asitis
在您定义的模板中使用图像控制并尝试使用 – ifaminsi
您可以详细阐述一下这个..我需要做什么准确的.. – Vinita