WinUI UI Bugs

Common Symptoms

SymptomLikely causeFix
Dialog crashes or never appearsMissing XamlRootSet dialog.XamlRoot = this.Content.XamlRoot
UI update from background failsUWP dispatcher pattern or wrong threadUse DispatcherQueue.TryEnqueue
Window APIs are nullUWP Window.Current or CoreWindow assumptionTrack the window explicitly and use AppWindow
Title bar drag brokenCustom title bar hit testing/DPI not handledRecheck title bar docs and test scaling
Theme/resource not foundResource dictionary or namespace mismatchCheck Microsoft.UI.Xaml resource references

Search For Stale APIs

rg "Windows\.UI\.Xaml|CoreDispatcher|Window\.Current|ApplicationView|CoreWindow|MessageDialog"

Dialog Fix

var dialog = new ContentDialog
{
    Title = "Saved",
    Content = "Your changes were saved.",
    CloseButtonText = "OK",
    XamlRoot = this.Content.XamlRoot,
};
await dialog.ShowAsync();