• Dynamic AppShell Items in MAUI

    I’m currently working on a handful of Xamarin to MAUI migration projects with most of them using the AppShell navigation framework built-in to Xamarin.Forms - something I previously found a little clunky.

    I’m sure most phone users are familiar with the concept of the AppShell even if they don’t know it, but basically it provides a slide out menu along with the good old ‘hamburger’ button and swipe gestures to open and close it. With the menu open a number of menu items are presented for the user to select to navigate around the app and/or invoke operations such as logging in or out.

    And therein lies the rub for both Xamarin and MAUI as out of the box the AppShell doesn’t appear to provide an obvious, clean mechanism to dynamically show or hide items based on state within the app, e.g. whether a user is logged in or not so that the appropriate menu options can be displayed.

    The existing applications I’m working with had gotten around this shortcoming in slightly different ways which involved some form of ‘Global State’ class or methods being added to the App.xaml.cs class which required various ugly casts dotted around the app to call them. Surely there had to be a better way than this.

    Read more
  • Configure Default Build Action for all items in a Folder

    How many times have you added an ‘non-content’ file like a SQL script to a folder and forget to set the required build action?

    Well today I resolved this issue once and for all in two projects I’m currently working on with a simple update to the respective csproj files.

    Read more
  • Rider Quicky - Managing Breakpoints

    jetbrains rider logo Visual Studio may have fallen out of favor with me but having worked with the IDE for over 20 years that muscle memory is hard to rewrite. From keyboard shortcuts to menu options and settings, I know how to do it in Studio but sometimes I don’t even know if it’s possible using Rider.

    I frequently find myself just accepting that ‘this is the way Rider does it’ but sometimes I think; ‘you know what … no, I need to work this out, Rider must be able to do this’. Most of the time I find the way but then I have to say I forget the things that I don’t bump into everyday.

    With that in mind I think I need to start writing these down so I don’t have to trawl the internet or the settings to work it out each time.

    To kick off this ‘Rider Quicky’ series I look at something that bugged me for quite a while - deleting breakpoints, simple huh?

    Read more
  • VS for Mac is Dead, thank god for Rider

    jetbrains rider logo Even before Microsoft announced that they were retiring Visual Studio for Mac I have to say that I’d decided to go another way.

    I’d never really felt that impressed with VS for Mac, feeling it was always a bit of a second class citizen - which is understandable I guess; Microsoft have Visual Studio 2022 for their own operating system after all so it was probably quite surprising that they released the Mac IDE at all.

    Now, Mac users are not being left out in the cold by Microsoft - oh no. They are are suggesting Visual Studio Code for use on the Mac (and Windows and even Linux) which, it is said, can be augmented with powerful extensions to support C#, Blazor and even MAUI development.

    But this all felt a little ….. I don’t know, cobbled together to me. I wanted something a little bit more … focused on the job I need it to do. Not a general purpose system that could be tailored for any number of use cases.

    Enter Jetbrains Rider for Mac (and Windows and Linux) which in my opinion, despite being not being a free product, is a very worthy replacement.

    Read more
  • Running Docker Desktop on Apple Silicon

    Almost a year ago I posted about my use of Docker to streamline my development SQL instances and since then I’ve been working quite happily on my aging Mac - until I bought my shiny new Macbook Pro and my instructions didn’t result in a runnable container.

    Now I’d checked out a lot of things before putting my hand in my pocket and shelling out for the Macbook and I was wondering what I’d done - maybe I’d fallen at the first hurdle and should have just bought a ‘regular’ Windows laptop instead.

    Well, I wasn’t having that - no, not at all.

    As with so many problems in technology, I cannot possibly be the first person to have bumped into the, especially as this is an Apple M3 CPU - the 3rd generation of Apple Silicon, surely the early adopters ran into this.

    Well, after trawling the internet and going down some blind alleys I managed to get SQL running on Docker on my Macbook Pro, M3 Pro.

    TLDR; Basically you need to install the Apple Rosetta application, make sure you are running the latest version of Docker Desktop and enable the use of Rosetta for x86/amd64 emulation.

    Read more