【问题标题】:How can I fake my own in App Tiles in Windows Phone如何在 Windows Phone 的 App Tiles 中伪造我自己的
【发布时间】:2012-04-18 13:24:18
【问题描述】:

我正在考虑我的启动屏幕/仪表板屏幕有图块(带有几行信息的正方形)。我知道磁贴不是在 Windows Phone 应用程序中使用的 UI 对象,但我看到有些人以某种方式伪造它们。

任何人都可以提供一些关于如何实现这一目标的提示和指导吗?在我在 Win-Mobile 上工作的前 2 天中,我的印象是,您无法将视图对象堆叠在一起。例如,绘制一个正方形对象,然后在其上绘制 3 行文本以制作图块。

非常感谢, -代码

【问题讨论】:

  • 您想在自己的应用程序中伪造磁贴还是将磁贴放到 Windows Phone 7 的主屏幕上?

标签: c# windows-phone-7 xaml


【解决方案1】:

你看到的是HubTile control吗?

【讨论】:

    【解决方案2】:

    这是我在我的应用程序中为我的仪表板页面所做的。它只是一个内部有两个 TextBlock 的 StackPanel。然后,这些 StackPanel 位于 ListBox 内 Silverlight Toolkit for Windows Phone 的 WrapPanel 内,您不必使用它。

    <ListBox Name="lstTiles" Margin="0,0,-12,0">
        <ListBoxItem>
            <StackPanel Background="{StaticResource PhoneAccentBrush}" Width="173" Height="173" Margin="12,12,0,0" Tap="stkSignIn_Tap">
                <TextBlock Text="Tile Title" Style="{StaticResource PhoneTextTitle2Style}" Foreground="White" TextWrapping="Wrap" Margin="12,6,12,12" Height="106" />
                <TextBlock Text="Your subtitle here" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White" Margin="12,12,12,12" VerticalAlignment="Bottom" />
            </StackPanel>
        </ListBoxItem>
        <ListBoxItem>
            <StackPanel Background="{StaticResource PhoneAccentBrush}" Width="173" Height="173" Margin="12,12,0,0" Tap="stkSignIn_Tap">
                <TextBlock Text="Tile Title" Style="{StaticResource PhoneTextTitle2Style}" Foreground="White" TextWrapping="Wrap" Margin="12,6,12,12" Height="106" />
                <TextBlock Text="Your subtitle here" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White" Margin="12,12,12,12" VerticalAlignment="Bottom" />
            </StackPanel>
        </ListBoxItem>
        <ListBoxItem>
            <StackPanel Background="{StaticResource PhoneAccentBrush}" Width="173" Height="173" Margin="12,12,0,0" Tap="stkSignIn_Tap">
                <TextBlock Text="Tile Title" Style="{StaticResource PhoneTextTitle2Style}" Foreground="White" TextWrapping="Wrap" Margin="12,6,12,12" Height="106" />
                <TextBlock Text="Your subtitle here" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White" Margin="12,12,12,12" VerticalAlignment="Bottom" />
            </StackPanel>
        </ListBoxItem>
    </ListBox>
    

    【讨论】:

      【解决方案3】:

      Telerik RADHubTile 控件可以为您做到这一点。请看这篇文章:

      New Hub Tile Control for Your Windows Phone Apps

      注意:我认为图书馆的成本约为 99 美元。

      【讨论】:

        【解决方案4】:

        现在有很多可用的磁贴控件,但为了其他人寻找其中的一个,您可以在这里找到我非常简单的“自制”磁贴控件:http://www.crisrowlands.com/wpdev-tips-4/

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-06-07
          • 2010-12-14
          • 2020-06-14
          • 1970-01-01
          相关资源
          最近更新 更多