[英]notification in Windows 10 (winrt + desktop) Not work subgroup
我嘗試從桌面應用程序顯示Toast(不是平鋪)通知。 (c#)沒有組,一切正常,我看到了文本和圖像,但是組(子組)被隱藏了。 為什么?
我通過NotificationsExtensions.Win10創建xml,如果需要,我將發布原始xml。 謝謝。
`
<?xml version="1.0" encoding="utf-8"?>
<toast launch="https://toster.ru/q/327775?e=3995419#comment_1108015">
<visual>
<binding template="ToastGeneric">
<text>Today will be mostly sunny with a high of 63 and a low of 42.</text>
<group>
<subgroup hint-weight="1">
<text hint-align="center">Mon</text>
<image src="file:///C:/Users/user/documents/visual studio 2015/Projects/android.forms.test/Lobster.Home.Toster.ru.Windows/bin/Debug/images/icon_activity_comment.png" hint-removeMargin="true" />
<text hint-align="center">63°</text>
<text hint-align="center" hint-style="captionSubtle">42°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Tue</text>
<image src="file:///C:/Users/user/documents/visual studio 2015/Projects/android.forms.test/Lobster.Home.Toster.ru.Windows/bin/Debug/images/icon_activity_comment.png" hint-removeMargin="true" />
<text hint-align="center">57°</text>
<text hint-align="center" hint-style="captionSubtle">38°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Wed</text>
<image src="file:///C:/Users/user/documents/visual studio 2015/Projects/android.forms.test/Lobster.Home.Toster.ru.Windows/bin/Debug/images/icon_activity_comment.png" hint-removeMargin="true" />
<text hint-align="center">59°</text>
<text hint-align="center" hint-style="captionSubtle">43°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Thu</text>
<image src="file:///C:/Users/user/documents/visual studio 2015/Projects/android.forms.test/Lobster.Home.Toster.ru.Windows/bin/Debug/images/icon_activity_comment.png" hint-removeMargin="true" />
<text hint-align="center">62°</text>
<text hint-align="center" hint-style="captionSubtle">42°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Fri</text>
<image src="file:///C:/Users/user/documents/visual studio 2015/Projects/android.forms.test/Lobster.Home.Toster.ru.Windows/bin/Debug/images/icon_activity_comment.png" hint-removeMargin="true" />
<text hint-align="center">71°</text>
<text hint-align="center" hint-style="captionSubtle">66°</text>
</subgroup>
</group>
</binding>
</visual>
</toast>
`
您可以使用此功能強大的應用程序測試Toasts並查看它,然后再發送並設置XML數據: Notifications Visualizer-Windows Store
對於您的問題,我認為這是常見的問題,您錯過了結束標記或視覺效果的xml代碼順序不正確,解決方案是使用Notifications Visualizer應用程序。
更新1:
由於您無法下載該應用程序,因此這里是他們使用的XML代碼。.我在我的機器上嘗試了它,它看起來不錯:
<toast>
<visual baseUri="Assets/Apps/Weather/">
<binding template="ToastGeneric">
<text>Today will be sunny with a high of 63 and a low of 42.</text>
<group>
<subgroup hint-weight="1">
<text hint-align="center">Mon</text>
<image src="Mostly Cloudy.png" hint-removeMargin="true"/>
<text hint-align="center">63°</text>
<text hint-style="captionsubtle" hint-align="center">42°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Tue</text>
<image src="Cloudy.png" hint-removeMargin="true"/>
<text hint-align="center">57°</text>
<text hint-style="captionsubtle" hint-align="center">38°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Wed</text>
<image src="Sunny.png" hint-removeMargin="true"/>
<text hint-align="center">59°</text>
<text hint-style="captionsubtle" hint-align="center">43°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Thu</text>
<image src="Sunny.png" hint-removeMargin="true"/>
<text hint-align="center">62°</text>
<text hint-style="captionsubtle" hint-align="center">42°</text>
</subgroup>
<subgroup hint-weight="1">
<text hint-align="center">Fri</text>
<image src="Sunny.png" hint-removeMargin="true"/>
<text hint-align="center">71°</text>
<text hint-style="captionsubtle" hint-align="center">66°</text>
</subgroup>
</group>
</binding>
</visual>
</toast>
順便說一句,我已經在Visualizer應用程序中嘗試了您的xml代碼,但沒有顯示任何內容! 嘗試調整我提供的xml代碼以滿足您的需求...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.