Manually opening a ListPicker - c#

I have a ListPicker (from Telerik's Rad Controls suite) in PopUp Mode (with around 200 elements) with its visibility set to Collapsed. I want to open when it when I press a button, instead of when I press the control itself.
Basically I'm asking if there's any way of programatically opening a UI element in Windows Phone (something like Control.Open() in the code behind).
The context for my question is the following:
as you know, the selected item of a list picker is displayed in the page containing the control.
users can click on this item to activate the control.
I want to display only one of the properties in the page containing the control (for example MyObject.Name instead of the entire MyObject), but I can't do this because the SelectedItem and ItemsSource need to be of the same type.
I'm thinking of styling a button to look identical to the ListPicker's selected item.
I need to open the ListPicker programatically when I click on the button, I'll bind the button's text to MyObject.Name
Alternatively, I could just do a data template for the way the list picker is displayed, but I'm not convinced it's possible.

Found the answer. It seems Telerik's List Picker allows you to set both an ItemTemplate for displaying items in the actual page, and a PopupItemTemplate for displaying items when the list is expanded. Both are Data Templates, so you can use Binding for values.

Related

Is it possible to pass listBox selected Items from one wpf page to another

I am trying to select multiple items on a listbox and when a button is pressed those items get moved to another listbox on a separate page. Perhaps i need to use serialization or a storage folder?
If both pages are opened by the same application, you can just have a property in one of the pages, which will reference the property in the other page and some event, that will fire on when the button will be pressed.

JQuery ContextMenu not firing for disabled item

I have an excel-like table. The following picture represents a part of it (for clarification, I setted the text of the inputs to be their respective IDs):
There is a ContextMenu that is fired on right click (code here) in each one of the inputs.
Here is how I find all these input controls at once (I need to use this way because there are some more columns that I do not want to call the ContextMenu):
$('[id^="txtF_"],
[id^="txtP_"],
[id^="txtT_"],
[id^="txtE_"],
[id^="txtM_"]').contextMenu({ ....
This works nice, however, if one of the items is disabled, the browser menu shows up instead. What can I do to fire the custom ContextMenu even if the input control is disabled?

Multiple UI for a single ListBox in Wp8

I have a listbox in the xaml page.I have created three tabs(Normal text boxes) on the top.If clicked on tab 1 or tab 2,it displays an expander view in the listbox as its item.I want to create a simple listbox for the 3rd tab,i.e, no expander view.Is it possible in wp8?
I not sure that I understand your question, but I think that you could use a Pivot control to achieve the results you want to get.
Using a Pivot, you could get different "tabs" and each tab could have his own controls. Hope this helps

Scrollable ListPicker items list

I have a Popup control in my application. In this popup I use a ListPicker object to choose
the proper item. If the list of items if quite small, everything works fine, but, however, if the list items number is big, the list of items is shown at a new page somewhere at the background. That's the native behavior for ExpansionMode.FullScreenOnly of ListPicker, but I can't use it that way.
Is there a way to make a list of items scrollable to save the ListPicker behaviour of ExpansionAllowed style?
If not, is there a similar control in Windows Phone, that allows to create a drop-down menu in that style?
Right, let me show the difference:
1) That's how it should work, the number of elements is quite low, there are only four of them. When I click at the item (item has a name 2012-12-17) a list of items is shown in drop-down menu.
2) That's the problem one. The number of items is high, there are more than ten. When I click at the current item, the drop-down menu isn't shown in this popup, instead it's shown at the new page (could be seen in background). But that breaks all my logic, I can't even choose another element(can't click on it, because you can't click on page when popup is opened).
Can anyone propose a solution?
The ListPicker control seems to be useless, as I couldn't find out how to solve this problem.
The solution will be to use different control, for example ListBox, which is scrollable by default. (will be similar to Scrolling ContextMenu items question solution) That will be differ from the UI-style I wanted, but it will work.

Issues with Windows forms user control

I am creating a Windows forms user control. This control has a textbox and a listbox.
When the end user types text in the textbox, the listbox will appear and filter the data
depending on the text box. The data is set by a datasource.
I have created this control because I want to filter in the contains of data "not start with."
Now after I create the control I found a problem when the list appear it did not appear out of form boundaries.
I change the control size in appear and disappear the listbox. What can I do?
You can not show a ListBox out of the boundaries of its parent Form. What you really wan to do is open a new Form where ListBox is visible.
Hope this helps.

Categories

Resources