wpf listview

I was working on Listview control using XAML. I have few questions:

1. Is there a way to find out if the control key is pressed when the particular item is selected.

2. I wanted to differentiate between single click on listview from single click on listview while the control key is pressed. Is there a way for such differentiation?

[389 byte] By [manganu] at [2008-1-7]
# 1

I think you can solve your problems with commands. Because you can define when a command is executed, e.g. MouseClick, MouseDoubleClick.

Take a look at the RoutedCommands, InputBindings and CommandBindings.

Martin_Moser at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2

The problem is when I click on listview, it becomes mouse event and I doubt if it has any information about the control key.

manganu at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 3
You can use the keydown event and store a boolean that indicated that the control key was pressed...
MarlonGrech at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 4
you could use

Keyboard.IsKeyDown(Key.LeftCtrl) or

Keyboard.IsKeyDown(Key.RightCtrl)

leed at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 5

You are great!! This small thing was bugging me for sometime. I guess I didn't care to go into little basics.. Thanks a lot!!1

manganu at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 6

Thanks.. a lot
manganu at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified