Windows Phone Listpicker Selected Item not highlighted in FullScreen mode - windows-phone-7

I am using the Microsoft.Phone.Controls.Toolkit in my Windows Phone 8 project. There is this control named list picker which is the substitute for the conventional dropdownlist control in windows phone. When the number of items in the list is more than 5 the list picker automatically opens into a full screen page which is quite useful as a built in functionality. The problem I have here is that in full screen mode the selected item never gets highlighted as in the case of normal expanded mode. Is there any solution to this other than restricting the listpicker from going to full screen mode(I've already tried that but it is not at all advisable for long lists like list of countries,states etc.)?

You can also create two template:one for selected item and other for rest of them. If current item is selected than you can assign template accordingly.
You can assign your template here:
<toolkit:ListPicker
x:Name="ddlMode"
FullModeItemTemplate="Give your templete selector">
</toolkit:ListPicker>

Related

Keyboard navigation for RadListBox with icons

I am using RadListBox to show a list of items. Each item has an icon. The requirement is jumping on the item when a the first letter of that item is pressed.
For example: It should focus on "Dock" when letter "D" is pressed
Is there any built-in feature to accomplish this>
This functionality is built into the RadListBox right out of the box.
You must have the list box focused and then type a key to select the item with the first letter matching the key that was pressed. In order to focus on the list box you can either: click with the mouse, tab to it, set focus in JS, or use the KeyboardNavigationSettings.CommandKey and KeyboardNavigationSettings.FocusKey to help aid with keyboard navigation.
Example:
RadListBox1 = new RadListBox()
RadListBox1.KeyboardNavigationSettings.CommandKey = KeyboardNavigationModifier.Alt;
RadListBox1.KeyboardNavigationSettings.FocusKey = KeyboardNavigationKey.L;
You can also use EnableMarkMatches to highlight more than one match if necessary and for typing more than one letter for selecting.
Reference: Telerik RadListBox Keyboard Navigation Demo << This has all the sample code you should need.
Seems this a Telerik bug, but i made a project, test situation and it's working.
download sample project here.
this project tested on google chrome Version 60.0.3112.113 (Official Build) (64-bit)
After run project press Alt+s or Alt+o or Alt+c
Remember change AccessKey property to change shortcut key:
RadListBox1.Items[0].AccessKey = "s";
I should say that this NOT a perfect solution.
RadListBox is a powerful ASP.NET AJAX control to display a list of items. It allows for multiple selection of items, reorder and transfer between two listboxes. Drag and drop is fully supported as well.

Positioning mouse cursor on another Application's List item entry based on its text value

I want to do an automation using Excel VBA. First of all I am not sure if its possible so I need to explain the problem first.
I would launch an application which has a list of reports , that one can run by right clicking on any of these and selecting an entry from the popup menu caled say "Run this report". The problem is the report names are displayed in a listbox.
There are so many entries I only need to run a few of them based on their names.
To achieve this I thought about placing the mouse cursor on the text displaying the appropriate report name and then trigger the right click event. These can be done using Windows APIs.
The challenge I am facing is how to hover my mouse on any particular list item based on its display text.
I can enumerate all the windows controls based on the handle of the application's window, but is it possible to get the location of any item on the screen based on the text displayed on list item.

Highlight multiple adjacant textblocks in a XAML Windows Phone 8.1 (WinRT) App

I am modifying an application that reads in a document, and then generates a TextBlock for each word in the document and then outputs it to the screen.
Each TextBlock has the IsTextSelectionEnabled property set to true, and this works for highlighting the word, or part of the word in an individual TextBlock.
My question is whether it is possible to allow the user to select "across" TextBlocks, so they can then highlight multiple words (TextBlock controls) at the same time.
At the moment, other code in the App relies on there being individual TextBlock controls for each word -
This is something I can change if required, but I wondered if there is a built in, or simple way to allow the user to select multiple adjacent TextBlocks? Otherwise I will look to implement something myself and post my solution here at a later date.

How to build dropdown menu in wp7, I have tried ListPicker but its not working for long list?

I need a drop down menu in my windows phone silverlight app, from which user can select a choice, for example user can select his/her district from drop down menu of districts.
I have tried ListPicker but its not working for a long items list, i.e if I am giving more then five items to list, there is a weird output.
Please help me.
Go for
LongListSelector
in Microsoft phone controls toolkit...
It is not "weird output", it that how ListPicker control works. ListPicker behaves differently depending on the amount of items. If it has upt ot 5 items, it shows as in-place selection list. However, if it has more items, it shows as a fullscreen popup. You can set the FullModeItemTemplate property to change how it looks when fullscreen.
Find more info here:
ListPicker for WP7 in depth

ListPicker - how to make current selection show when full page view opens

I'm using the ListPicker from the latest Silverlight Toolkit on Mango
I've got a long list (100 items) of simple text items to choose between - using single item selection mode.
When I click on the ListPicker it opens up in full screen very nicely, but it doesn't scroll to the current selection.
This is a pain for the user - who typically wants to move from "item75" to "item76"
I've looked through the available properties, events and source code, but I can't see any obvious way to get the list to scroll the current selected item into list when the full screen mode opens.
Anyone got any ideas?
I found this Which may help, i hope it does!
in Depth ListPicker
See on MSDN what some of the events that can be triggered when selecting a Listpicker item and mess around with them, you may find a Very good Solution! :)
There didn't seem to be a way to do this with the current release - but the code is open source.
The current release also has a disadvantage of using StackPanel instead of VirtualizingStackPanel - so it is very slow at displaying long lists.
Instead of using this release, I ended up going with a different list selector http://priyarules.posterous.com/categorized-list-selector-for-windows-phone-7

Resources