Windows phone 8.1 自定义页面内容未显示在band互动程序中存在问题

Windows phone 8.1 自定义页面内容未显示在band互动程序中存在问题,windows-phone-8.1,microsoft-band,Windows Phone 8.1,Microsoft Band,我对bandClient.TileManager.SetPagesAsync有一个问题,它返回true,我认为这意味着一切都成功了,但是当我单击我的band tile时,没有显示任何内容。我省略了下面的瓷砖创建代码,因为我相信它可以很好地工作,因为我能够成功地向它发送消息。有什么想法吗 private void CreateLeaderboardPageLayout(BandTile tile) { // create a scrollable vertical pane

我对bandClient.TileManager.SetPagesAsync有一个问题,它返回true,我认为这意味着一切都成功了,但是当我单击我的band tile时,没有显示任何内容。我省略了下面的瓷砖创建代码,因为我相信它可以很好地工作,因为我能够成功地向它发送消息。有什么想法吗

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);
    }

如果MSC_排行榜_GUID为常量,则可能是问题所在。每个PageData都需要一个唯一的Guid。如果磁贴上只有一个页面,这应该不会有问题,但更改它可能值得一试。

每个页面最多有一个TextBlock/WrappedTextBlock,字符串长度超过20个字符。尝试减少页面数据文本块字符串中的字符数,看看这是否有帮助。

我也遇到了这个问题。当超过20个字符时,文本块将不显示。我遇到的问题是,当我点击互动程序时,它会显示没有什么要报告的内容,稍后再查看。这与20个字符的限制不同。当磁贴显示“稍后检查”消息时,这意味着磁贴没有要显示的数据页。如果应用程序试图将一页数据添加到互动程序中,但显示了“稍后检查”消息,则表示该应用程序组认为该页数据无效,并拒绝了该数据。在页面数据中包含2个或多个>20个字符的文本字符串只是页面数据会被Band拒绝的一个示例。那么Band只会拒绝页面而不会出现错误?似乎是因为我将文本块限制在了页面显示的20个字符。我认为这是如此随机之前,因为不同长度的字符串在排行榜上我只有一个页面,文档说,如果你重复使用相同的guid,它将更新该页面,而不是创建一个新的。