Popups in Pivot - silverlight

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!

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.

Related

React elements that are selectable and draggable

I'm using react-selectable-fast on a list of items that can be selected. However an item or a group of selected items should also be draggable, which is implemented using react-dnd.
The issue is that the selecting comes in the way of dragging; when hovering on top of an item and trying to drag it I end up selecting instead.
I've managed to fix the issue with a hack: store in state whether currently hovering an item or a group of selected items and if so disable the <SelectableGroup>. However this means that the whole list of items is rerendered every time I move the mouse over an item.
So I would like a better solution but I haven't been able to find one. In the last attempt I put the draggable element (using connectDragSource) on top of the selectable element (using createSelectable) again on top of <SelectableGroup /> and gave them increasing z-indexes, also tried playing around with stopPropagation() and preventDefault() but still the selecting overrides the dragging.
Any ideas?

Sencha ExtJS - Display combo picker always on top of the control

So I have this specific combo that I need to display its picker always on top (just as it behaves when it is too near to the bottom of the page). As shown here:
I tried with the pickerAlign config but I wasn't able to put it on top of my control. Thanks!
Found the answer, this will do:
pickerAlign : 'b-t'
Anyway, it displays the same amount of items it would as if there was the same space on top of it that the amount beneath it.

Adding a button to the end of the grouped gridview

I am looking into adding a button to the "end" of the grid view.
The idea is that I have a grouped view showing groups and items with in these groups. I only show some of the items within the group and wants to show a "load more" button at the end of the items shown.
I have tried all kinds of things in the standard grouped items page with no luck.
Any good ideas?
Thanks in advance
Kim
The simplest answer is to follow the approach used by most existing apps: Allow the user to click on the header to display all the items.
You can also add the "Load More" button as if it was a normal grid item. Then, style it differently using a different template and ItemTemplateSelector.
Finally, the most complex (and flexible) solution would be to put the "Load More" button above the GridView, and manually sync its location when the GridView is scrolled...

silverlight combobox - highlight a few items in the popup list

I'm wondering if I can make fake sections in the popup menu:
The rule would be, if the 5th character of the displayed item is different from the 5th char of the previous item in the menu, it has to be highlighted
What do you think?
Thanks!
To achieve this would be a hack.
Normally the items that appear in the popup part of a combo box will be an instantiated data template, and each gets its own data item and has no clue or knowledge of the other items in the list, so you couldn't use a converter or anything else to achieve this behavior.
What you could do though is inject (attach) your own control into the popup part of the combo box, and take over the rendering of the data items. How you do this will depend upon which combo box you are using (i.e. MS or some other vendor's) and would be a whole new question.
Would that be easier if I were to create my own combobox as follow:
a TextBox associated with a Button that when pushed would popup a datagrid in which I could implement this conditional formatting?

Alternative Content for a Selected ComboBoxItem

I need to place a ComboBox in a place where I have very limited space. Is there any way to show content for the SelectedItem in the ComboBox that is different than the content that is displayed for the item in the ComboBox's Popup?
As an example, Firefox does this with it's Site Search box in the top right of the browser. When you open the dropdown, the site names are displayed along with their respective logos, but when a site is selected, only the icon is displayed.
UPDATE: Solution found :-)
I found a solution at this site:
http://blogs.windowsclient.net/airborneengineer/archive/2009/06/25/wpf-styles-and-templates-part-ii-combobox-customization.aspx
I just needed to modify the "DisplayImageWithText" DataTemplate to only show the field I want.
Yes, have 2 sets of data and change the display member column of the combobox - according to the position. as long as the value is the same, it will work good, and you'll get 2 displays out of the same combo-box.

Resources