C# 我的游戏如何在开始屏幕上有一个宽图标?
我正在为WP8创建一个游戏,但它在XNA中。如何使它在开始屏幕上有一个宽图标?默认情况下仅支持小型和普通,因为XNA仅支持WP7应用程序。您必须检查您的应用程序是否在WP8上运行,如果是,请使用反射将互动程序更新为WP8图标。在这篇MSDN文章@ 您可能更容易使用内置了与WP8类似API的功能的库。以下是包装WP8 API的源代码,这些API将从WP7@ 下面是在WP7应用程序中使用WP8宽磁贴的代码片段:C# 我的游戏如何在开始屏幕上有一个宽图标?,c#,xna,windows-phone-8,C#,Xna,Windows Phone 8,我正在为WP8创建一个游戏,但它在XNA中。如何使它在开始屏幕上有一个宽图标?默认情况下仅支持小型和普通,因为XNA仅支持WP7应用程序。您必须检查您的应用程序是否在WP8上运行,如果是,请使用反射将互动程序更新为WP8图标。在这篇MSDN文章@ 您可能更容易使用内置了与WP8类似API的功能的库。以下是包装WP8 API的源代码,这些API将从WP7@ 下面是在WP7应用程序中使用WP8宽磁贴的代码片段: if (!Utils.CanUseLiveTiles) { MessageBox
if (!Utils.CanUseLiveTiles)
{
MessageBox.Show("This feature needs Windows Phone 8");
return;
}
try
{
var mytile = new FlipTileData
{
Title = "wide flip tile",
BackTitle = "created by",
BackContent = "Rudy Huyn",
Count = 9,
SmallBackgroundImage = new Uri("/Assets/logo159x159.png", UriKind.Relative),
BackgroundImage = new Uri("/Assets/Background336x336_1.png", UriKind.Relative),
BackBackgroundImage = new Uri("/Assets/Background336x336_2.png", UriKind.Relative),
WideBackContent = "This is a very long long text to demonstrate the back content of a wide flip tile",
WideBackgroundImage = new Uri("/Assets/Background691x336_1.png", UriKind.Relative),
WideBackBackgroundImage = new Uri("/Assets/Background691x336_2.png", UriKind.Relative)
};
#if ALTERNATIVE_SOLUTION
var mytile = Mangopollo.Tiles.TilesCreator.CreateFlipTile("flip tile",
"created by", "Rudy Huyn",
"This is a very long long text to demonstrate the back content of a wide flip tile",
9, new Uri("/Assets/logo159x159.png", UriKind.Relative),
new Uri("/Assets/Background336x336_1.png", UriKind.Relative),
new Uri("/Assets/Background336x336_2.png", UriKind.Relative),
new Uri("/Assets/Background691x336_1.png", UriKind.Relative),
new Uri("/Assets/Background691x336_2.png", UriKind.Relative));
#endif
ShellTileExt.Create(new Uri("/MainPage.xaml?msg=from%20wipe%20flip%20tile",
UriKind.Relative), mytile, true);
}
catch
{
MessageBox.Show("remove tile before create it again");
}
还有一件事需要记住,即使XNA应用程序是WP7应用程序,也可以直接从XNA使用其他WP8API。下面是一个关于如何(包括XNA)的示例。下面是一个示例(向下滚动) 来自Mangopollo示例应用程序的上述代码片段的最后一条语句使用MainPage.xaml的Uri启动该应用程序。XNA游戏应该使用什么Uri?