2

I have a Pivot layout with three items. One holds news for today, the second shows news for the week and in the third one you can search by date. If there aren't news for today yet, I show a message through a popup. I use a popup because I can put it over the datatemplate list. The problem is that if I show the popup in the pivotitem for today news, it is shown in all other pivot items, but in code is inside the first pivot item only!

How can I solve this? Would you recommend me to use something different than a popup? I could hide the popup when pivot item is changed, but I want the message to remain visible in the item that has no news.

thank you!

enkara
  • 6,189
  • 6
  • 34
  • 52

1 Answers1

2

There are known issues with regards to performance and rotation with the Popup control. My suggestion would be to use a Grid element and toggle it's visibility as and when required. For this overlay to be shown on top of the whole pivot (and not just the current item contents) you will need to put it at the same level in the visual tree as the pivot, and declared afterwards in the XAML to ensure that it appears on top. Other than that, it's just a case of showing/hiding it based on your logic and the selected pivot item.

Derek Lakin
  • 16,179
  • 36
  • 51
  • well, I don't want to show it on top of the whole pivot, I want to show it where the list of news would be if there were any. So I want to place it over the listbox. How could I do that? – enkara Mar 30 '11 at 09:14
  • Same rules apply, just declare at the same level as your ListBox, but afterwards in the same so that it appears above the ListBox. – Derek Lakin Mar 30 '11 at 09:50
  • I wasn't able to put the control over the listbox, but I've done it using the design pane. thank you! – enkara Mar 30 '11 at 13:23