我想为我的 windows phone 应用程序创建一个辅助磁贴,它在我的主页中显示控件,例如,如何显示一个面板控件(其中包含内部图像)以显示在辅助磁贴中。
public void CreateSecondaryTile()
{
ShellTile secTile = ShellTile.ActiveTiles.SingleOrDefault(x => x.NavigationUri.ToString().Contains("MainPage.xaml"));
if (secTile == null)
{
StandardTileData fullTile = new StandardTileData()
{
//'*** Primary Tile Properties ***
BackgroundImage = new Uri(controlName, UriKind.Relative),
Count = DateTime.Now.Second,
Title = "Front Title",
//'*** Secondary Tile Properties ***
BackBackgroundImage = new Uri("Background.png", UriKind.Relative),
BackContent = "Back Content",
BackTitle = "Back Title"
};
ShellTile.Create(new Uri("/MainPage.xaml", UriKind.Relative), fullTile);
}