(XAML) Supporting Down Key navigation in ListView - xaml

Windows Store App
XAML
I have a ListView in a PopUp. I want to trap the Down key in a TextBox (not in PopUp) and Set Focus to the ListView. Focus works but when I press the Down key the First item in the list is Selected. I want to allow the user to navigate down through a ListView using the down key.
I must be missing something very obvious as this shouldn't be that hard.
Thanks

Related

Showing Tool-tips while Application is in the System Tray?

In my application when it is iconized in the system tray, and through a ContextMenuStrip1 displays a context menu and when I click the icon I can choose what to display; the application, close it etc.
Now, when the mouse is over the icon I would like to show a tooltip (property that unfortunately does not have, but that have the individual menu items), it always shows me the name of the menu object: ContextMenuStrip1, even in its text property set something else.
Since at some times the app makes updates in background I would like to show under the icon a small progressbar as do some application. How is this possible in vb.net? (I'm using VB2012)
Thank you all.
I resolved you need to use the Text property of the notifyIcon object.

Windows Phone 8.1 - Auto Complete and ListBox Focus

I have textbox and a listbox. On typing into textbox, listbox will start populate suggestions based on text typed in textbox. The Listbox is inside a popup and will open only if there are any suggestions. A traditional custom auto suggestion box.
Now the problem is, when user started typing, the popup will open and steal the focus from textbox. So user cannot continue typing. What is the best and standard approach to solve this problem?
I tried focusing the textbox, as soon as the popup opens. But still it has a small lag (for the first time, when ListBox rendered) and I could see a flickering with virtual keypad jumping up and down.
It seems like you need to stop the text box from losing focus...
I am assuming you are using MVVM(Model View ViewModel) for your list box and text box. So I would have a search criteria value in my view model populate the list in the pop-up.
<TextBox Text="{Binding Path=SearchCriteria, Mode=TwoWay, UpdateSourceTrigger=Explicit}"></TextBox>
UpdateSourceTrigger is the key, by default text box only updates on lost focus But when you change the binding to UpdateSourceTrigger=Explicit, it will update the view model on every key stroke.
This way you can re-filter the list with every key stroke and the text box will not lose focus.

ContextMenuStrip LayoutStyle

I am using VB.NET VS2010. I have a toolstrip with a ToolStripDropDownButton.
The dropdown items are created at runtime and all works fine.
The problem is that when there are too many items the small overflow buttons appear which are unusable in touch screen tablets.
I set the LayoutStyle to Flow but cannot get the items to flow.
I have now set the dropdown of the button to a ContextMenuStrip so that I could perhaps customise it better but no matter what I try the LayoutStyle of the ContextMenuStrip stays the same.
How can I get it to flow properly the way the main toolstripitems flow?

vb.net How to make a DropDownList with readonly appearance

I am developing desktop application using vb.net and vs2008.
I have a DropDownList that I don't want it interact with use when the info is locked.
But if I disable it, it is greyed out and the text is not easy to read.
Is there any way to make radiobutton like readonly textbox?
I want text of the DropDownList looks black and itself is not clickable.
The above shows a disabled DropDownList with greyed out text and a readonly textbox
Try this:
Enable="false"
Place it within your <asp:DropDownList> tag.
I recently encountered a similar issue. My solution was to remove all other values of the DropDownList except the one that is selected. This will keep the text as black as opposed to grey. Users will be able see the existing value and click it but will not be able to change it.
Hope this helps.
No, you can't use CSS in a desktop app. When you disable the dropdownlist by setting Disabled=true; or Enabled=false (whatever the case is), you can also change the Font properties to make it easier to read. You can set other properties such as Border, BorderStyle, etc, etc.
Keep the control enabled. In the GOTFOCUS event, use SENDKEYS to send a {tab} to the form. the user will not be able to change it! By the way, workt for ALL controls, that a user can focus.

How can I set the tab order in VB.NET?

I have a bunch of buttons on a form and when the person presses TAB I want the focus of the controls move in a specific order. Does anyone know how to do this?
If you have form with lots of control then manage tab index by below method:
Open form in design mode.
Click on “View” from toolbar --> “Tab Order” at bottom.
Example:
Then just click on controls one by one in order that you want to set tab order.
You can do this in the Designer as well, see Setting the TabIndex property of many form controls in Visual Studio?
Each item in your form-designer should have a TabIndex property.
Set the TabIndex in ascending order. (low-to-high)
Change the TabIndex property of your controls and enumerate them according to your need.