I want to make something like when I'm choosing some item from a ComboBox so that my grouped GridView that located into ScrollViewer will nevigate/focus to the group (or to its header) that has the group-header with the string value of the chosen item in the ComboBox.
Any ideas? mayble some games with TabIndex property or something like that?
Why do you host Grid View inside of ScrollViewer? GridView has it is own ScrollViewer.
When you will start to use ScrollViewer inside of GridView (just move Grid View out of ScrollViewer) - you just need to use ScrollIntoView method to navigate to the item.
Related
I'm displaying a GroupedList view, and have both enabled the group header and jumplist. I've tried to hide the Group header, but so far with no luck. This property I want to hide is GroupDisplayBinding. If I don't set it, a default of ToString for my Item is displayed. I just want it gone, as a regular list only with the jump option enabled.
A little update: I searched some samples and what I want is a TableView with and indexed list as displayed here: https://developer.xamarin.com/guides/ios/user_interface/tables/part_2_-_populating_a_table_with_data/#Adding_an_Index
Best regards
Xamarin.Forms listview allows you to specify your own layout for the listview group via GroupHeaderTemplate property. You can use this layout to keep the header content empty.
Have a look at Customizing Listview Grouping
If you want to define the group header layout in code you will have to create a new subclass of ViewCell and build the layout. See an example at Enhancing Xamarin.Forms ListView with Grouping Headers
I'm trying to add a button, like the k-select element, to the end of a Kendo combobox for adding new items but whatever i change the element the result is not consistent and fine with other elements.
kendo combobox generate this style for button to open the list.select
I want to find clear way to add an button to end of combobox like this link.
the template won't help becase it in control in in list.
tnx
Using MVVM Light I have a listbox databound to a collection of several items.
One of the items is the selected one.
With this code it works perfectly and ViewModel structures are updated correctly:
<Name="listBox1"
ItemsSource="{Binding Path=Models}"
SelectedItem="{Binding Path=csProfile.Model, Mode=TwoWay}">
My problem is that when I enter the page if the selected Item is not in the first items it is not visible and the user does not know what was the previous selection.
How could I force the Listbox to always show the Selected Item?
Possibly via properties or Binding.
M
There's no property you can bind to to set what's visible. Instead call ScrollToVerticalOffset() on the ScrollViewer inside the ListBox.
I think you are looking for the ScrollIntoView method. A similar topic was discussed here:
Automatic Scrolling in a Silverlight List Box
The API reference is here: http://msdn.microsoft.com/en-us/library/system.windows.controls.listbox.scrollintoview(VS.95).aspx
Calling UpdateLayout() before calling ScrollIntoView on the selected item seems to be necessary.
I am developing a wp7 application using longlist selector. My requirement is to change font of only some items on the screen. For this i need to get the text box control for the item.
The textbox is a part of item template of the long list selector.
The items to be modified change with the scroll.
I tried using the Link event. here i can find the contentpresenter for the item being added. But how can i get the textbox from the content presenter.
Any one can help with this? pls.
Instead of searching for the TextBlock that gets generated - provide your own in the ItemTemplate/DataTemplate and set its font through binding to an item in the ItemsSource. You can use a converter to determine the font or provide the font directly in each item of the bound collection.
How can I place listbox item separated from each other or leaving some space in between.
I believe if you have a datatemplate, you can just add the following code to the listbox itself: Margin="10" (or any number you like) and that will set a space between each item.
Are you using a template for the listbox items? Are you using databinding and the DataContext or ItemSource properties? I'm sure you can add margins to the items you add to the template to create the space you desire. Check out Nerd Dinner Example for use of a template.