Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Live互动程序XML中使用contentId覆盖以前的互动程序_C#_Xaml_Uwp - Fatal编程技术网

C# 在Live互动程序XML中使用contentId覆盖以前的互动程序

C# 在Live互动程序XML中使用contentId覆盖以前的互动程序,c#,xaml,uwp,C#,Xaml,Uwp,我正在尝试使用我的tile XML中描述的contentId。下面是我的XML示例 <tile> <visual version="2"> <binding branding="name" contentId="@ViewBag.Code" template="TileSquare150x150Text01" fallback="TileSquareText01"> <text id="1">@ViewBag.Name (@

我正在尝试使用我的tile XML中描述的contentId。下面是我的XML示例

<tile>
<visual version="2">
    <binding branding="name" contentId="@ViewBag.Code" template="TileSquare150x150Text01" fallback="TileSquareText01">
        <text id="1">@ViewBag.Name (@ViewBag.Platform)</text>
        <text id="2">@ViewBag.When1 @ViewBag.Destination1</text>
        <text id="3">@ViewBag.When2 @ViewBag.Destination2</text>
        <text id="4">@ViewBag.When3 @ViewBag.Destination3</text>
    </binding>
    <binding branding="name" contentId="@ViewBag.Code" template="TileWide310x150Text01" fallback="TileWideText01">
        <text id="1">@ViewBag.Name (@ViewBag.Platform)</text>
        <text id="2">@ViewBag.When1 @ViewBag.Destination1</text>
        <text id="3">@ViewBag.When2 @ViewBag.Destination2</text>
        <text id="4">@ViewBag.When3 @ViewBag.Destination3</text>
        <text id="5">@ViewBag.When4 @ViewBag.Destination4</text>
    </binding>
    <binding branding="name" contentId="@ViewBag.Code" template="TileSquare310x310Text01">
        <text id="1">@ViewBag.Name (@ViewBag.Platform)</text>
        <text id="2">@ViewBag.When1 @ViewBag.Destination1</text>
        <text id="3">@ViewBag.When2 @ViewBag.Destination2</text>
        <text id="4">@ViewBag.When3 @ViewBag.Destination3</text>
        <text id="5">@ViewBag.When4 @ViewBag.Destination4</text>
        <text id="6">@ViewBag.When5 @ViewBag.Destination5</text>
        <text id="7">@ViewBag.When6 @ViewBag.Destination6</text>
        <text id="8">@ViewBag.When7 @ViewBag.Destination7</text>
        <text id="9">@ViewBag.When8 @ViewBag.Destination8</text>
        <text id="10">@ViewBag.When9 @ViewBag.Destination9</text>
    </binding>
</visual>
</tile>
我已将EnableNotificationQueue设置为true,并且我正在从远程源一次提取3个tile,这可以正常工作。但是,不会使用相同的contentId覆盖以前的磁贴,而是将新磁贴添加到EnableNotificationQueue允许的最大堆栈5中

我想要实现的是当更新发生时,用新的块覆盖之前的3个块,而不是将新的块添加到堆栈中。通过阅读文档,contentId应该允许我这样做,但它没有按预期工作


非常感谢您的帮助。

我在文档中找到了一些深层次的东西,从而解决了这个问题。基本上contentId不做任何事情,您必须标记磁贴通知。如果你像我一样在Azure上托管ASP.NET Web服务,你必须将标记作为HTTP响应头的一部分发送进来

我修改了我的控制器,将HttpContext.Response.AddHeaderX-WNS-Tag、yourtag和任何带有同一标记的未来磁贴通知包含在内,并使用该标记覆盖前一个磁贴通知,这是我希望实现的行为