Click here to Skip to main content
14,638,959 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am working on project which is on WPF and c# . how can i use this software in touch screen , i.e without using mouse.
Please anyone help me
Updated 20-Nov-18 17:33pm
Rate this:
Please Sign up or sign in to vote.

Solution 1

mouse click & touch are same

touch is simply do work of mouse but it is just more friendly.

use mouse click events for create touch-screen applications
and you required touch-screen device(monitor) as input device else attach mouse if you do not have touch-screen device.

Happy Coding!
ranjith m amin 21-Sep-12 0:52am
But my application work with mouse click and not recognizing touch.
Touch screen is working properly with other inbuilt application.
Aarti Meswania 21-Sep-12 0:59am
make sure button is pressed properly while touch
refer this link

if you have write something on click event of,
e.g. button -> messagebox 'button clicked'
then while touch this button, click event will fire and it will show that messagebox 'button clicked'
ranjith m amin 22-Sep-12 4:47am
My application has piece of image, which need to be selected and moved by touch.If i select the piece by mouse, then i can move piece by touch But want touch to select and move the piece. Button click event is not working by touch, with mouse it is working properly.
ranjith m amin 22-Sep-12 4:53am
It is not an mobile application. My application is for computer with windows os.

Rate this:
Please Sign up or sign in to vote.

Solution 2

In WPF mouse and touch events are different.

Touch events we need take care separately with the help of predefined events in WPF.
here I want to put one example :
Normal Screen : 'Click' event will work for button
Touch Screen : 'PreviewTouchUp' event will fire for button

Like button other WPF controls has specific touch events,so we need to take care based our requirements.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100