C# 9 – Part 2

Jared Parsons – lead of the C# Compiler Team at Microsoft

Posted in C# | Tagged | Comments Off on C# 9 – Part 2

An Alert From the ViewModel

Quite often we want to send an alert from the view model, but you can only do so from the view. We’ve tackled this problem in the past but we think there is room for a simplified and clear step by step explanation.

Continue reading
Posted in Essentials | Tagged , | Comments Off on An Alert From the ViewModel

Code Snippet – By request

Code Snippets can save you from repetitive (boring) tasks. Visual Studio comes with a great many code snippets, perhaps the most often used is ctor which creates an empty constructor.

You can also create your own. Here is one I use a lot. It creates something that looks like this:

Continue reading
Posted in Essentials | Tagged | Comments Off on Code Snippet – By request

Latest Video: Xamarin.Forms

Proud to announce my newest video course: Hands On Xamarin.Forms. Learn Xamarin in 2.5 hours.

Posted in Xamarin, Xamarin.Forms | Tagged , | Comments Off on Latest Video: Xamarin.Forms

What’s Coming in C# 9 Part 1

Jared Parsons – lead of the C# Compiler Team at Microsoft

Posted in C# | Tagged | Comments Off on What’s Coming in C# 9 Part 1

Picker within Listview

We needed to put a picker inside a list view in a Xamarin.Forms app, but we wanted to be notified when one of the pickers changed and be able to get the value from the picker (and know which one changed).

The complete source for this example is on GitHub.

My first impulse was to use EventToCommand, but that became a rabbit hole, and thanks to Lance and others on the Xamarin Community Forums, and email, I was redirected to a simpler approach that I will explain here.

We begin with a DataTemplate that we will use with our ListView.

Continue reading
Posted in Essentials, Xamarin | Tagged , | Comments Off on Picker within Listview

Open a dialog from VM using Events

This is a quick summary of how I open a dialog box from the view model. There are other ways to do this (as noted in previous postings), but this is easy, easy to maintain and puts most of the logic in the view model.

Continue reading
Posted in .NET Core, C# 8 | Tagged | Comments Off on Open a dialog from VM using Events

Xamarin.Forms Shell

Focus on Xamarin.Forms Shell – the new way to create great Xamarin.Forms applications. We go in-depth with Shane Neuville, a Senior Developer on the Xamarin.Forms team.

Shell Forms Introduction
Project Board
Xaminals
Xappy
Shell Login Sample
Gastropods

Posted in Essentials | Tagged | Comments Off on Xamarin.Forms Shell

Mark Price – C# & .NET Core

Mark Price, author of C# 8 and .NET Core 3.0 Modern Cross Platform Development talks about… well about everything .NET A fantastic exploration of what is new in C#, .NET Core, Blazor, and much more,

Posted in .NET Core, C# 8, Essentials | Tagged | Comments Off on Mark Price – C# & .NET Core

Xamarin Coding Standards

There are many best practices in writing Xamarin. Here are some that we’ve canonized where I work…

👍 By convention the identifier for the ViewModel is vm

😠 Do not assign more than one page to a view model. Generally speaking: it should be one page to one view model

Continue reading
Posted in Essentials | Tagged , , | 1 Comment

C# Coding Standards

Let’s face it, most coding standards are arbitrary. The key to a successful project, however, is not which standards you follow, but that you are consistent.

Here is a partial list of the C# coding standards my team uses and advocates. Most of these are industry-wide conventions and thus using them will ensure that your code is easily readable by people who are not you. (Many thanks to Adam for letting me post this here)

👍 use PascalCasing for class names and method names.

public class ClientActivity 
{ 
    public void ClearStatistics() 
    { 
        //... 
    } 

    public void CalculateStatistics() 
    { 
        //... 
    } 
} 

Why: consistent with the Microsoft’s .NET Framework and easy to read.

👍 use camelCasing for method arguments and local variables.

public class UserLog 
{ 
   public void Add(LogEvent logEvent) 
   { 
    var itemCount = logEvent.Items.Count; 

    // ... 
   } 
} 

Why: consistent with the Microsoft’s .NET Framework and easy to read.

Continue reading
Posted in C# | Tagged , , | 1 Comment

Shawn Wildermuth

Shawn Wildermuth has been tinkering with computers and software since he got a Vic-20 back in the early ‘80s.

As a Microsoft MVP since 2003, he’s also involved with Microsoft as an ASP.NET Insider and ClientDev Insider. You may have taken one of his more than twenty courses on Pluralsight

He’s authored eight books and innumerable articles on software development. You can also see him at one of the local and international conferences he’s spoken at including TechEd, Oredev, SDC, NDC, VSLive, DevIntersection, MIX, Devteach, DevConnections and Dev Reach.

He is one of the Wilder Minds. You can reach him at his blog. He’s also making his first, feature-length, documentary about software developers today called “Hello World: The Film”. You can see more about it here.

Posted in Essentials | Tagged | Comments Off on Shawn Wildermuth