bandClient.TileManager.SetPagesAsync에 문제가있어 모든 것이 성공적이라고 가정하지만 밴드 타일을 클릭하면 아무 것도 표시되지 않는다고 가정하는 true를 반환합니다. 메시지를 성공적으로 보낼 수 있으므로 제대로 작동한다고 믿기 때문에 아래 타일 생성 코드를 생략했습니다. 어떤 아이디어?
private void CreateLeaderboardPageLayout(BandTile tile)
{
// create a scrollable vertical panel that will hold 3 text messages
ScrollFlowPanel panel = new ScrollFlowPanel
{
Rect = new PageRect(0, 0, 245, 102),
Orientation = FlowPanelOrientation.Vertical
};
// add the text block to contain the first message
panel.Elements.Add(new TextBlock
{
ElementId = (short) TileMessagesLayoutElementId.Message1,
Rect = new PageRect(0, 0, 245, 102),
// left, top, right, bottom margins
Margins = new Margins(15, 0, 15, 0),
Color = new BandColor(0xFF, 0xFF, 0xFF)
});
// add the text block to contain the second message
panel.Elements.Add(new TextBlock
{
ElementId = (short)TileMessagesLayoutElementId.Message2,
Rect = new PageRect(0, 0, 245, 102),
// left, top, right, bottom margins
Margins = new Margins (15, 0, 15, 0),
Color = new BandColor(0xFF, 0xFF, 0xFF)
});
// add the text block to contain the third message
panel.Elements.Add(new TextBlock
{
ElementId = (short)TileMessagesLayoutElementId.Message3,
Rect = new PageRect(0, 0, 245, 102),
// left, top, right, bottom margins
Margins = new Margins(15, 0, 15, 0),
Color = new BandColor(0xFF, 0xFF, 0xFF)
});
// create the page layout
var layout = new PageLayout(panel);
tile.PageLayouts.Add(layout);
}
public async Task UpdateLeaderBoard(IBandClient bandClient)
{
// create the object containing the page content to be set
var pageContent = new PageData(MSC_LEADERBOARD_GUID, 0,
new TextBlockData((Int16) TileMessagesLayoutElementId.Message1,
"This is the text of the first message"),
new TextBlockData((Int16) TileMessagesLayoutElementId.Message2,
"This is the text of the second message")
,
new TextBlockData((Int16) TileMessagesLayoutElementId.Message3,
"This is the text of the third message")
);
var added = await bandClient.TileManager.SetPagesAsync(MSC_TILE_GUID, pageContent);
}
20자를 초과하는 문자열이있는 페이지 당 최대 하나의 TextBlock / WrappedTextBlock으로 제한됩니다. 페이지 데이터 TextBlock 문자열의 문자 수를 줄이고 도움이되는지 확인하십시오.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다