Refreshing the DataTemplateSelector

The DataTemplateSelector could be a cool tool for changing out which DataTemplate is used to display an element within a list.  I started using it for a media feature to figure out whether an element’s thumbnail should display as image, sound, or video. The Usual Typically, this process involves creating a DataTemplateSelector class like this:…

Keeping the GUI responsive

Passing data from worker threads to the UI thread is always a chore no matter which programming language is used.  Code can be a bear to develop, complex to read, and difficult to maintain.  Race conditions, debugging, security access, etc – it’s all a not-so-fun part of coding. I see that C# 4.0 introduced the async/await…

Persisting data for UWP

UWP apps are funny.  Unlike regular desktop apps, it’s not always obvious how to store and retrieve data.  There are two cases I’m talking about: There is no Settings GUI in UWP apps like there was in WPF apps.  Previously, an Engineer could right-click on Properties in Visual Studio and set initial values for the…

Thoughts on Model-View-ViewModel

So many methodologies on how to program.  Things were so simple 20-30 years ago.  Single file programs.  Then turning into multiple files, procedural.  Then OOP.  Then Winforms.  Then MFC.  Then .NET and all the C# goodness.  Then WPF.  And now MVVM. There’s pluses and minuses to advancement in technology.  On some occasions, I feel that…

Using font icons in UWP

Microsoft has made the switch from old-school image icons to font icons that web technologies like Font Awesome and Glyphicons have been offering for years.  There is a set of fonts that Microsoft has included with all Windows 10 operating systems.  But the font that has most of the icons is Segoe MDL2 Assets.  Here,…