2016-01-21 122 views
-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> 
+0

不是你的问题清楚的。请澄清你确切需要什么。 – asitis

+0

在您定义的模板中使用图像控制并尝试使用 – ifaminsi

+0

您可以详细阐述一下这个..我需要做什么准确的.. – Vinita

回答

0

在您提供的链接上,BBC应用程序正在使用HubTiles并附加onClick事件处理程序,以使它们看起来像按钮一样。

请从Telerik的东西或使用HubTile,你会取得同样的相同的结果BBC应用

+0

好吧..我会尽力。 – Vinita