Questions tagged [mouseleftbuttondown]

41 questions
34
votes
9 answers

WPF Context menu on left click

I have a WPF application..In which I have an Image control in Xaml file. On right click of this image I have a context menu. I would like to have same to be displayed on "Left click" also. How do I do this in MVVM way ?
Relativity
  • 6,690
  • 22
  • 78
  • 128
13
votes
6 answers

In WPF, how do you tell if the left mouse button is currently down without using any events?

I have an app where I want to be able to move a slider. However, the slider is automatically updated by the program every 30 seconds. When I try to change the slider position with my mouse, the program is still updating the slider position, so I…
Curtis
  • 5,794
  • 8
  • 50
  • 77
11
votes
3 answers

wpf Button.MouseLeftButtonDown doesnt work at all

Im trying to learn how MouseLeftButtonDown works but no seccuss until now. When i click on the button, nothing heppends.
Stav Alfi
  • 13,139
  • 23
  • 99
  • 171
8
votes
4 answers

Firing MouseLeftButtonDown event programmatically

I'm trying to manually fire a MouseLeftButtonDown event on a WPF control programmatically, as I am using the Microsoft Surface SDK, which does not fire MouseLeftButtonDown events, but ContactDown events. Basically I'm trying to push the…
RajenK
  • 1,403
  • 3
  • 15
  • 25
7
votes
2 answers

java swing hold both mouse buttons

I want to implement a method where the user needs to hold the left and right mouse buttons at the same time. I'm using Swing and Java 1.7. I've tried this, but it doesn't detect the both-buttons case like I'd expect it to: public void…
6
votes
3 answers

wpf - transparent MainWindow and issues with DragMove "Can only call DragMove when primary mouse button is down."

I have a wpf project which uses transparent windows and I share this transparent window styling for my dialog windows and my mainwindow. I am getting an error on my DragMove() event of my MainWindow AFTER I close a dialog window that uses the same…
TWood
  • 2,563
  • 8
  • 36
  • 58
4
votes
2 answers
4
votes
1 answer

MouseLeftButtonDown not recognized by a ListBox?

I'm encountering a huge problem, I have tried everything I could, but I didn't find any solution. I have a listBox, with a DataTemplate. I want to use the events MouseLeftButtonDown and MouseLeftButtonUp to check the item selected is the same the…
Flo
  • 261
  • 1
  • 3
  • 6
4
votes
1 answer

How to display a popup menu by mouse left click in swt?

How to display a popup menu by mouse left click? I know the default is for mouse right click. But I want to expand(display) the menu just by a normal selection of a button. (by normal left click). How to popup a popup menu by normal right click is…
Samitha Chathuranga
  • 1,689
  • 5
  • 30
  • 57
4
votes
2 answers

WPF DataGrid MouseLeftButtonDown not firing

I have a common task. Implement CheckBox checking in DataGrid by one-click. I deside make a DataGridExtended class, derived from DataGrid, and implement something like that: XAML:
monstr
  • 1,680
  • 1
  • 25
  • 44
2
votes
1 answer

Silverlight Handle App MouseLeftButtonDown?

In my silverlight project I have a Menu, that I want to close it if I click anywhere outside it. I add handler to the click event on App: AddHandler App.Current.RootVisual.MouseLeftButtonDown, AddressOf HideMenu But the problem that: it does not…
Saad
  • 374
  • 5
  • 19
2
votes
1 answer

Javascript check if left mouse button is clicked

I have this code to detect mouse down. However on android phones, mouse down for a long time often converts to a right click. Is there a way I can only get information about left mouse click? var mouseDown = 0; document.body.onmousedown = function()…
1
vote
1 answer

How can I change the button's background image twice in MouseLeftButtonDown event?

I write the following event handler in MainWindow.xaml.cs. I want to achieve such an effect,when the business logic is running the runbutton's background image switches to powerOnOff1.png, when the business logic is finished the background image…
1
vote
3 answers

Div with phantom left padding

I have a Div tag that for some reason is padding the left side with approx 50px. The following is the html and mind you nono of the "class" have padding-left"
mattgcon
  • 4,768
  • 19
  • 69
  • 117
1
vote
2 answers

WPF ListView and ScrollViewer hide MouseLeftButtonDown

To demostrate the problem I have this Xaml: ListViewItem
ILIA BROUDNO
  • 1,539
  • 17
  • 24
1
2 3