<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>XAML on Ash Tewari</title><link>https://www.tewari.info/category/xaml/</link><description>Recent content in XAML on Ash Tewari</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Sat, 23 May 2020 02:57:40 +0000</lastBuildDate><atom:link href="https://www.tewari.info/category/xaml/feed.xml" rel="self" type="application/rss+xml"/><item><title>Universal Windows Platform Application on Raspberry Pi</title><link>https://www.tewari.info/2020/05/22/universal-windows-platform-application-on-raspberry-pi/</link><pubDate>Sat, 23 May 2020 02:57:40 +0000</pubDate><guid>https://www.tewari.info/2020/05/22/universal-windows-platform-application-on-raspberry-pi/</guid><description>&lt;p&gt;Universal Windows Platform (UWP) provides a common app platform on every device that runs Windows 10. The core APIs in UWP are the same on all Windows devices – including Desktop PC, Mobile Phone, XBox, Hololens, IOT devices and &lt;a class="link" href="https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide" target="_blank" rel="noopener"&#10; &gt;others&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;You can target specific device capabilities of a device family with &lt;a class="link" href="https://docs.microsoft.com/en-us/uwp/extension-sdks/device-families-overview#extension-sdks" target="_blank" rel="noopener"&#10; &gt;extension SDKs&lt;/a&gt;, but you don&amp;rsquo;t have to do that if you are only using core APIs. Those core APIs include a very &lt;a class="link" href="https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/" target="_blank" rel="noopener"&#10; &gt;impressive&lt;/a&gt; set of UI capabilities. What that means is that you can create a UWP application using C# and XAML which will run on an ARM based processor on Raspberry Pi – because &lt;a class="link" href="https://docs.microsoft.com/en-us/windows/iot-core/develop-your-app/buildingappsforiotcore" target="_blank" rel="noopener"&#10; &gt;Windows 10 IOT Core&lt;/a&gt; runs on that.&lt;/p&gt;&#10;&lt;p&gt;Universal Windows Platform (&lt;a class="link" href="https://docs.microsoft.com/en-us/windows/apps/desktop/choose-your-platform" target="_blank" rel="noopener"&#10; &gt;UWP&lt;/a&gt;) has come &lt;a class="link" href="https://www.tewari.info/2014/11/12/universal-apps/" &gt;a long way&lt;/a&gt;. I decided to dust off my good old Raspberry Pi 2B and take it for a spin last weekend.&lt;/p&gt;&#10;&lt;p&gt;The goal was simply to create a Hello World UWP application, deploy it on Windows 10 IOT running on Raspberry Pi (RPi), without using any device specific extension SDKs. Here is the stack -&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide" target="_blank" rel="noopener"&#10; &gt;Universal Windows Platform App&lt;/a&gt; (C#/XAML)&lt;/li&gt;&#10;&lt;li&gt;Raspberry Pi &lt;a class="link" href="https://www.raspberrypi.org/products/raspberry-pi-2-model-b/" target="_blank" rel="noopener"&#10; &gt;Model 2B&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/windows/iot-core/windows-iot-core" target="_blank" rel="noopener"&#10; &gt;Windows 10 IOT Core&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="https://www.syncfusion.com/uwp-ui-controls" target="_blank" rel="noopener"&#10; &gt;Syncfusion Essential Studio&lt;/a&gt; &lt;a class="link" href="https://help.syncfusion.com/common/essential-studio/release-notes/v18.1.0.42" target="_blank" rel="noopener"&#10; &gt;18.1.0.42&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="https://visualstudio.microsoft.com/" target="_blank" rel="noopener"&#10; &gt;Visual Studio&lt;/a&gt; 2019&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/windows/uwp/get-started/create-a-hello-world-app-xaml-universal" target="_blank" rel="noopener"&#10; &gt;Create&lt;/a&gt; a simple UWP application in Visual Studio 2019.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image.png"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;&lt;a class="link" href="https://docs.microsoft.com/en-us/windows/iot-core/tutorials/rpi" target="_blank" rel="noopener"&#10; &gt;Install&lt;/a&gt; Windows 10 IOT Core on Raspberry Pi 2B and connect the device to a 50&amp;quot; screen TV.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image-5.png"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/Rpi2BOnTV.jpg"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;Select ARM in the target platform drop down and Click on Remote Machine to Run/Debug Application on RPi device.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image-1.png"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;Select RPi device for deployment.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image-2.png"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;Deployment of UWP on RPi is complete.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image-3.png"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;UWP application running on RPi.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image.jpeg"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;I updated the UWP application to include &lt;a class="link" href="https://help.syncfusion.com/uwp/charts/getting-started?cs-save-lang=1&amp;amp;cs-lang=csharp" target="_blank" rel="noopener"&#10; &gt;Syncfusion Chart&lt;/a&gt; control. Did you know that you can get a &lt;a class="link" href="https://www.syncfusion.com/products/communitylicense" target="_blank" rel="noopener"&#10; &gt;Community License&lt;/a&gt; for the entire product line (including Blazor, Xamarin and UWP controls) from Syncfusion?&lt;/p&gt;&#10;&lt;p&gt;UWP application is now running on RPi, attached to the Visual Studio debugger running on the development machine (Windows Surface).&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image-1.jpeg"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;No device specific extension SDKs were referenced, just the core UWP APIs were used.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/image-6.png"&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;Code is on &lt;a class="link" href="https://github.com/ashtewari/CoronaViewer/blob/master/CoronaViewer/MainPage.xaml.cs" target="_blank" rel="noopener"&#10; &gt;github&lt;/a&gt;.&lt;/p&gt;&#10;</description></item><item><title>Announcing CodeDemo</title><link>https://www.tewari.info/2014/03/09/announcing-codedemo/</link><pubDate>Mon, 10 Mar 2014 01:58:22 +0000</pubDate><guid>https://www.tewari.info/2014/03/09/announcing-codedemo/</guid><description>&lt;p&gt;It is a challenge to use code snippets in presentations, demos and live coding sessions. I have struggled with this and seen many speakers jumping through hoops to assimilate code snippets in their demos. I had to create something to ease this pain.&lt;/p&gt;&#10;&lt;p&gt;Today, I am announcing the general availability of &lt;a class="link" href="http://codedemo.net/" title="CodeDemo website"&#10; target="_blank" rel="noopener"&#10; &gt;CodeDemo&lt;/a&gt;. A tool for instructors, presenters and speakers who create instructional demos, record screen-casts or do live presentations. CodeDemo pastes code snippets into your favorite IDE without getting in your way.&lt;/p&gt;&#10;&lt;p&gt;I decided not to open-source CodeDemo to challenge myself to an exercise in commercialization. I decided to learn about entrepreneurship, marketing, sales, licensing and other aspects of software commercialization. It has been an MBA&amp;rsquo;s worth of education so far. This journey is not over yet. I am taking the &lt;a class="link" href="http://theleanstartup.com/principles" title="The Lean Startup"&#10; target="_blank" rel="noopener"&#10; &gt;Lean&lt;/a&gt; approach of creating a &lt;a class="link" href="http://en.wikipedia.org/wiki/Minimum_viable_product" title="minimum viable product"&#10; target="_blank" rel="noopener"&#10; &gt;Minimum Viable Product&lt;/a&gt;. The future of CodeDemo, its feature set and the price, will be shaped by the traction it gets in the market, the feedback from the customers as well as patterns of use reported by the users.&lt;/p&gt;&#10;&lt;p&gt;Head over to &lt;a class="link" href="http://codedemo.net" target="_blank" rel="noopener"&#10; &gt;http://codedemo.net&lt;/a&gt; to grab a copy for yourself. Let me know if find it useful - I will be very excited to hear from you.&lt;/p&gt;&#10;&lt;p&gt;Here is a quick 2 minute introduction to CodeDemo :&lt;/p&gt;&#10;&lt;p&gt;[youtube]aFn3boBAWjw[/youtube]&lt;/p&gt;&#10;</description></item><item><title>Remove ListBoxItem Highlighting</title><link>https://www.tewari.info/2011/04/29/remove-listboxitem-highlighting/</link><pubDate>Sat, 30 Apr 2011 03:25:58 +0000</pubDate><guid>https://www.tewari.info/2011/04/29/remove-listboxitem-highlighting/</guid><description>&lt;p&gt;A Silverlight/Wpf ListBoxItem is highlighted when selected or when the mouse hovers over it.&lt;/p&gt;&#10;&lt;p&gt;I need to display a list of items that are not highlighted when selected. This is a common scenario when displaying an inactive list for simply listing out some information.&lt;/p&gt;&#10;&lt;p&gt;ListBoxItem&amp;rsquo;s default template can be easily inspected and modified using Expression Blend - Select a ListBoxItem in Objects and Timeline pane, Right click and select Edit template &amp;gt; Edit a Copy. Name you template and save it at the scope of your choice.&lt;/p&gt;&#10;&lt;p&gt;This will create a copy of the template and allow you to modify it. Switch to the xaml view. Locate the VisualStates of MouseOver, Selected and Focused, and blank them out -&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="de-highlighted-xaml" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tewari.info/wp-content/2011-04-29_2257.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;The style is applied to the ListBoxItems using ItemContainerStyle -&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="applying-style-to-listboxitems" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tewari.info/wp-content/2011-04-29_2307.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;Here is the xaml style for the ListBoxItem -&lt;/p&gt;&#10;&lt;p&gt;After the style is applied, the ListBoxItems are not highlighted when selected or focused. Here is a live demo of a ListBox that does not highlight when items are selected : &lt;a class="link" href="https://www.tewari.info/remove-listboxitem-highlighting-demo/" &gt;remove-listboxitem-hlighting-demo&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>Using Model-View-ViewModel in WPF Applications</title><link>https://www.tewari.info/2010/01/25/using-model-view-viewmodel-in-wpf-applications/</link><pubDate>Mon, 25 Jan 2010 22:23:39 +0000</pubDate><guid>https://www.tewari.info/2010/01/25/using-model-view-viewmodel-in-wpf-applications/</guid><description>&lt;p&gt;I am presenting at &lt;a class="link" href="http://www.socalcodecamp.com/" title="socalcodecamp website"&#10; target="_blank" rel="noopener"&#10; &gt;SoCalCodeCamp&lt;/a&gt; this weekend (January 30th, 2010) - &lt;a class="link" href="http://www.socalcodecamp.com/socalcodecamp/session.aspx?sid=0b2ee44f-595d-4f55-a5d6-2b1293f546d0" title="WPF MVVM Presntation "&#10; target="_blank" rel="noopener"&#10; &gt;Advanced WPF - Using Model-View-ViewModel in WPF Applications&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.tewari.info/wp-content/tasklist.png"&#10;&#9;&#9;&#9;alt="tasklist-mockup"&gt;&lt;figcaption&gt;&#10;&#9;&#9;&#9;&lt;p&gt;tasklist-mockup&lt;/p&gt;&#10;&#9;&#9;&lt;/figcaption&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;Agenda :&lt;/p&gt;&#10;&lt;p&gt;1. Roles of the M-V-VM triad&lt;/p&gt;&#10;&lt;p&gt;2. Why use M-V-VM ?&lt;/p&gt;&#10;&lt;p&gt;3. Characteristics of the ViewModel&lt;/p&gt;&#10;&lt;p&gt;4. Build a Sample WPF Application using M-V-VM&lt;/p&gt;&#10;&lt;p&gt;Resources :&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/dd419663.aspx" title="MSDN Magazine Article"&#10; target="_blank" rel="noopener"&#10; &gt;MSDN Magazine Article&lt;/a&gt; and Sample Application &lt;a class="link" href="http://code.msdn.microsoft.com/mag200902MVVM/Release/ProjectReleases.aspx" title="Download Demo Application Code"&#10; target="_blank" rel="noopener"&#10; &gt;Download&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="http://martinfowler.com/eaaDev/PresentationModel.html" title="MartinFowler.com"&#10; target="_blank" rel="noopener"&#10; &gt;Martin Fowler’s description of the ‘Presentation Model ‘&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="http://codebetter.com/blogs/jeremy.miller/archive/2007/07/25/the-build-your-own-cab-series-table-of-contents.aspx" title="Jeremy Miller&amp;#39;s - Build Your CAB"&#10; target="_blank" rel="noopener"&#10; &gt;Jeremy Miller’s ‘Build Your Own CAB’ series&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;</description></item><item><title>Dial Gauge is a ProgressBar</title><link>https://www.tewari.info/2008/06/10/dial-gauge-is-a-progressbar/</link><pubDate>Wed, 11 Jun 2008 06:49:43 +0000</pubDate><guid>https://www.tewari.info/2008/06/10/dial-gauge-is-a-progressbar/</guid><description>&lt;p&gt;I am not just being philosophical here. In &lt;a class="link" href="http://msdn.microsoft.com/en-us/netframework/aa663326.aspx" title="MSDN-WPF"&#10; target="_blank" rel="noopener"&#10; &gt;WPF&lt;/a&gt;, &lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc163497.aspx" title="Using Templates to Customize WPF Controls"&#10; target="_blank" rel="noopener"&#10; &gt;ControlTemplates&lt;/a&gt; allow you to transform a control&amp;rsquo;s appearance. This is not the same as applying stylesheets. This is an entirely new level of customization. What you see in the screenshot below looks like a Dial but is actually a simple ProgressBar control wearing a &amp;ldquo;Dial&amp;rdquo; template. The Dial template was created using &lt;a class="link" href="http://www.microsoft.com/expression/products/Overview.aspx?key=blend" title="Microsoft-Expression-Blend"&#10; target="_blank" rel="noopener"&#10; &gt;Microsoft Expression Blend&lt;/a&gt; .&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="dial-is-a-progressbar.PNG" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.tewari.info/images/dial-is-a-progressbar.PNG"&gt;&lt;/p&gt;&#10;&lt;p&gt;Include the ControlTemplate as a Window.Resource and then assign it to ProgressBar element&amp;rsquo;s Template attribute :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Of course that is not all. The ControlTemplate must define some named elements of FrameworkElement type. Charles Petzold has explained it in detail : &lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc163497.aspx" title="Charles-Petzold-Using Templates to Customize WPF Controls"&#10; target="_blank" rel="noopener"&#10; &gt;MSDN Magazine Article&lt;/a&gt;. So, I will not repeat it here.&lt;/p&gt;&#10;&lt;p&gt;The sample code can be downloaded here : &lt;a class="link" href="https://www.tewari.info/downloads/DialTest.zip" title="DialTest.zip"&#10; &gt;DialTest.zip&lt;/a&gt;&#10;License : &lt;a class="link" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" target="_blank" rel="noopener"&#10; &gt;Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>Using Custom Converter in XAML</title><link>https://www.tewari.info/2008/04/15/using-custom-converter-in-xaml/</link><pubDate>Wed, 16 Apr 2008 05:22:12 +0000</pubDate><guid>https://www.tewari.info/2008/04/15/using-custom-converter-in-xaml/</guid><description>&lt;p&gt;In my previous post : &lt;a class="link" href="https://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/" title="wpf-linq-to-sql-sample"&#10; &gt;WPF-LINQ To SQL Sample&lt;/a&gt;, I had to resort to modifying .dbml file to get the images stored as varbinary into the WPF ListView control. I had to change the Type of image fields to System.Byte[], instead of using System.Data.Linq.Binary. A better way to do this is to use a custom converter. WPF allows you to specify custom converter as part of the Binding in .xaml, like this -&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;Image Grid.Row=&amp;#34;2&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Source=&amp;#34;{Binding Path=ThumbNailPhoto ,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Converter={StaticResource imageConverter}}&amp;#34;&amp;gt;&amp;lt;/Image&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The custom converter is declared in the same .xaml file as a resource -&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;Window.Resources&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;local:ImageDataConverter x:Key=&amp;#34;imageConverter&amp;#34; /&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;/Window.Resources&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;ImageDataConverter is implemented in .xaml.cs file -&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;public class ImageDataConverter : IValueConverter&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; public object Convert(object value, Type targetType, object parameter,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; System.Globalization.CultureInfo culture)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; byte[] image = ((System.Data.Linq.Binary)value).ToArray();&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; return image;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; public object ConvertBack(object value, Type targetType, object parameter,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; System.Globalization.CultureInfo culture)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; throw new NotSupportedException();&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The updated sample code can be downloaded here : &lt;a class="link" href="https://www.tewari.info/downloads/Linq2SqlSample2.zip" title="Linq2SqlSample2.zip"&#10; &gt;WPF-LINQ to SQL Sample&lt;/a&gt;&#10;License : &lt;a class="link" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" target="_blank" rel="noopener"&#10; &gt;Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.&lt;/a&gt;&lt;/p&gt;&#10;</description></item></channel></rss>