<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C# on Ash Tewari</title><link>https://www.tewari.info/tag/c/</link><description>Recent content in C# on Ash Tewari</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Mon, 10 Feb 2025 04:32:25 +0000</lastBuildDate><atom:link href="https://www.tewari.info/tag/c/feed.xml" rel="self" type="application/rss+xml"/><item><title>SPCHR: Speech To Text App for Windows</title><link>https://www.tewari.info/2025/02/09/spchr-speech-to-text-app-for-windows/</link><pubDate>Mon, 10 Feb 2025 04:32:25 +0000</pubDate><guid>https://www.tewari.info/2025/02/09/spchr-speech-to-text-app-for-windows/</guid><description>&lt;p&gt;I&amp;rsquo;m excited to announce the release of SPCHR. Pronounced as &amp;ldquo;speaker&amp;rdquo;. I know, I know. My apologies, it was too late at night and that&amp;rsquo;s the best I could come up with ;)&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;It is a Windows desktop application for speech-to-text transcription.&lt;/li&gt;&#10;&lt;li&gt;You can use it to &amp;ldquo;add&amp;rdquo; voice input to applications that don’t natively support it. It works anywhere you can type or paste text.&lt;/li&gt;&#10;&lt;li&gt;You can use it entirely locally on your PC if you like, so it is private and secure.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="key-features"&gt;Key Features&#10;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Flexible&lt;/strong&gt;: SPCHR can use either Azure Speech Services or a local OpenAI Whisper model, giving you the flexibility to choose between cloud-based and local transcription.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Zero Configuration&lt;/strong&gt;: The application works immediately with local Whisper processing - no account setup required!&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Global Hotkey&lt;/strong&gt;: Start and stop recording from &lt;em&gt;any&lt;/em&gt; application with Ctrl+Alt+L.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Seamless Integration&lt;/strong&gt;: Transcribed text is automatically pasted into your active window.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="getting-started"&gt;Getting Started&#10;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;Clone the repository&lt;/li&gt;&#10;&lt;li&gt;Build the solution using Visual Studio and run it&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Press Ctrl+Alt+L and start speaking&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;Watch as your words appear in your active window&lt;/li&gt;&#10;&lt;li&gt;For those wanting cloud-based transcription, simply add your Azure Speech Services credentials to the configuration file.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="open-source"&gt;Open Source&#10;&lt;/h2&gt;&lt;p&gt;SPCHR is released under the MIT License, and I welcome contributions from the community. Whether you&amp;rsquo;re interested in adding features, fixing bugs, or improving documentation, your help is appreciated.&lt;/p&gt;&#10;&lt;p&gt;Check out &lt;a class="link" href="https://github.com/ashtewari/spchr" target="_blank" rel="noopener"&#10; &gt;GitHub repository&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="whats-next"&gt;What&amp;rsquo;s next&#10;&lt;/h2&gt;&lt;p&gt;This is just the beginning for SPCHR. Several improvements can be done:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Additional language support&lt;/li&gt;&#10;&lt;li&gt;Customizable hotkeys&lt;/li&gt;&#10;&lt;li&gt;Installer&lt;/li&gt;&#10;&lt;li&gt;UI Enhancements&lt;/li&gt;&#10;&lt;li&gt;AI Enhanced Features&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="try-it-out"&gt;Try it out&#10;&lt;/h2&gt;&lt;p&gt;Ready to transform how you interact with your computer? Visit the &lt;a class="link" href="https://github.com/ashtewari/spchr" target="_blank" rel="noopener"&#10; &gt;GitHub repository&lt;/a&gt; to get started with SPCHR today.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m excited to see how you&amp;rsquo;ll use SPCHR in your workflow and look forward to your feedback!&lt;/p&gt;&#10;</description></item><item><title>Does Xamarin have a future?</title><link>https://www.tewari.info/2015/11/07/does-xamarin-have-a-future/</link><pubDate>Sat, 07 Nov 2015 17:33:01 +0000</pubDate><guid>https://www.tewari.info/2015/11/07/does-xamarin-have-a-future/</guid><description>&lt;p&gt;&lt;a class="link" href="https://xamarin.com/" target="_blank" rel="noopener"&#10; &gt;Xamarin&lt;/a&gt;&amp;rsquo;s cross-platform mobile application framework has Xamarin.iOS and Xamarin.Android at its core. Both &lt;a class="link" href="https://en.wikipedia.org/wiki/Xamarin" target="_blank" rel="noopener"&#10; &gt;Xamarin.Android and Xamarin.iOS&lt;/a&gt; are based on Mono. &lt;a class="link" href="https://en.wikipedia.org/wiki/Mono_%28software%29" target="_blank" rel="noopener"&#10; &gt;Mono&lt;/a&gt; is an open source implementation of .NET (&lt;a class="link" href="https://en.wikipedia.org/wiki/Common_Language_Infrastructure" target="_blank" rel="noopener"&#10; &gt;CLI&lt;/a&gt; and CLS). Xamarin&amp;rsquo;s customers are Microsoft (.NET) shops. Microsoft is open sourcing .NET itself. What does all this mean for Xamarin?&lt;/p&gt;&#10;&lt;p&gt;Is Xamarin&amp;rsquo;s competitive advantage going to be undermined by the open source .NET? Microsoft&amp;rsquo;s Universal Application Platform (UAP) and the promise of making .NET applications run on Mac and Linux seems to indicate that Microsoft may be emerging as a threat to Xamarin.&lt;/p&gt;&#10;&lt;p&gt;The formidable Microsoft has perhaps spelled death for Xamarin by standing up a competitor to Mono. If you are a developer getting started with Xamarin or already using Xamarin, should you be worried? After all Xamarin has a significant learning curve. Just because you are proficient with C# and Visual Studio does not mean that learning curve of cross-platform development with Xamarin is insignificant. I have worked with Xamarin platform for more than two years. As you get into Xamarin development, you quickly realize that you need to know and learn quite a lot about the platforms that you are developing for. So, should you put your time and money into Xamarin? Should you (continue to) invest in Xamarin? Does Xamarin have a future?&lt;/p&gt;&#10;&lt;p&gt;Xamarin&amp;rsquo;s core competitive advantage is not in competition with the (.NET Core) class libraries, SDKs and server frameworks being open sourced by Microsoft. Xamarin&amp;rsquo;s competitive advantage is in the ecosystem of development and testing tools as well as infrastructure that supports cross-platform mobile development, testing and monitoring. Xamarin marvelously simplifies creation of native apps on iOS and Android using C# (&lt;a class="link" href="http://www.charlespetzold.com/blog/2015/10/Writing-Xamarin-Forms-Apps-in-FSharp.html" target="_blank" rel="noopener"&#10; &gt;now F# also&lt;/a&gt;). The pace of innovation at Xamarin is breathtaking. There is nothing quite like it to enable cross-platform development of native mobile applications with Microsoft&amp;rsquo;s flagship programming language at its core and the incredible productivity allowed by Microsoft&amp;rsquo;s and 3rd party tool set.&lt;/p&gt;&#10;&lt;p&gt;I think both Microsoft and Xamarin are going to greatly benefit from the formation of &lt;a class="link" href="http://www.dotnetfoundation.org/" target="_blank" rel="noopener"&#10; &gt;.NET Foundation&lt;/a&gt; and &lt;a class="link" href="https://channel9.msdn.com/Events/Build/2015/C9-15" target="_blank" rel="noopener"&#10; &gt;open sourcing of .NET&lt;/a&gt; as well as &lt;a class="link" href="https://channel9.msdn.com/Events/Build/2015/3-670" target="_blank" rel="noopener"&#10; &gt;cross-platform implementation of .NET&lt;/a&gt;. Keep in mind that while Mono is open source, Xamarin.Android and Xamarin.iOS are commercial products. Xamarin is going to benefit immensely by Mono closing the gaps with .NET BCL implementation and converged implementations of Mono and .NET in the near future, without giving up its core competitive advantages. Microsoft has seen the writing on the wall - The future belongs to Cloud and Mobile. Microsoft has a &lt;a class="link" href="https://azure.microsoft.com/" target="_blank" rel="noopener"&#10; &gt;strong presence&lt;/a&gt; in Cloud, but not so much in Mobile. Microsoft is going to benefit from .NET running on Mac and Linux by expanding their customer base to those platforms in its cloud offerings in Azure. But Xamarin&amp;rsquo;s gains are also going to translate into broader and deeper mobile market penetration for Microsoft&amp;rsquo;s tools and technologies, benefiting Microsoft&amp;rsquo;s Cloud strategy even further. Xamarin&amp;rsquo;s success is strategically important to Microsoft. Now even more so.&lt;/p&gt;&#10;&lt;p&gt;I think that Xamarin will continue to gain strength and remain a viable cross-platform development framework as far as I can see. Xamarin&amp;rsquo;s future looks very bright to me.&lt;/p&gt;&#10;</description></item><item><title>Creating Android Apps using C# and Xamarin</title><link>https://www.tewari.info/2015/02/21/creating-android-apps-using-c-and-xamarin/</link><pubDate>Sat, 21 Feb 2015 17:30:25 +0000</pubDate><guid>https://www.tewari.info/2015/02/21/creating-android-apps-using-c-and-xamarin/</guid><description>&lt;p&gt;You can create native Android and iOS applications using C#, with Xamarin. I explored the capabilities of Xamarin tools and the development experience with Xamarin to create an Android version of CensusMapper. CensusMapper displays U.S. Census data on a Map. I created the original application for Windows 8 (WinRT) using C#. I have since converted it to an MVVM (C#) application, HTML/Javascript (WinJS) version and more recently to a &lt;a class="link" href="https://www.tewari.info/2014/11/12/universal-apps/" &gt;Universal Windows App&lt;/a&gt; running on Windows Phone 8.1 and Windows 8.1. In that tradition, now it is faithfully ported to run on Android devices, using C# and Xamarin. CensusMapper is available on &lt;a class="link" href="https://play.google.com/store/search?q=CensusMapper" target="_blank" rel="noopener"&#10; &gt;Google Play Store&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="https://play.google.com/store/apps/details?id=info.tewari.censusmapper" target="_blank" rel="noopener"&#10; &gt;&lt;img alt="censusmapper-android-on-nexus5" 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/censusmapper-android-on-nexus5.png"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;CensusMapper.Android shows population of each U.S. State. User can tap on a location on the map to show the population (as per 2010 census) of the zip code containing the selected location. User can select a location to view the population compared to the containing geography, as a pie-chart.&lt;/p&gt;&#10;&lt;p&gt;This experimental project helped me expand my cross-platform mobile application development skillset in the following areas:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Using Xamarin/C# to create an Android app using Xamarin Studio on a PC and a Mac.&lt;/li&gt;&#10;&lt;li&gt;Structuring C#/.NET source code in a Portable Class Library to allow reuse on Windows, Windows Phone, Android and iOS platforms.&lt;/li&gt;&#10;&lt;li&gt;Converting the functionality of an existing Windows Universal App (Windows Phone/ WinRT) to an Android app.&lt;/li&gt;&#10;&lt;li&gt;Using GoogleMaps API (via Google Play Services) to display data retrieved from U.S. Census API.&lt;/li&gt;&#10;&lt;li&gt;Using Bing Maps API for reverse geocoding in an Android app.&lt;/li&gt;&#10;&lt;li&gt;Creating custom markers using low-level API in Android.Graphics namespace to display information on the map.&lt;/li&gt;&#10;&lt;li&gt;Charting with &lt;a class="link" href="http://oxyplot.org/" target="_blank" rel="noopener"&#10; &gt;oxyplot&lt;/a&gt; cross-platform charting library.&lt;/li&gt;&#10;&lt;li&gt;Working with Android SDK, AVD Manager as well as developer documentation and resources on Android and Xamarin websites in the development lifecycle of the app.&lt;/li&gt;&#10;&lt;li&gt;Publishing an app on Google Play Store.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;I started with Xamarin.Forms.Maps. It was quick and straight forward to create a Xamarin.Forms app. The tricky part was creating the custom markers (the shape of speech bubble) on the map, instead of using the default push-pin markers . I tried creating a CustomRender to create custom markers and built interactivity with the map elements, but it turned out to be too much hassle. All of that customization would be specific to Android platform only and not reusable on the iOS anyway. So, I decided against using Xamarin.Forms and work directly with Google Maps library. Xamarin.Forms also limits me to Windows Phone 8 compatibility in my PCL. I can&amp;rsquo;t use Windows Phone 8.1 in any PCL profile compatible with Xamarin.Forms. It also requires a minimum of Android 4.0. The PCL profile # 111 for sharing code between Windows 8, Windows Phone 8.1 as well as Android and iOS, is not compatible with Xamarin.Forms at the time of writing this.&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="https://www.tewari.info/wp-content/pcl-profile-111.png" &gt;&lt;img alt="pcl-profile-111" 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/pcl-profile-111.png"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Don&amp;rsquo;t use the Android emulator for testing. Get a real device. I stopped using the emulator while working on CensusMapper because GooglePlayServices (GPS) dependency was making me jump through way too many hoops. Debugging map functionality on the real device was a much more productive experience. Then I discovered &lt;a class="link" href="https://xamarin.com/android-player" target="_blank" rel="noopener"&#10; &gt;Xamarin&amp;rsquo;s Android Player&lt;/a&gt;. It is awesome. By all means, use it! It is a pleasure to work with, especially on a Mac. Don&amp;rsquo;t be discouraged by the preview/beta status. It blows the Android SDK virtual devices out of the water, in terms of performance and usability.&lt;/p&gt;&#10;&lt;p&gt;I tested on &lt;a class="link" href="https://play.google.com/store/devices/details/Nexus_4_8GB" target="_blank" rel="noopener"&#10; &gt;Google Nexus 4&lt;/a&gt; (Android 4.2), &lt;a class="link" href="http://www.amazon.com/Samsung-SCH-i535-Verizon-Unlocked-Smartphone/dp/B00O4CZ15O" target="_blank" rel="noopener"&#10; &gt;Samsung Galaxy SIII&lt;/a&gt; (Android 4.3) , &lt;a class="link" href="http://www.amazon.com/gp/product/B00LUZ8WJA" target="_blank" rel="noopener"&#10; &gt;BLU Dash JR&lt;/a&gt; (Android 4.4) and an older &lt;a class="link" href="http://www.amazon.com/Coby-7-Inch-Android-Internet-Touchscreen-Tablet/dp/B005HUH88K" target="_blank" rel="noopener"&#10; &gt;Coby Kyros&lt;/a&gt; tablet (Android 2.2). Google Play Services update, required for the app to work, could not be installed on BLU device because of the limited storage space. You must root the device in order to install the GPS updates on an SD card. It is advisable to have a &lt;a class="link" href="http://unrevoked.com/rootwiki/doku.php/public/root_friendly" target="_blank" rel="noopener"&#10; &gt;root-friendly device&lt;/a&gt;. Google Nexus devices are excellent development devices, allowing you root access and the ability to load custom ROMs. However, it is very important for you to get a few different kinds of devices of various form factors and Android versions/API levels for testing your app&amp;rsquo;s functional and non-functional aspects.&lt;/p&gt;&#10;&lt;p&gt;Android device logs and the IDE build logs are the most important tools you have to resolve problems encountered in the Android app development with Xamarin. These should be the first places to look when troubleshooting issue.&lt;/p&gt;&#10;&lt;p&gt;Versions used in this project:&#10;Xamarin 3.8.&#10;Xamarin Studio 5.7&#10;Xamarin Android 4.20.0&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="https://play.google.com/store/apps/details?id=info.tewari.censusmapper&amp;amp;utm_source=global_co&amp;amp;utm_medium=prtnr&amp;amp;utm_content=Mar2515&amp;amp;utm_campaign=PartBadge&amp;amp;pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1" target="_blank" rel="noopener"&#10; &gt;&lt;img alt="Get it on Google Play" class="gallery-image" data-flex-basis="810px" data-flex-grow="337" height="242" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png" srcset="https://www.tewari.info/en-play-badge_8894513479543131546_hu_5bf219cf694dcfc4.png 800w, https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png 817w" width="817"&gt;&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>Universal Apps</title><link>https://www.tewari.info/2014/11/12/universal-apps/</link><pubDate>Thu, 13 Nov 2014 02:50:36 +0000</pubDate><guid>https://www.tewari.info/2014/11/12/universal-apps/</guid><description>&lt;p&gt;The story of Windows Universal Apps is the result of advancements in three areas:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;The platform convergence between Windows 8.1 and Windows Phone 8.1&lt;/li&gt;&#10;&lt;li&gt;The (ongoing) unification of Windows and Windows Phone stores.&lt;/li&gt;&#10;&lt;li&gt;Shared Projects and other enhancements in Visual Studio 2013 Update 2 to support cross-platform development.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;&lt;a class="link" href="https://www.tewari.info/wp-content/universal-apps-titile.png" &gt;&lt;img 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/universal-apps-titile.png"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;I have written about my experience in converting an existing Windows 8 app, &lt;a class="link" href="http://blog.appliedis.com/2012/10/22/censusmapper-app-mashup-census-data-with-bing-maps/" target="_blank" rel="noopener"&#10; &gt;CensusMapper&lt;/a&gt;, to a Universal App on the &lt;a class="link" href="http://blog.appliedis.com/author/ash-tewari/" target="_blank" rel="noopener"&#10; &gt;AIS Blog&lt;/a&gt;. &lt;a class="link" href="http://blog.appliedis.com/2014/10/05/censusmapper-is-a-universal-app/" target="_blank" rel="noopener"&#10; &gt;Read the article here&lt;/a&gt;. I have also created another Universal App, LRMS, using Windows &lt;a class="link" href="http://appstudio.windows.com/" target="_blank" rel="noopener"&#10; &gt;App Studio&lt;/a&gt;. This app is available in both &lt;a class="link" href="http://apps.microsoft.com/windows/en-us/app/454df9ae-7a9d-40f2-8caf-5266649939d9" target="_blank" rel="noopener"&#10; &gt;Windows&lt;/a&gt; and &lt;a class="link" href="http://www.windowsphone.com/en-us/store/app/lrms/497cb5bb-1d37-4c66-a200-912b39872f6c" target="_blank" rel="noopener"&#10; &gt;Windows Phone&lt;/a&gt; Stores.&lt;/p&gt;&#10;&lt;p&gt;I gave a presentation at the &lt;a class="link" href="http://www.codecamp.org/Raleigh/" target="_blank" rel="noopener"&#10; &gt;Raleigh Code Camp&lt;/a&gt; this past weekend : Creating Universal Apps for Windows Phone 8.1 and Windows 8.1. Thanks to everyone who attended the presentation. The session slides for this presentation are available here : &lt;a class="link" href="http://1drv.ms/1GQSJI6" target="_blank" rel="noopener"&#10; &gt;Download Slides&lt;/a&gt;.&lt;/p&gt;&#10;</description></item><item><title>Creating Windows 8 applications with MVVM</title><link>https://www.tewari.info/2014/01/11/creating-windows-8-applications-with-mvvm/</link><pubDate>Sat, 11 Jan 2014 20:10:52 +0000</pubDate><guid>https://www.tewari.info/2014/01/11/creating-windows-8-applications-with-mvvm/</guid><description>&lt;p&gt;TRINUG January Main Meeting&lt;/p&gt;&#10;&lt;p&gt;You will learn how to use MVVM in your own Windows 8 application - desktop/mobile&#10;You will learn MVVM fundamentals. You will see the contrast between an MVVM application and a non-MVVM application.&lt;/p&gt;&#10;</description></item><item><title>Using Layer Diagrams – Keeping your MVVM code from turning into spaghetti</title><link>https://www.tewari.info/2013/11/09/raleigh-code-camp-2013/</link><pubDate>Sat, 09 Nov 2013 20:46:16 +0000</pubDate><guid>https://www.tewari.info/2013/11/09/raleigh-code-camp-2013/</guid><description>&lt;p&gt;&lt;a class="link" href="http://codecamp.org/Raleigh" title="Raleigh Code Camp"&#10; target="_blank" rel="noopener"&#10; &gt;Raleigh Code Camp 2013&lt;/a&gt; is wrapping up this afternoon. The venue and the crowd was phenomenal. I really enjoyed &lt;a class="link" href="http://codecamp.org/Raleigh/Sessions" target="_blank" rel="noopener"&#10; &gt;presenting&lt;/a&gt;&amp;ldquo;Using Layer Diagrams - Keeping your MVVM code from turning into spaghetti&amp;rdquo;. Thanks to everyone who attended the presentation.&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="https://www.tewari.info/wp-content/codecamp2013.png" &gt;&lt;img 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/codecamp2013.png"&gt;&lt;/a&gt;&lt;a class="link" href="https://twitter.com/jsonmez" target="_blank" rel="noopener"&#10; &gt;John Sonmez&lt;/a&gt;, Our Keynote Speaker, made my day by accepting my request to attend my presentation. It was awesome to have him in the audience and to get feedback from him!&lt;/p&gt;&#10;&lt;p&gt;I did not get the time to complete the raffle at the end of the presentation. But the folks who won the raffle should be getting an email from me with instructions to download their free license of &lt;a class="link" href="http://codedemo.net/" target="_blank" rel="noopener"&#10; &gt;CodeDemo (Professional).&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;The presentation slides can be downloaded from here : &lt;a class="link" href="https://www.tewari.info/wp-content/RDUCC-2013-LayerDiagrams-MVVM-Ash-Tewari.pdf" &gt;download&lt;/a&gt;.&lt;/p&gt;&#10;</description></item><item><title>Refactoring to MVVM (Windows 8)</title><link>https://www.tewari.info/2013/05/05/refactoring-to-mvvm-windows-8/</link><pubDate>Sun, 05 May 2013 19:47:09 +0000</pubDate><guid>https://www.tewari.info/2013/05/05/refactoring-to-mvvm-windows-8/</guid><description>&lt;p&gt;Carolina Code Camp - 2013&#10;You will learn how to structure your app&amp;rsquo;s code in a way that&#10;- improves maintainability&#10;- enables testability of your app&amp;rsquo;s UI behavior&#10;- reduces maintenance cost&#10;- enables cross-platform deployment&lt;/p&gt;&#10;</description></item><item><title>Understanding and Using System.Transactions</title><link>https://www.tewari.info/2012/10/17/understanding-and-using-system-transactions/</link><pubDate>Wed, 17 Oct 2012 16:10:42 +0000</pubDate><guid>https://www.tewari.info/2012/10/17/understanding-and-using-system-transactions/</guid><description>&lt;p&gt;These are some resources to help grasp &lt;a class="link" href="http://msdn.microsoft.com/en-us/library/vstudio/system.transactions%28v=vs.90%29.aspx" title="System.Transactions Namespace"&#10; target="_blank" rel="noopener"&#10; &gt;System.Transactions&lt;/a&gt; functionality and use it effectively in your projects:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/library/vstudio/ee818755%28v=vs.100%29.aspx" target="_blank" rel="noopener"&#10; &gt;Features Provided by System.Transactions&lt;/a&gt; to &lt;a class="link" href="http://msdn.microsoft.com/en-us/library/vstudio/ee818751%28v=vs.100%29.aspx" target="_blank" rel="noopener"&#10; &gt;create transactional applications&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/library/vstudio/ee818746%28v=vs.100%29.aspx" target="_blank" rel="noopener"&#10; &gt;Implementing an Implicit Transaction using Transaction Scope&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;MSDN Magazine Articles by &lt;a class="link" href="http://www.johnpapa.net/" target="_blank" rel="noopener"&#10; &gt;John Papa&lt;/a&gt;:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc163847.aspx" target="_blank" rel="noopener"&#10; &gt;ADO.NET and System.Transactions&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc163527.aspx" target="_blank" rel="noopener"&#10; &gt;Revisiting System.Transactions&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;These are specific to &lt;a class="link" href="http://msdn.microsoft.com/en-us/library/vstudio/system.transactions.transactionscope%28v=vs.100%29.aspx" target="_blank" rel="noopener"&#10; &gt;TransactionScope&lt;/a&gt;(the way to go in most cases):&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Here is a practical example of &lt;a class="link" href="http://thewayofcode.wordpress.com/2011/12/11/handling-transactions-in-net-using-transactionscope/" target="_blank" rel="noopener"&#10; &gt;Using TransactionScope to handle transactions in .net&lt;/a&gt;.&lt;/li&gt;&#10;&lt;li&gt;This &lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc300805.aspx" target="_blank" rel="noopener"&#10; &gt;article in MSDN Magazine&lt;/a&gt; gets in depth with the way a TransactionScope like functionality can be implemented. Gives you a good understanding of what is happening under the hood when using TransactionScope in some Repository implementations in multi-threaded scenarios.&lt;/li&gt;&#10;&lt;li&gt;This CodeProject article is another example of &lt;a class="link" href="http://www.codeproject.com/Articles/31270/A-Transactional-Repository-Implementation-in-NET" target="_blank" rel="noopener"&#10; &gt;implementing a transactional repository&lt;/a&gt;.&lt;/li&gt;&#10;&lt;li&gt;There are &lt;a class="link" href="http://blogs.msdn.com/b/dbrowne/archive/2010/06/03/using-new-transactionscope-considered-harmful.aspx" target="_blank" rel="noopener"&#10; &gt;excellent tips here&lt;/a&gt; about configuring TransactionScope when using it with SQL Server.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;This is a good resource for &lt;a class="link" href="http://www.codeproject.com/Articles/55472/Committable-Transactions-in-C-SQL" target="_blank" rel="noopener"&#10; &gt;understanding CommitableTransaction&lt;/a&gt; usage.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;And this one on the CodeProject has brilliant, in-depth and under-the-hood coverage - &lt;a class="link" href="http://www.codeproject.com/Articles/35087/Truly-Understanding-NET-Transactions-and-WCF-Imple" target="_blank" rel="noopener"&#10; &gt;Truly Understanding .NET Transactions and WCF Implementation&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Features Provided by System.Transactions&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/library/vstudio/ee818755%28v=vs.100%29.aspx" target="_blank" rel="noopener"&#10; &gt;http://msdn.microsoft.com/en-us/library/vstudio/ee818755(v=vs.100).aspx&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Implementing an Implicit Transaction using Transaction Scope&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/library/vstudio/ee818746%28v=vs.100%29.aspx" target="_blank" rel="noopener"&#10; &gt;http://msdn.microsoft.com/en-us/library/vstudio/ee818746(v=vs.100).aspx&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;MSDN Articles by John Papa&lt;/p&gt;&#10;&lt;p&gt;ADO.NET and System.Transactions&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc163847.aspx" target="_blank" rel="noopener"&#10; &gt;http://msdn.microsoft.com/en-us/magazine/cc163847.aspx&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Revisiting System.Transactions&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc163527.aspx" target="_blank" rel="noopener"&#10; &gt;http://msdn.microsoft.com/en-us/magazine/cc163527.aspx&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;These are specific to TransactionScope (the way to go in most cases)&lt;/p&gt;&#10;&lt;p&gt;Here is a practical example of Using TransactionScope :&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://thewayofcode.wordpress.com/2011/12/11/handling-transactions-in-net-using-transactionscope/" target="_blank" rel="noopener"&#10; &gt;http://thewayofcode.wordpress.com/2011/12/11/handling-transactions-in-net-using-transactionscope/&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;This one gets in depth with the way a TransactionScope like functionality can be implemented. Gives you a good understanding of what is happening under the hood when using TransactionScope in some Repository implementations in multi-threaded scenarios.&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://msdn.microsoft.com/en-us/magazine/cc300805.aspx" target="_blank" rel="noopener"&#10; &gt;http://msdn.microsoft.com/en-us/magazine/cc300805.aspx&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Here is another example of implementing a transactional repository :&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://www.codeproject.com/Articles/31270/A-Transactional-Repository-Implementation-in-NET" target="_blank" rel="noopener"&#10; &gt;http://www.codeproject.com/Articles/31270/A-Transactional-Repository-Implementation-in-NET&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;There are excellent tips here about configuring TransactionScope when used with SQL Server:&lt;/p&gt;&#10;&lt;p&gt;&lt;a class="link" href="http://blogs.msdn.com/b/dbrowne/archive/2010/06/03/using-new-transactionscope-considered-harmful.aspx" target="_blank" rel="noopener"&#10; &gt;http://blogs.msdn.com/b/dbrowne/archive/2010/06/03/using-new-transactionscope-considered-harmful.aspx&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;This is a good resource for CommitableTransaction usage - &lt;a class="link" href="http://www.codeproject.com/Articles/55472/Committable-Transactions-in-C-SQL" target="_blank" rel="noopener"&#10; &gt;http://www.codeproject.com/Articles/55472/Committable-Transactions-in-C-SQL&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;And this one has brilliant under-the-hood coverage - &lt;a class="link" href="http://www.codeproject.com/Articles/35087/Truly-Understanding-NET-Transactions-and-WCF-Impl" target="_blank" rel="noopener"&#10; &gt;http://www.codeproject.com/Articles/35087/Truly-Understanding-NET-Transactions-and-WCF-Impl&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>Job Opening - Windows GUI Developer</title><link>https://www.tewari.info/2009/03/09/job-opening-windows-gui-developer/</link><pubDate>Mon, 09 Mar 2009 21:04:30 +0000</pubDate><guid>https://www.tewari.info/2009/03/09/job-opening-windows-gui-developer/</guid><description>&lt;p&gt;We have a 3-4 month contract position open for a Windows GUI Developer in our group at &lt;a class="link" href="http://maps.google.com/maps?q=calabasas,&amp;#43;CA&amp;amp;oe=utf-8&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;split=0&amp;amp;gl=us&amp;amp;ei=SYK1SbXHGM-jtgf9jaXqDA&amp;amp;sa=X&amp;amp;oi=geocode_result&amp;amp;resnum=1&amp;amp;ct=title" title="calabasas-map"&#10; target="_blank" rel="noopener"&#10; &gt;Calabasas, California&lt;/a&gt;:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;2+ years experience developing C++/C# Windows thick-client applications&lt;/li&gt;&#10;&lt;li&gt;Expert in GUI development on Windows&lt;/li&gt;&#10;&lt;li&gt;Expert in Object Oriented Analysis and Design (OOA/OOD)&lt;/li&gt;&#10;&lt;li&gt;Deep understanding of client-server software development&lt;/li&gt;&#10;&lt;li&gt;Experience in multithreading, and thread synchronization&lt;/li&gt;&#10;&lt;li&gt;Excellent communication skills (written and verbal)&lt;/li&gt;&#10;&lt;li&gt;Highly organized and detail oriented&lt;/li&gt;&#10;&lt;li&gt;BSCS/BSEE or equivalent&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;If you are interested, &lt;a class="link" href="https://www.tewari.info/contact-me/" title="Contact Ash Tewari"&#10; &gt;contact me&lt;/a&gt;. The position is available now.&lt;/p&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>WPF - LINQ to SQL Sample</title><link>https://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/</link><pubDate>Fri, 07 Mar 2008 07:15:35 +0000</pubDate><guid>https://www.tewari.info/2008/03/07/wpf-linq-to-sql-sample/</guid><description>&lt;p&gt;This exercise in binding a WPF ListView control with LINQ to SQL was a lot of fun ! The following image shows data from &lt;a class="link" href="http://www.codeplex.com/MSFTDBProdSamples" title="MSSQL Sample Databases"&#10; target="_blank" rel="noopener"&#10; &gt;AdventureWorks&lt;/a&gt; sample database displayed in the ListView control. The end result is very admirable, even in this very basic demo. Feeling a complete sense of freedom is unavoidable when working with WPF.&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="Linq2SqlSample1.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/Linq2SqlSample1.Png"&gt;&lt;/p&gt;&#10;&lt;p&gt;This sample demonstrates :&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;LINQ to SQL mapping.&lt;/li&gt;&#10;&lt;li&gt;WPF ListView Control DataBinding.&lt;/li&gt;&#10;&lt;li&gt;Displaying images stored in database as varbinary in WPF control.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;The sample code can be downloaded here : &lt;a class="link" href="https://www.tewari.info/downloads/Linq2SqlSample.zip" title="Linq2SqlSample.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;a class="link" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" target="_blank" rel="noopener"&#10; &gt;&lt;img alt="Creative Commons License" class="gallery-image" data-flex-basis="681px" data-flex-grow="283" height="31" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png" width="88"&gt;&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>Customize log4net Output Path</title><link>https://www.tewari.info/2008/03/06/customize-log4net-output-path/</link><pubDate>Fri, 07 Mar 2008 00:56:55 +0000</pubDate><guid>https://www.tewari.info/2008/03/06/customize-log4net-output-path/</guid><description>&lt;p&gt;The default log4net output path is relative to the startup directory of your executable. To customize the output path, you can override the base Appender&amp;rsquo;s File property in your own Appender class. The following example describes how to route the log files relative to the temp folder :&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 MyOwnAppender : log4net.Appender.RollingFileAppender&#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 override string File&#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; get&#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; return base.File;&#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; set&#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; if (Path.IsPathRooted(value))&#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; base.File = value;&#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; else&#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; base.File = Path.Combine(Path.GetTempPath(), value);&#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; }&#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;Your log4net config file must be modified so that log4net can locate and use your custom Appender. If MyOwnAppender is in MyNamespace and you have implemented it in MyLoggerLib.dll :&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;</description></item><item><title>OpenSimSim 1.0-RC is out</title><link>https://www.tewari.info/2007/12/24/opensimsim-10-rc-is-out/</link><pubDate>Mon, 24 Dec 2007 17:04:31 +0000</pubDate><guid>https://www.tewari.info/2007/12/24/opensimsim-10-rc-is-out/</guid><description>&lt;p&gt;&lt;a class="link" href="http://opensimsim.sourceforge.net" title="OpenSimSim Website"&#10; target="_blank" rel="noopener"&#10; &gt;OpenSimSim&lt;/a&gt; : Your Password Solution. Download 1.0 Release Candidate here : &lt;a class="link" href="https://sourceforge.net/project/showfiles.php?group_id=194886" title="OpenSimSim 1.0-RC"&#10; target="_blank" rel="noopener"&#10; &gt;OpenSimSim 1.0-RC&lt;/a&gt;&lt;img alt="opensimsim-screenshot" class="gallery-image" data-flex-basis="320px" data-flex-grow="133" height="225" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="http://opensimsim.sourceforge.net/opensimsim-screenshot-1.png" width="300"&gt;&lt;/p&gt;&#10;</description></item></channel></rss>