<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Xamarin Forms on DVLUP</title><link>/en/tags/xamarin-forms/</link><description>Recent content in Xamarin Forms on DVLUP</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 13 Feb 2020 00:00:00 +0000</lastBuildDate><atom:link href="/en/tags/xamarin-forms/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Windows IoT, SignalR, Azure Custom Vision and Xamarin Forms to Flush a Toilet</title><link>/en/blog/2020.02.13-using-windows-iot-signalr-azure-custom-vision-and-xamarin-forms-to-flush-a-toilet/</link><pubDate>Thu, 13 Feb 2020 00:00:00 +0000</pubDate><guid>/en/blog/2020.02.13-using-windows-iot-signalr-azure-custom-vision-and-xamarin-forms-to-flush-a-toilet/</guid><description>&lt;p&gt;&lt;strong&gt;My cat uses the human toilet&lt;/strong&gt;. However, he doesn&amp;rsquo;t know how to flush when he&amp;rsquo;s done. So, I thought, &amp;ldquo;Why not train a custom trained machine learning model to know when to flush the toilet for him? That way, I can go on vacation without asking friends to stop by.&amp;rdquo;&lt;/p&gt;&#10;&lt;p&gt;That single thought began my trip through some great modern developer tools and tech to build a full solution for the problem. In this post, I&amp;rsquo;ll walk you through everything and you can explore the code and parts list here &lt;a href="https://github.com/LanceMcCarthy/Flusher" target="_blank" rel="noopener"&gt;https://github.com/LanceMcCarthy/Flusher&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>Custom TypingStarted and TypingEnded Events</title><link>/en/blog/2020.01.02-custom-typingstarted-and-typingended-events/</link><pubDate>Thu, 02 Jan 2020 00:00:00 +0000</pubDate><guid>/en/blog/2020.01.02-custom-typingstarted-and-typingended-events/</guid><description>&lt;p&gt;You know that little indicator in a chat that shows if someone is currently typing? I am working on a new post (coming soon, link will be here) that uses SignalR to communicate who is currently typing in a chat room along with the messages themselves.&lt;/p&gt;&#10;&lt;p&gt;To determine who is typing, I use a timer and the &lt;code&gt;TextChanged&lt;/code&gt; event. The timer logic itself is straightforward, in the &lt;code&gt;TextChanged&lt;/code&gt; event starts a timer.&lt;/p&gt;</description></item><item><title>Draw Your Own Xamarin Pie Chart dynamically</title><link>/en/blog/2019.04.18-draw-your-own-pie-chart-dynamically/</link><pubDate>Thu, 18 Apr 2019 00:00:00 +0000</pubDate><guid>/en/blog/2019.04.18-draw-your-own-pie-chart-dynamically/</guid><description>&lt;p&gt;In this tutorial, I&amp;rsquo;ll show you how to draw your own pie chart just using lines and a list of data items. The code itself is in C#, but the concept can be used on any platform that has a drawing library and ArcSegments.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="../../../en/blog/2019.04.18-draw-your-own-pie-chart-dynamically/2019-04-18_13-44-40.png" alt=""&gt;&lt;/p&gt;&#10;&lt;p&gt;You can view the entire solution in &lt;a href="https://gist.github.com/LanceMcCarthy/b64ee5afdd27b125b8b47816799306e0" target="_blank" rel="noopener"&gt;this GitHub Gist&lt;/a&gt;&#10;. Okay, let&amp;rsquo;s get started!&lt;/p&gt;&#10;&lt;h2 id="setting-up"&gt;Setting Up&lt;/h2&gt;&#10;&lt;p&gt;The first thing you&amp;rsquo;ll need to understand is how the platform&amp;rsquo;s drawing library makes arcs. In this code, I&amp;rsquo;ll be using &lt;a href="https://docs.telerik.com/devtools/xamarin/controls/path/path-overview" target="_blank" rel="noopener"&gt;RadPath&lt;/a&gt;&#10; from &lt;a href="https://www.telerik.com/xamarin-ui" target="_blank" rel="noopener"&gt;Telerik UI for Xamarin&lt;/a&gt;&#10; most libraries work the same way. RadPath lets you use a custom Geometry which has &lt;a href="https://docs.telerik.com/devtools/xamarin/controls/path/getting-started/geometry-structure#radarcsegment" target="_blank" rel="noopener"&gt;RadArcSegment&lt;/a&gt;&#10; object, which has helpful &lt;strong&gt;StartAngle&lt;/strong&gt; and &lt;strong&gt;SweepAngle&lt;/strong&gt; properties.&lt;/p&gt;</description></item><item><title>Error XF001: Xamarin.Forms targets have been imported multiple times</title><link>/en/blog/2018.10.01-error-xf001-xamarin-forms-targets-have-been-imported-multiple-times/</link><pubDate>Mon, 01 Oct 2018 00:00:00 +0000</pubDate><guid>/en/blog/2018.10.01-error-xf001-xamarin-forms-targets-have-been-imported-multiple-times/</guid><description>&lt;p&gt;If you&amp;rsquo;re in the process of updating a Xamarin.Forms app to a more modern style project set up (NET Standard 2.0, PackageReference, etc), you may get the following error.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Error XF001: Xamarin.Forms targets have been imported multiple times. Please check your project file and remove the duplicate import(s).&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;This can be because of the move to using PackageReference for your NuGet packages and a simple fix awaits you.&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Close Visual Studio and navigate to the Solution in File Explorer&lt;/li&gt;&#10;&lt;li&gt;Delete the hidden &lt;strong&gt;.vs&lt;/strong&gt; folder&lt;/li&gt;&#10;&lt;li&gt;Go into each affected project sub folder and delete the following files; &lt;strong&gt;project_name.nuget.props&lt;/strong&gt; and &lt;strong&gt;project_name.nuget.targets&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;Open the solution in Visual Studio, do a Clean and Rebuild, &lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt; &lt;/p&gt;</description></item><item><title>Migrating from PCLStorage to .NET Standard 2.0</title><link>/en/blog/2018.04.19-migrating-from-pclstorage-to-net-standard-2-0/</link><pubDate>Thu, 19 Apr 2018 00:00:00 +0000</pubDate><guid>/en/blog/2018.04.19-migrating-from-pclstorage-to-net-standard-2-0/</guid><description>&lt;p&gt;If you&amp;rsquo;re a Xamarin Forms developer, you&amp;rsquo;ve likely used &lt;a href="https://github.com/dsplaisted/PCLStorage" target="_blank" rel="noopener"&gt;PCLStorage&lt;/a&gt;&#10; (or other Dependency Service) to interact with the target platform&amp;rsquo;s file system in the portable class library&amp;rsquo;s code. However, since November 2017, Xamarin.Forms now uses a .NET Standard 2.0 class library and PCLStorage is no longer supported.&lt;/p&gt;&#10;&lt;h2 id="systemiofile"&gt;System.IO.File&lt;/h2&gt;&#10;&lt;p&gt;This isn&amp;rsquo;t a problem because in .NET Core 2.0 you now have access to System.IO.File&amp;rsquo;s GetFolderPath and SpecialFolder methods (see &lt;a href="https://docs.microsoft.com/en-us/dotnet/api/system.io.file?view=netcore-2.0" target="_blank" rel="noopener"&gt;System.IO.File in .NET Core 2.0 docs&lt;/a&gt;&#10;).&lt;/p&gt;</description></item></channel></rss>