Multiple UI for a single ListBox in Wp8 - c#

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

Related

Programmatically create table with clickable and expandable content in WPF

This is what I desire to create:
As you see I need to create table like control with images and clickable cells. When you click on an arrow on the left it expands its' content and content contains some more additional table like controls with data. Also when user clicks on a Star I need to add this event to Favorites list and etc.
Currently, for each data row I'm thinking of programmatically creating accordion item with Grid in header for images and cells and other Grids for the content.
What is the best and easier way to achieve this task? What controls should I use? I need some suggestions, as I'm new to WPF.
WPF DataGrid can show RowDetails. Customize them with RowDetailsTemplate property and manage their visibility with RowDetailsVisibilityMode property

How to show same control in different pivot item?

Is this possible to show same control in every pivot item.
So I think my options are
1.Change the pivot header but not changing the pivot actually.
2.Add the control as a child control of a grid in another pivot item.[which i think not possible]
3.Just ctrl+c and ctrl+v the design with different names of the control[i don't want to do this].
Is there any other way? Option 1 or option 2 is possible? If yes how?
Please Help.
In your case what makes more sense is to create a UserControl.
I suggest that you create a UserControl from the Grid. It is easy to do in Blend. Open your project in Blend, expand the page contents in the Objects and Timeline panel, right-click on the Grid and select Make into UserControl. Blend will create a UserControl class that you can reuse in each PivotItem.
Taken from MSDN Forums
//Now you should be able to do something like this.
MySecondPivotItem.Content = new MyUserControl()
And that's all. Also you can create the PivotItem on the flight and add it to the Pivot, like this: (Assuming that pivotMain is your Pivot)
pivotMain.Items.Add(MySecondPivotItem);
Hope this helps

Manually opening a ListPicker

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.

windows 8 combobox hides behind WebView

I have a grid view which has multiple items.
Each Item is a Webview. Now My issue is that I have a ComboBox above the GridView. When I select Combobox the drop down hides behind the GridView item (i.e Webview). Now I cannot use a WebViewBrush since I have multiple WebView items inside the grid view. Any suggestions?
XAML UI is always behind a WebView window - this is a typical airspace issue. You have to use WebViewBrush for any WebViews that might obscure your XAML controls. Some alternatives include modifying your UI layout - e.g. going to a separate page to display your selector control or moving ui elements about so they don't collide or implementing all of it in HTML.

Adding image to the Listview subitems [ windows forms ]

I'm doing project in windows forms using c#.
I want to show an image in the listview subitems.
For eg:-
There is a listview having 3 Columns (Column 1 is Roll number,Column 2 is StudentName,Column 3 is StudentPhoto) .I can use the ListViewItems to add Items in the ListView.
Adding First items to the ListView,
ListViewItem item = new ListViewItem("101");
item.SubItem.Add("Robin");
SampleListView.Items.Add(item);
Now i'm having difficult in Showing StudentImage in the 3rd column,Can anyone help!
Note:
Also i have ImageList assigned to SampleListView.
ListView does wrap the native list view control from common controls of Windows. This control does not directly support images on subitems. You need to set the listview it to owner draw to let you handle the drawing.
Luckily others have done this already. On CodeProject there is a good one.

Categories

Resources