<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tony Williams &#187; Touch</title>
	<atom:link href="http://blog.tonywilliams.me.uk/tag/touch/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tonywilliams.me.uk</link>
	<description></description>
	<lastBuildDate>Tue, 10 Jan 2012 12:31:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Working with Touch (in .Net 4.0)</title>
		<link>http://blog.tonywilliams.me.uk/working-with-touch-in-net-4-0/</link>
		<comments>http://blog.tonywilliams.me.uk/working-with-touch-in-net-4-0/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 16:42:04 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[.Net 4]]></category>
		<category><![CDATA[Touch]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPF 4]]></category>

		<guid isPermaLink="false">http://blog.tonywilliams.me.uk/?p=9</guid>
		<description><![CDATA[Some tips on Touch in .Net 4]]></description>
			<content:encoded><![CDATA[<div>
<p>Extracted from: <a href="http://random.tonywilliams.me.uk/post/745164436/working-with-touch-in-net-4-0">http://random.tonywilliams.me.uk/post/745164436/working-with-touch-in-net-4-0</a></p>
<p>For the past several months I&#8217;ve been hammering away at the <a href="http://graphic.ly/win7/setup.exe">touch app</a> for <a href="http://graphic.ly/">Graphic.ly</a> and I&#8217;ve picked up a few hints and tricks along the way.</p>
<p><strong>The first tip</strong> is to get a decent touch monitor or at least a touch machine that you can develop on. I&#8217;m using the <a href="http://accessories.us.dell.com/sna/productdetail.aspx?c=us&amp;l=en&amp;cs=19&amp;sku=320-1172">Dell SX2210T</a> monitor and couldn&#8217;t be happier; within seconds you&#8217;re ready to do some touch magic!</p>
<p><strong>My second tip</strong> is to use the <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=801907a7-b2dd-4e63-9ff3-8a2e63932a74">Surface Toolkit from Microsoft</a>. This however will limit your app to Windows 7 only where as if you choose to go with other libraries for touch your apps may work in older versions but just not respond to touch.</p>
<p>If you plan to go with this library (and I recommend you do) there here are some helpful links:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ee957351.aspx">MSDN</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/toolkit_mref_reference_home(Surface.15).aspx">API</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/microsoft.surface.presentation.controls.aspx">Controls</a></li>
</ul>
<p>As you can see from the Controls link there are a number of controls to play with; the two that are mainly used in the Graphic.ly app are the <a href="http://msdn.microsoft.com/en-us/library/microsoft.surface.presentation.controls.surfacewindow.aspx">SurfaceWindow </a>and<a href="http://msdn.microsoft.com/en-us/library/microsoft.surface.presentation.controls.surfacescrollviewer.aspx">SurfaceScrollViewer</a>.</p>
<p>The <em>SurfaceWindow </em>provides UI responses to touch via the <a href="http://msdn.microsoft.com/en-us/library/ee957338.aspx">Touch Visualizations</a> as well as display on a touch monitor in a multi-monitor setup.</p>
<p>The <em>SurfaceScrollViewer </em>simply adds alot of touch magic to the <em>ScrollViewer</em>; anywhere you could use a ScrollViewer then use the <em>SurfaceScrollViewer</em>. There is not much to do in terms of quickly getting touch on your app when you use the control from the toolkit library. In the Graphic.ly app the Store, Collection and Activity Stream are all examples of the <em>SurfaceScrollViewer </em>in action.</p>
<p>The problem I&#8217;m having with the <em>SurfaceScrollViewer </em>is having them nested; if you checkout the Store/Collection you&#8217;ll see I have rows of SurfaceScrollViewers. Swiping back and forth works fine but I just cannot get it to work up and down. Seems to be the child <em>SurfaceScrollViewer </em>handles all the touch events and won&#8217;t pass it along, does this mean nested <em>SufaceScrollViewers </em>will never work? Nope, this just means another touch challenge to conquer <img src='http://blog.tonywilliams.me.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>My 3rd and final tip</strong> (for the moment) is this</p>
<p>&#8220;e.Cancel();&#8221;</p>
<p>If you have hooked up some <em>TouchEvents </em>AND some <em>ManipulationEvents </em>then you&#8217;ll know that the ManipulationEvents prevents the TouchEvents from firing; in other words you can swipe but not press. In the &#8220;<em>ManipulationCompleted</em>&#8221; event I check to see if the change is small enough to consider it not a swipe; &#8220;e.Cancel()&#8221; will cancel this event and let the <em>TouchEvents </em>bubble through.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.tonywilliams.me.uk/working-with-touch-in-net-4-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

