Uno Platform
Apr 14, 2020

Resolving "UIWindow does not contain a definition for Current" issue in Uno Platform

When porting UWP apps to Uno Platform, developers may encounter an error related to a missing definition of 'UIWindow.Current'. This error may not appear in the source code until switching to the iOS platform, causing confusion. The issue arises due to a property in the 'UIApplicationDelegate' class that has precedence over the 'Window' type name. A quick fix is to use full namespace qualification to specify 'Windows.UI.Xaml.Window'. This problem can occur in other platforms as well, like Android. Paying attention to the target platform dropdown can help identify and resolve such errors.

Xamarin XAML
Mar 5, 2019

How a simple row or column span can make or break your Xamarin.Forms Grid

Discover a surprising issue with Xamarin.Forms' Grid layout. Improperly managing the Span properties can result in unexpected behavior. Learn how a "faux" column is generated and how to ensure your Spans have the right size to avoid breaking your Grid layouts.

General
Jan 7, 2019

A story about why cautious parentheses never hurt

Discover how a seemingly innocent operator precedence mistake led to completely wrong results when implementing read operations for ushort values from a little-endian byte array. Learn why adding parentheses is crucial for code clarity and avoiding errors. Check out the full article to find out how this mistake was fixed and the lesson learned.

WinUI XAML
Jul 7, 2017

The curious case of jumping app bar button labels

Discover how to address two surprising problems with the CommandBar control in UWP apps in this article. Learn how to display commands on the left side of the control and how to fix labels that jump around or disappear. Check out the source code on GitHub for an example implementation. Improve the customization of your CommandBar and avoid unexpected results.

WinUI XAML
Apr 10, 2017

When a single transparent color is simply not enough

Discover the surprising truth about the "Transparent" color in Universal Windows Platform apps. Find out why it can cause unexpected results in animations and how to avoid these pitfalls. Get the full story here!

Visual Studio Development WinUI XAML
Feb 1, 2017

Úskalí třídy VisualStateManager

Přečtěte si tento článek a zjistěte, jak používání VisualStateManageru ve spojení s AdaptiveTriggery může být matoucí. Budete překvapeni, jaké problémy můžete narazit při přecházení mezi jednotlivými stavy rozložení. Najdete zde také tipy, jak tyto problémy vyřešit.

Visual Studio Development WinUI XAML
Feb 1, 2017

VisualStateManager pitfalls

Discover the two gotchas with VisualStateManager when building XAML layouts in UWP. Learn about the placement issue and the consequences of invalid setters. Check out the full article on how to overcome these challenges!

Development WinUI
Mar 23, 2016

WinRT gotcha - "one shot" Timer BackgroundTask does not unregister after the "one shot"

In my latest Windows 10 app, I made a mistake that caused the countdown on the app's tiles to be off by a day. After some intense debugging, I discovered the hidden evil - a parameter in the code that determines whether the task is triggered only once or periodically. I fixed the bug and now the tiles are updating correctly.