0

まず、次のコードでタイルを作成します。

private void btnIconicTile_Click(object sender, RoutedEventArgs e)
    {
        IconicTileData oIcontile = new IconicTileData();
        oIcontile.Title = "Hello Iconic Tile!!";
        oIcontile.Count = 7;

        oIcontile.IconImage = new Uri("Assets/Tiles/Iconic/202x202.png", UriKind.Relative);
        oIcontile.SmallIconImage = new Uri("Assets/Tiles/Iconic/110x110.png", UriKind.Relative);

        oIcontile.WideContent1 = "windows phone 8 Live tile";
        oIcontile.WideContent2 = "Icon tile";
        oIcontile.WideContent3 = "All about Live tiles By WmDev";

        oIcontile.BackgroundColor = System.Windows.Media.Colors.Black;

        // find the tile object for the application tile that using "Iconic" contains string in it.
        ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("Iconic".ToString()));

        if (TileToFind != null && TileToFind.NavigationUri.ToString().Contains("Iconic"))
        {
            TileToFind.Delete();
            ShellTile.Create(new Uri("/MainPage.xaml?id=Iconic", UriKind.Relative), oIcontile, true);
        }
        else
        {
            ShellTile.Create(new Uri("/MainPage.xaml?id=Iconic", UriKind.Relative), oIcontile, true);//
        }
    }

ここで、ホームスクリーンで作成されたタイルが、次のようなアプリ (Uri スキーム?) にリンクするようにします。

await Windows.System.Launcher.LaunchUriAsync(new System.Uri("whatsapp:"));

最近作成されたタイルの「リンク」を変更するにはどうすればよいですか?

4

1 に答える 1

0

はい、私も必要です。

Windows.System.Launcher.LaunchUriAsync(new System.Uri("whatsapp:"))

ホーム画面

于 2014-02-06T13:41:00.533 に答える