コード例 #1
0
        /// <summary>
        /// Creates the pinned object.
        /// </summary>
        /// <param name="resourceInfo">The resource information.</param>
        public async void CreatePinnedObject(ResourceInfo resourceInfo)
        {
            var id = (resourceInfo.Path + "/" + resourceInfo.Name).ToBase64();

            if (!IsTilePinned(id))
            {
                var arguments   = resourceInfo.Serialize();
                var displayName = resourceInfo.Name;

                var tile = new SecondaryTile(id, displayName, arguments, new Uri("ms-appx:///Assets/Square150x150Logo.png"), TileSize.Default);
                tile.VisualElements.ShowNameOnSquare150x150Logo = true;

                await tile.RequestCreateAsync();
            }
        }