Set Bit While Button IsPressed. Libnodave c#

OP
M

mrludvig

Member
Beiträge
5
Punkte Reaktionen
0
Zuviel Werbung?
->Hier kostenlos registrieren
Hi

I forgot to metion that this C# code is with WPF.
The Button "Command_Drain01" is in WPF

Code:
[/COLOR]<Button Content="Drain" Height="38" HorizontalAlignment="Left" Margin="350,312,0,0" Name="Drain01" VerticalAlignment="Top" Width="114" Click="Command_Drain01" />[COLOR=#333333]

Ludvig
 

Larry Laffer

Supermoderator
Teammitglied
Beiträge
13.084
Punkte Reaktionen
2.717
Hi,
I have no experience with WPF, but I think, that you use the Button-Event "Click" to start the procedure. "Click" is only raised in the time and also only one time. Not whole the time you are using the Button.
I suggest you to use the Event "MouseHover". This event is raised the whole time the Mouse is over the Button.

But I prefer to use "MouseDown" as Event from the Button to set the Bit and the Event "MouseUp" to reset it.
I think, that will be the best way ...

Greetings
Larry
 
Zuletzt bearbeitet:
Oben