gpt4 book ai didi

windows-phone-7 - 在 Windows Phone 上磁贴更新后更改磁贴导航

转载 作者:行者123 更新时间:2023-12-04 07:15:42 24 4
gpt4 key购买 nike

我正在向我的应用用户发送磁贴更新。磁贴更新后,我想在用户单击新磁贴后自动将用户定向到新的更新页面。有什么办法可以实现这一目标吗?

我不能再拉服务器了,因为它是 开火即忘机制 .

通过 Toast 通知,我可以在通知中使用以下消息:

<wp:Param>/Views/MyPage.xaml</wp:Param>

但这似乎不适用于我的 FlipTile 更新。

最佳答案

我不太确定这是否是您要查找的内容,但是您可以在加载应用程序后更换 Tile 吗?有点像这样:

/// <summary>
/// Creates or replaces a tile with a Title and a parameter
/// </summary>
public void replaceTile()
{
//ShellTile TileToFind = ShellTile.ActiveTiles.First();

string tileTitle = "Title of the Tile";


//You might want to use your Parameter from the toast here as the PageName
ShellTile TileToFind = FindTile( "/PageName.xaml?parameter" );

StandardTileData NewTileData = new StandardTileData
{
Title = tileTitle,
BackgroundImage = new Uri( "/Resources/tile_icon.png", UriKind.Relative ),
Count = 0,
BackTitle = "",
//BackBackgroundImage = new Uri("/Resources/appicon_large.png", UriKind.Relative),
BackBackgroundImage = new Uri( "", UriKind.Relative ),
BackContent = ""
};

// Application should always be found, since it is always the first tile (even if not on homescreen)
if ( TileToFind == null )
{


// Update the Application Tile with the NewTileData
//TileToFind.Update( NewTileData );


//Or replace an existing (second) tile with the new, updated Tile
//ShellTile alreadyExistingTile = FindTile( "/PageName.xaml?parameter" );

//if ( alreadyExistingTile != null )
//{
// alreadyExistingTile.Delete();
//}

ShellTile.Create( new Uri( "/PageName.xaml?parameter=" + newParameter, UriKind.Relative ), NewTileData );
}
else
{
TileToFind.Update( NewTileData );
}}

关于windows-phone-7 - 在 Windows Phone 上磁贴更新后更改磁贴导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16812772/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com