<?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>JAPF &#187; controls</title>
	<atom:link href="http://www.japf.fr/tag/controls/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.japf.fr</link>
	<description>Jeremy Alles Presentation Foundation: WPF, .Net and modern software development</description>
	<lastBuildDate>Thu, 29 Jul 2010 07:29:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Introducing the ContentSlider control</title>
		<link>http://www.japf.fr/2008/07/introducing-the-contentslider-control/</link>
		<comments>http://www.japf.fr/2008/07/introducing-the-contentslider-control/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 07:05:57 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[controls]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://www.japf.fr/?p=18</guid>
		<description><![CDATA[In my very first article, I wrote an article about an implementation of a solution allowing to use transition (using a sliding effect) between views in a WPF application. As a reminder, here when I talk about &#8220;views&#8221; I mean a screen of the application. One of this screen could be used as a login [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.japf.fr/?p=8">my very first article</a>, I wrote an article about an implementation of a solution allowing to use transition (using a sliding effect) between views in a WPF application.</p>
<p>As a reminder, here when I talk about &#8220;views&#8221; I mean a screen of the application. One of this screen could be used as a login screen, the other one to setup parameters, etc.</p>
<p>In this article, I introduce a CustomControl that I build in order to re-use the implementation I described in an easy way. Basically, using this control, you can write something like:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p18code2'); return false;">View Code</a> XML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p182"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p18code2"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;control:ContentSlider<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #808080; font-style: italic;">&lt;!-- here is the content --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/control:ContentSlider<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>All the specific stuff related to the transition (the animation, the use of a VisualBrush&#8230;) is handled INSIDE the control so that it is completely transparent to use.</p>
<p>From C# code point of view, you&#8217;ll need to use 3 functions:</p>
<ul>
<li>PrepareSlide()</li>
<li>SlideToLeft()</li>
<li>SlideToRight()</li>
</ul>
<p>The first one (PrepareSlide) must be called right before changing the content of the view. It will create a &#8220;snapshot&#8221; of the view so that it will become possible to animate it.</p>
<p>The next two one should be called to slide the content to the left (or to the right).</p>
<p>I hope you&#8217;ll enjoy it. <a href="http://www.japf.fr/download/japf_fr_contentslider.zip">Here is a solution</a> containing the control with example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.japf.fr/2008/07/introducing-the-contentslider-control/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
