<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: ItemsControl:  &#039;N&#039; is for Natural User Interface</title>
	<atom:link href="http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/</link>
	<description>Drinking (and serving) the WPF Kool-Aid since 2002</description>
	<lastBuildDate>Mon, 30 Aug 2010 18:54:01 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-1430</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Thu, 06 May 2010 21:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-1430</guid>
		<description>Hi Laurent,

You would need to look at the drag vector (the vector between the points in each drag delta) and determine whether the user is trying to scroll the panel (drag in the scrolling direction) or move an item out of it (drag in the non-scrolling direction).  In the case that its not a scroll gesture, you might want to release mouse capture and fire an event with the item being dragged.  In your app, you can handle that event by grabbing capture from another element.  You can then use an adorner to render the item being dragged until it is released.  I&#039;ve used this exact approach and it works quite well.

Honestly, drag &amp; drop code is probably too involved to try to explain well in a comment here, but hopefully you get the gist.  I don&#039;t currently have the bandwidth to put together a sample, but I&#039;ll add it to my huge list of potential future posts.  :S

Cheers,
-dw</description>
		<content:encoded><![CDATA[<p>Hi Laurent,</p>
<p>You would need to look at the drag vector (the vector between the points in each drag delta) and determine whether the user is trying to scroll the panel (drag in the scrolling direction) or move an item out of it (drag in the non-scrolling direction).  In the case that its not a scroll gesture, you might want to release mouse capture and fire an event with the item being dragged.  In your app, you can handle that event by grabbing capture from another element.  You can then use an adorner to render the item being dragged until it is released.  I&#8217;ve used this exact approach and it works quite well.</p>
<p>Honestly, drag &#038; drop code is probably too involved to try to explain well in a comment here, but hopefully you get the gist.  I don&#8217;t currently have the bandwidth to put together a sample, but I&#8217;ll add it to my huge list of potential future posts.  :S</p>
<p>Cheers,<br />
-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent H</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-925</link>
		<dc:creator>Laurent H</dc:creator>
		<pubDate>Thu, 06 May 2010 08:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-925</guid>
		<description>Hi Doc,

First of all, thank you so much for this great article which spared me a looot of time at work and allowed me to understand many things about WPF.

However, I was wondering how I could implement drag&amp;drop operations on the looping listbox, while keeping the already implemented and working drag events ?

I.E, I want to be able to drag&amp;drop the source of my click on the looping list box into another control, while dragging this item will still continue to scroll the listbox.

Many many many thanks,
Laurent</description>
		<content:encoded><![CDATA[<p>Hi Doc,</p>
<p>First of all, thank you so much for this great article which spared me a looot of time at work and allowed me to understand many things about WPF.</p>
<p>However, I was wondering how I could implement drag&amp;drop operations on the looping listbox, while keeping the already implemented and working drag events ?</p>
<p>I.E, I want to be able to drag&amp;drop the source of my click on the looping list box into another control, while dragging this item will still continue to scroll the listbox.</p>
<p>Many many many thanks,<br />
Laurent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard McSharry</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-744</link>
		<dc:creator>Richard McSharry</dc:creator>
		<pubDate>Fri, 12 Mar 2010 19:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-744</guid>
		<description>Hey Doc,

This is a truly fantastic article, well laid out, clear, understandable and extremely useful. Thank you so much for the effort you put into it.

I do hope you get those extra hours to add the enhancements...if I had the power to make them I&#039;d definitely be sending some your way!

Thanks again,
Richard</description>
		<content:encoded><![CDATA[<p>Hey Doc,</p>
<p>This is a truly fantastic article, well laid out, clear, understandable and extremely useful. Thank you so much for the effort you put into it.</p>
<p>I do hope you get those extra hours to add the enhancements&#8230;if I had the power to make them I&#8217;d definitely be sending some your way!</p>
<p>Thanks again,<br />
Richard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-630</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Mon, 18 Jan 2010 21:24:08 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-630</guid>
		<description>Doh! Website regression. :(

The updated sample is really available now!  Thanks for the heads up. :)</description>
		<content:encoded><![CDATA[<p>Doh! Website regression. <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>The updated sample is really available now!  Thanks for the heads up. <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shityoucantremember</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-629</link>
		<dc:creator>shityoucantremember</dc:creator>
		<pubDate>Mon, 18 Jan 2010 16:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-629</guid>
		<description>It seems that the zip has not been updated, because I just downloaded the project and still get the password dialog.</description>
		<content:encoded><![CDATA[<p>It seems that the zip has not been updated, because I just downloaded the project and still get the password dialog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-586</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Wed, 06 Jan 2010 20:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-586</guid>
		<description>I absolutely agree with you, David.  I have often done this myself.  The key thing is to document well that your control will modify the render transforms of its children.

Another approach I sometimes advocate (less invasive, but a little more work for the person using your control) is to have the parent control set attached properties on its children (like ChildAngle, ChildScaleX, ChildScaleY, etc).  This creates more of an &quot;opt in&quot; mechanism where the item container can specify its own RenderTransform with child transforms each binding to the attached properties it cares about.

I like both approaches. :)

Cheers,
-dw</description>
		<content:encoded><![CDATA[<p>I absolutely agree with you, David.  I have often done this myself.  The key thing is to document well that your control will modify the render transforms of its children.</p>
<p>Another approach I sometimes advocate (less invasive, but a little more work for the person using your control) is to have the parent control set attached properties on its children (like ChildAngle, ChildScaleX, ChildScaleY, etc).  This creates more of an &#8220;opt in&#8221; mechanism where the item container can specify its own RenderTransform with child transforms each binding to the attached properties it cares about.</p>
<p>I like both approaches. <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers,<br />
-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Turner</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-580</link>
		<dc:creator>David Turner</dc:creator>
		<pubDate>Wed, 06 Jan 2010 10:46:50 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-580</guid>
		<description>You mentioned that you discourage controls from setting their own render transform, which makes perfect sense.  On the other hand don&#039;t you think there is a good argument for a control setting a render transform on (some of) its children?

For example, I have a carousel control which wraps the user-provided ItemTemplate in a ContentPresenter, and sets a render transform on the ContentPresenter to produce a pop-out effect when the mouse is over the item.  Another example is a drawing canvas, which provides pan, zoom and rotate with mouse gestures.  In this case the user control manipulates the render transform of a child canvas, and exposes the items in the canvas indirectly.</description>
		<content:encoded><![CDATA[<p>You mentioned that you discourage controls from setting their own render transform, which makes perfect sense.  On the other hand don&#8217;t you think there is a good argument for a control setting a render transform on (some of) its children?</p>
<p>For example, I have a carousel control which wraps the user-provided ItemTemplate in a ContentPresenter, and sets a render transform on the ContentPresenter to produce a pop-out effect when the mouse is over the item.  Another example is a drawing canvas, which provides pan, zoom and rotate with mouse gestures.  In this case the user control manipulates the render transform of a child canvas, and exposes the items in the canvas indirectly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-497</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Fri, 07 Aug 2009 04:48:58 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-497</guid>
		<description>Absolutely, Ed.  I will increase the priority of posting a sample custom ScrollViewer that supports inertia (and I&#039;ll update the LoopPanel at the same time to support IScrollInfo).  :)</description>
		<content:encoded><![CDATA[<p>Absolutely, Ed.  I will increase the priority of posting a sample custom ScrollViewer that supports inertia (and I&#8217;ll update the LoopPanel at the same time to support IScrollInfo).  <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed Sieja</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-496</link>
		<dc:creator>Ed Sieja</dc:creator>
		<pubDate>Fri, 07 Aug 2009 03:27:10 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-496</guid>
		<description>What about use of inertia for Win7? Win7 touch will be much more common than surface I would think.</description>
		<content:encoded><![CDATA[<p>What about use of inertia for Win7? Win7 touch will be much more common than surface I would think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2009/08/05/itemscontrol-n-is-for-natural-user-interface/comment-page-1/#comment-495</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Fri, 07 Aug 2009 00:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=55#comment-495</guid>
		<description>Yes, Rui! A little physics on the scroll really improves the effect.  I didn&#039;t add it to the sample mainly to keep the code clean, but you get inertia for free with the SurfaceScrollViewer.  That is one of the big reasons I plan to implement the respective IScrollInfo* interfaces.  I also plan to provide a sample custom ScrollViewer for native WPF that supports a more natural physical gesture, like the inertia-based scroll.  Just need a few more hours per day!  :-)</description>
		<content:encoded><![CDATA[<p>Yes, Rui! A little physics on the scroll really improves the effect.  I didn&#8217;t add it to the sample mainly to keep the code clean, but you get inertia for free with the SurfaceScrollViewer.  That is one of the big reasons I plan to implement the respective IScrollInfo* interfaces.  I also plan to provide a sample custom ScrollViewer for native WPF that supports a more natural physical gesture, like the inertia-based scroll.  Just need a few more hours per day!  <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
