diff --git a/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs b/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs index 0e37bcb1e..1da1681f2 100644 --- a/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs +++ b/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs @@ -236,10 +236,12 @@ public bool IsPrimaryButtonEnabled /// public IRelayCommand TemplateButtonCommand => (IRelayCommand)GetValue(TemplateButtonCommandProperty); +#if !NET8_0_OR_GREATER private static readonly PropertyInfo CanCenterOverWPFOwnerPropertyInfo = typeof(Window).GetProperty( "CanCenterOverWPFOwner", BindingFlags.NonPublic | BindingFlags.Instance )!; +#endif /// /// Initializes a new instance of the class.