If I open a view and then hit the X to collapse the view, there is a focused blurred area that won't go away. I need the items to collapse rather then close because I keep them in memory. So how can I fix this blurred box staying on the screen when setting a view to Collapsed?
The first pictures shows with View open. The second picture is how it looks if the View is collapsed. And here is the code I run to collapse it:
private void RadWindow_PreviewClosed(object sender, Telerik.Windows.Controls.WindowPreviewClosedEventArgs e)
{
Visibility = Visibility.Collapsed;
e.Cancel = true;
}
And this is how the MainWindow initializes the Fluent Theme and opens the windows when clicked:
public partial class MainWindow : RadWindow
{
public MainWindow()
{
InitializeComponent();
StyleManager.ApplicationTheme = new FluentTheme();
FluentPalette.LoadPreset(FluentPalette.ColorVariation.Dark);
FluentPalette.Palette.FontSizeS = 8;
FluentPalette.Palette.FontSize = 12;
FluentPalette.Palette.FontSizeL = 14;
FluentPalette.Palette.FontSizeXL = 16;
}
private void View1Button_Click(object sender, RoutedEventArgs e)
{
EmptyDialog emptyDialog = new EmptyDialog();
emptyDialog.Owner = this;
emptyDialog.View = new View1ViewModel();
emptyDialog.Height = 500;
emptyDialog.Width = 500;
emptyDialog.Show();
}
private void View2Button_Click(object sender, RoutedEventArgs e)
{
EmptyDialog emptyDialog = new EmptyDialog();
emptyDialog.Owner = this;
emptyDialog.View = new View2ViewModel();
emptyDialog.Height = 500;
emptyDialog.Width = 500;
emptyDialog.Show();
}
}
}