Reusing parts of XAML with Xamarin.Forms
Custom controls are the most common way for reusing parts of markup in Xamarin.Forms. When displaying collections, data templates can often serve as a simpler alternative with less overhead:...
View ArticleUpdating external data sources in SQL Server
I recently had to create a copy of multiple Azure SQL databases. They were all interconnected, i.e. each database had some other databases registered as external data sources. After the import, these...
View ArticleCreating and publishing a Greasy Fork script
I've been using a couple of GreasyFork scripts with Tampermonkey Firefox extension for a while. Only recently has a missing feature on a web page bothered me enough to consider creating a user script...
View ArticleConfiguring Angular for older browsers
In recent versions, Angular is preconfigured for an ES2015 build which only works in modern browsers. Often, that's not an issue. Fortunately, it's still possible to make it compatible with older...
View ArticleUsing SCSS variables in Angular
When creating a new project using Angular CLI you can choose to have SCSS support in the project preconfigured. But even if you do, it doesn't set up any file for the rules that will be reused across...
View ArticleXamarin.Forms FlyoutHeader and iOS safe area
In Xamarin.Forms Shell, the flyout header is always positioned at the top of the flyout even if not all menu items fit on the screen and scrolling is required. It's a great place to show an application...
View ArticleMultiple Hangfire instances in one database
I recently got involved in maintaining a project that's using Hangfire for scheduling jobs. One of the issues with it was unreliable execution of jobs. Often, they failed several times before finally...
View ArticleConfiguring environments in .NET console app
ASP.NET Core applications are already set up with support for reading configuration files and switching between different environments. You get none of that when you create a new .NET console...
View ArticleReturn value from Xamarin.Forms Shell modal
Xamarin.Forms Shell makes navigation in Xamarin.Forms apps much simpler by using URL based routes instead of the NavigationPage-based hierarchical navigation. It works well even for modal pages. You...
View ArticleMy PowerShell prompt configuration
I like doing things from the command line and use PowerShell daily. I miss some features in the default Windows PowerShell console and use Windows Terminal and Oh my Posh to improve the experience....
View ArticleUnreliable navigation to root page
Xamarin.Forms Shell navigation seems well documented but either I don't understand the documentation correctly or it isn't accurate. The part that confuses me is the description of the following two...
View ArticleDisplaying toasts in Xamarin.Forms
Toasts are a common way to non-intrusively show information to the user. Unfortunately, there's no built-in control for them in Xamarin.Forms. I also couldn't find a dedicated third-party library with...
View ArticleSynchronous async method implementation
Interfaces usually have methods that return tasks because they were designed to be asynchronous. But how should you implement such a method when you don't need to call any asynchronous methods inside...
View ArticleAwaiting Google Play services tasks
Thanks to Xamarin, C# developers can use a lot of their existing knowledge even when interacting with native Android (and iOS) APIs. However, some APIs still break the idioms we're used to in .NET. For...
View ArticleChanging URLs of Git submodules
I prefer using Git over SSH which makes me a minority in most teams I work with. Fortunately, the way I connect to the repository usually doesn't matter, as all Git hosting services support both HTTPS...
View ArticleWhat code are your unit tests testing?
Mocks can be a helpful tool for replacing external dependencies in unit tests. However, caution is required when you embark on that route or you could end up with tests that don't really test your code...
View ArticleFun with JavaScript type coercion
Type coercion is the term used for automatic conversion between data types in JavaScript. If you're not careful, it can be a cause for subtle bugs in your code. This post is dedicated to one such...
View ArticleUse more client-side libs with Nuxt SSR
Server-side rendering is a great way to make your NuxtJS site more SEO-friendly, as it sends a fully rendered page to the client. However, this doesn't work with libraries that require access to DOM...
View Article404 page for Nuxt dynamic nested routes
Although NuxtJS routing is based on the file system, it also supports dynamic routes that are unknown in advance and based on an external data source. Unknown dynamic nested routes even allow this for...
View ArticleAllowing insecure WebSocket connections
Increased security in web browsers can be a hindrance during development when all the infrastructure is not yet in place. For example, browsers don't allow insecure WebSocket connections (ws) from...
View Article