2016-06-11 4 views
0

デスクトップアプリケーションからToast(not tile)通知を表示しようとしています。 (c#) グループがすべてOKですが、テキストと画像が表示されますが、グループ(サブグループ)は表示されません。 なぜですか?Windows 10での通知(winrt + desktop)サブグループでは動作しません

NotificationsExtensions.Win10でxmlを作成します。 必要に応じてraw 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> 

`

答えて

0

あなたはそれを送信する前に、あなたのトーストをテストし、それを表示するには、この素晴らしいアプリを使用してXMLデータを設定できます。 Notifications Visualizer - Windows Store

あなたの問題のために、私はあなたが閉じタグを紛失した、またはビジュアルのXMLコードの順序が間違っている一般的な問題だと考えています。解決策はNotifications Visualizerアプリケーションを使用することです。

アップデート1:

アプリをダウンロードすることができないので、ここでは、彼らが使用するXMLコードがあります..私は私のマシン上でそれを試してみましたが、それはよく見るのです:

Weather Toast

<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コードを調整してみてください...

+0

ありがとう、ありがとうございます。しかし、Windowsストアはこのコンピュータでは動作しません。アプリをインストールすることはできませんか?後でもう一度試してみてください。 私は天気予報を使用して、グループは隠されています –

+0

私は私の答えを更新しました、あなたはそれを試してみてください? –

+0

私のコードを使用するには、画像のパスを変更する必要があります。誤ったパスを使用するとデフォルトのテキストで通知されます。正しい画像パスを使用するとサブグループなしでテキストが得られます。 私はWPF共通デスクトップアプリからのニジショーを表示します.Windowsストアアプリでは表示しません。あなたと私のコードだけの画像の違い。 –

関連する問題