I am trying to add a custom icon to a populated panel.
The documentation has information on this in Section 8.5, and the examples in the SDK demonstrate that a developer can customize large and small tile icons. However, there is no clear example of how to do this for a custom icon inside a tile on a page.
Looking further, I discovered that a new Design Platform for the Microsoft Toolbar has appeared for Visual Studio . This seems to demonstrate what I wanted to do, however, while trying to use the code specified in the "Generate Code" section (halfway down the page), I was unable to load a simple custom layout that I created using the constructor:

Here is the code that links the custom layout as described on the Tile Design plugin page:
try
{
tileGuid = Guid.NewGuid();
WriteableBitmap smallIconBitmap = new WriteableBitmap(24, 24);
BandIcon smallIcon = smallIconBitmap.ToBandIcon();
WriteableBitmap tileIconBitmap = new WriteableBitmap(48, 48);
BandIcon tileIcon = tileIconBitmap.ToBandIcon();
BandTile tile = new BandTile(tileGuid)
{
Name = "MyTile",
SmallIcon = smallIcon,
TileIcon = tileIcon
};
var customtiledesign = new SentimentFeedbackLayout();
tile.PageLayouts.Add(customtiledesign.Layout);
await customtiledesign.LoadIconsAsync(tile);
if (await bandClient.TileManager.AddTileAsync(tile))
{
Debug.WriteLine("New tile added | GUID: " + tileGuid);
}
PageData pd = new PageData(tileGuid, 1, customtiledesign.Data.All);
if (await bandClient.TileManager.SetPagesAsync(tileGuid, pd))
{
Debug.WriteLine("Added pages");
}
}
catch (Exception ex)
{
Debug.WriteLine(ex);
}
The error log is as follows:
Band Connected : MSFT Band 2 bb:bc
Version: 2.0.4215.0, Hardware: 26
Band - Removing all Tiles
Removed tile: MyTile
New tile added | GUID: 4803e0fe-2da2-4efb-9389-bde3a9289d30
Exception thrown: 'Microsoft.Band.BandOperationException' in mscorlib.ni.dll
Error Device status code: 0xA0CC006A received.
I could not find any details about the error on the Internet, but I think this is because I used:
PageData pd = new PageData(tileGuid, 1, customtiledesign.Data.All);
Instead of passing customtiledesign.Data.All to the ... SetPagesAsync () method.
This happened because there was no overloaded form of SetPageAsync, which took the PageElementData [] parameter as an argument.