Click here to Skip to main content
15,885,872 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF - Hierarchy of Expanders & ListBoxes Pin
Kevin Marois9-Jun-14 7:59
professionalKevin Marois9-Jun-14 7:59 
QuestionWPF / MVVM - Displaying tabcontent only in my system and not displaying other developers/user screen Pin
Member 80814488-Jun-14 4:02
Member 80814488-Jun-14 4:02 
AnswerRe: WPF / MVVM - Displaying tabcontent only in my system and not displaying other developers/user screen Pin
Wes Aday8-Jun-14 5:28
professionalWes Aday8-Jun-14 5:28 
Questionform loads on build Pin
bryce3-Jun-14 15:17
bryce3-Jun-14 15:17 
AnswerRe: form loads on build Pin
Pete O'Hanlon4-Jun-14 5:51
mvePete O'Hanlon4-Jun-14 5:51 
GeneralRe: form loads on build Pin
Kevin Marois9-Jun-14 8:39
professionalKevin Marois9-Jun-14 8:39 
QuestionWPF ListBox - Select ListItem From DataTemplate Pin
Kevin Marois2-Jun-14 13:02
professionalKevin Marois2-Jun-14 13:02 
QuestionDetection of physical keyboard on Windows 7 in a desktop WPF application Pin
Jenny D30-May-14 12:04
Jenny D30-May-14 12:04 
I am creating a WPF desktop application to be run on both Windows 7 and Windows 8, and on both desktop computers and tablets. I need to pop up the on-screen keyboard (osk.exe) when a TextBox control GotFocus but only if no physical keyboard is connected.

I am using GetRawInputDeviceList() and GetRawInputDeviceInfo() functions to find the keyboard devices.

When I run my app on the Surface Pro without physical keyboard attached it detects one keyboard with the following information:

Keyboard:
Name = \\?\HID#VID_045E&PID_079C&MI_01&Col03#8&c93f0be&0&0002#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}
Handle: = 18024907
KeyboardMode = 1 | NumKeysTotal = 6 | Subtype = 0 | Type = 81 | VendorID 81 | Usage 0 | ProductID 0 | VersionNumber 1 | NumIndicators 3

When I run it on the Surface Pro with physical keyboard attached it detects two keyboards with the following information:

Keyboard:
Name = \\?\HID#VID_045E&PID_079C&MI_02&Col01#8&17434d04&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}
Handle: = 43648689
KeyboardMode = 1 | NumKeysTotal = 154 | Subtype = 0 | Type = 81 | VendorID 81 |Usage 0 | ProductID 0 | VersionNumber 1 | NumIndicators 3

Keyboard:
Name = \\?\HID#VID_045E&PID_079C&MI_01&Col03#8&c93f0be&0&0002#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}
Handle: = 18024907
KeyboardMode = 1 | NumKeysTotal = 6 | Subtype = 0 | Type = 81 | VendorID 81 | Usage 0 | ProductID 0 | VersionNumber 1 | NumIndicators 3

The only difference between these two keyboards is the numberOfKeysTotal field: one is 154, the other is 6.

My question:

How can I tell if a keyboard device is physical or virtual? By NumberOfKeysTotal?

Thanks.
AnswerRe: Detection of physical keyboard on Windows 7 in a desktop WPF application Pin
Bernhard Hiller2-Jun-14 0:20
Bernhard Hiller2-Jun-14 0:20 
GeneralRe: Detection of physical keyboard on Windows 7 in a desktop WPF application Pin
Jenny D4-Jun-14 11:49
Jenny D4-Jun-14 11:49 
QuestionMediaElement not releasing the file on its Close() method in WPF Pin
Praveen Raghuvanshi28-May-14 17:59
professionalPraveen Raghuvanshi28-May-14 17:59 
AnswerRe: MediaElement not releasing the file on its Close() method in WPF Pin
Gerry Schmitz29-May-14 10:40
mveGerry Schmitz29-May-14 10:40 
GeneralRe: MediaElement not releasing the file on its Close() method in WPF Pin
Praveen Raghuvanshi3-Jun-14 23:55
professionalPraveen Raghuvanshi3-Jun-14 23:55 
QuestionCombobox - Highlights first letter typed after gained focus Pin
Clint Dow27-May-14 7:49
Clint Dow27-May-14 7:49 
QuestionDisplay Alternative images based on AlternationCount=2 in listbox in wpf application ..its not Displaying Pin
Member 785476927-May-14 0:46
Member 785476927-May-14 0:46 
QuestionMake a 3D casino spin wheel in Silverlight. Pin
Vishal Kumar Singh26-May-14 23:17
Vishal Kumar Singh26-May-14 23:17 
AnswerRe: Make a 3D casino spin wheel in Silverlight. Pin
amigoface27-May-14 2:16
amigoface27-May-14 2:16 
Questionhow to drag and drop with image preview in wpf using c# Pin
kalsa23-May-14 21:20
kalsa23-May-14 21:20 
QuestionBest Practice for using WPF Resources Pin
hari111r19-May-14 19:14
hari111r19-May-14 19:14 
AnswerRe: Best Practice for using WPF Resources Pin
Mycroft Holmes19-May-14 21:22
professionalMycroft Holmes19-May-14 21:22 
GeneralRe: Best Practice for using WPF Resources Pin
hari111r19-May-14 23:52
hari111r19-May-14 23:52 
GeneralRe: Best Practice for using WPF Resources Pin
Mycroft Holmes20-May-14 13:02
professionalMycroft Holmes20-May-14 13:02 
QuestionTwo questions about the TreeView control Pin
Mc_Topaz16-May-14 1:45
Mc_Topaz16-May-14 1:45 
AnswerRe: Two questions about the TreeView control Pin
SledgeHammer0116-May-14 6:45
SledgeHammer0116-May-14 6:45 
QuestionRe: Two questions about the TreeView control Pin
Mc_Topaz16-May-14 7:40
Mc_Topaz16-May-14 7:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.