Resolving "UIWindow does not contain a definition for Current" issue in Uno Platform
4 years ago
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.