Assign ItemsSource to a Responsive Variable
The ObservableCollection class is nice for updating interface collections (such as dropdowns and listboxes) on the fly. Initialize the CList variable publicly. After that you can adjust that variable...
View ArticleConditional Ordering and Subsorting in LINQ
To accomplish conditional ordering you build upon your original LINQ assignment variable (in this case recs). If there are any records that haven’t been viewed by a user, the set is sorted one way,...
View ArticleClick Event of NSStatusItem in Xamarin.Mac
This issue annoyed me a bit so I thought I’d share. I was working with an application that had a NSStatusItem (also known as a Menu Extra). This is the Windows equivalent of a system tray application....
View ArticleBalloon Tip Alternative in Xamarin.Mac
In Windows, a system tray application can popup a message for the user above the icon without interaction. This is commonly referred to as a balloon tip notification or a balloon tooltip. This kind of...
View ArticleCustomize NSComboBox Items in Xamarin.Mac
Have you ever wanted to change the color or fontweight of an item in a NSComboBox? Making an item red or bold can give attention to options you want the client to choose. In this example I will be...
View ArticleDeserializing JSON into a Dynamic Object
Deserializing in JSON.NET can be dynamic using the JObject class, which is included in that library. My JSON string represents these classes: [crayon-5649949de1a24220499945/] A normal conversion to...
View ArticleUsing Linq with ItemsCollection
I was working with an ItemCollection that was defining a menu. To hone in on a specific MenuItem I did something like this: [crayon-5649949de02c5474296995/] But I didn’t like. It just seemed big and...
View ArticleDependency Injection with PCLs in Xamarin
A Portable Class Library (PCL) allows you to target the platforms you wish to support, and use Interfaces to provide platform-specific functionality. This is also known as dependency injection. You...
View ArticleRead Metadata from Photos in C#
In the following example I will be extracting metadata from photos in Windows & Xamarin.Mac. I am targeted specific, metadata properties but many more are available in either platform....
View ArticleShrink File Paths with an Ellipsis in C#
I searched online for a way to shorten a path in .NET. I couldn’t find a solid solution so I had to roll my own. The following method will handle your basic compression needs. It has also been...
View Article