<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Two birds, one stone [Silverlight/WPF Data Visualization Development Release 2 and DataVisualizationDemos update]</title><link>http://blogs.msdn.com/b/delay/archive/2009/10/21/two-birds-one-stone-silverlight-wpf-data-visualization-development-release-2-and-datavisualizationdemos-update.aspx</link><description>The October 2009 release of the Silverlight Toolkit came out on Monday and the Data Visualization assembly includes some nice updates. I discussed the details of the new release then and promised to revise my samples to run on the new bits. While I anticipated</description><dc:language>en</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Two birds, one stone [Silverlight/WPF Data Visualization Development Release 2 and DataVisualizationDemos update]</title><link>http://blogs.msdn.com/b/delay/archive/2009/10/21/two-birds-one-stone-silverlight-wpf-data-visualization-development-release-2-and-datavisualizationdemos-update.aspx#9918082</link><pubDate>Thu, 05 Nov 2009 17:21:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918082</guid><dc:creator>David Anson</dc:creator><description>&lt;p&gt;aaadrian,&lt;/p&gt;
&lt;p&gt;TabControl/TabItem aren't sealed, so the first (easy) version of the trick works fine for me. I just created a new solution which shares MainPage.xaml across Silverlight and WPF. Here's the code.&lt;/p&gt;
&lt;p&gt;MainPage.xaml (shared):&lt;/p&gt;
&lt;p&gt;&amp;lt;UserControl x:Class=&amp;quot;XamlSharedTabControlSL.MainPage&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;xmlns=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;xmlns:x=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;"&gt;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;xmlns:controls=&amp;quot;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;xmlns:local=&amp;quot;clr-namespace:XamlSharedTabControlSL&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Grid&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;local:TabControl&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;local:TabItem Header=&amp;quot;Header 1&amp;quot; Content=&amp;quot;Item 1&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;local:TabItem Header=&amp;quot;Header 2&amp;quot; Content=&amp;quot;Item 2&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/local:TabControl&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Grid&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/UserControl&amp;gt;&lt;/p&gt;
&lt;p&gt;MainPage.xaml.cs (shared):&lt;/p&gt;
&lt;p&gt;using System.Windows.Controls;&lt;/p&gt;
&lt;p&gt;namespace XamlSharedTabControlSL&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public partial class MainPage : UserControl&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public MainPage()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;InitializeComponent();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public class TabControl : System.Windows.Controls.TabControl&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public class TabItem : System.Windows.Controls.TabItem&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Window1.xaml (WPF):&lt;/p&gt;
&lt;p&gt;&amp;lt;Window x:Class=&amp;quot;XamlSharedTabControlWPF.Window1&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;xmlns=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;xmlns:x=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;"&gt;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;xmlns:local=&amp;quot;clr-namespace:XamlSharedTabControlSL&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;Grid&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;local:MainPage/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/Grid&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/Window&amp;gt;&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918082" width="1" height="1"&gt;</description></item><item><title>re: Two birds, one stone [Silverlight/WPF Data Visualization Development Release 2 and DataVisualizationDemos update]</title><link>http://blogs.msdn.com/b/delay/archive/2009/10/21/two-birds-one-stone-silverlight-wpf-data-visualization-development-release-2-and-datavisualizationdemos-update.aspx#9917786</link><pubDate>Thu, 05 Nov 2009 07:24:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9917786</guid><dc:creator>aaadrian</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The above trick for sharing XAML across both platforms won't work for TabControl. Do you know of any way around this? It would be very useful.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;aaadrian&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9917786" width="1" height="1"&gt;</description></item></channel></rss>