SEBWIN-559, #378: Removed animated border of runtime window in attempt to fix performance issue in virtualized environments.

This commit is contained in:
Damian Büchel 2022-03-31 11:25:20 +02:00
parent 291c107fdd
commit 3dda11956e
6 changed files with 6 additions and 84 deletions

View file

@ -18,21 +18,8 @@ namespace SafeExamBrowser.UserInterface.Desktop.ViewModels
{
internal class RuntimeWindowViewModel : ProgressIndicatorViewModel
{
private Visibility animatedBorderVisibility, progressBarVisibility;
private TextBlock textBlock;
public Visibility AnimatedBorderVisibility
{
get
{
return animatedBorderVisibility;
}
set
{
animatedBorderVisibility = value;
OnPropertyChanged(nameof(AnimatedBorderVisibility));
}
}
private Visibility progressBarVisibility;
private readonly TextBlock textBlock;
public Visibility ProgressBarVisibility
{

View file

@ -15,24 +15,6 @@
</ResourceDictionary>
</Window.Resources>
<Grid>
<Border x:Name="AnimatedBorder" Panel.ZIndex="10" BorderBrush="DodgerBlue" BorderThickness="5" Visibility="{Binding AnimatedBorderVisibility}">
<Border.Effect>
<BlurEffect Radius="10" />
</Border.Effect>
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation AutoReverse="True" Storyboard.TargetProperty="Opacity" From="0.2" To="1.0" Duration="0:0:2.5" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
<Border BorderBrush="DodgerBlue" BorderThickness="1">
<Grid Margin="20">
<Grid.RowDefinitions>

View file

@ -36,14 +36,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
public bool ShowProgressBar
{
set
{
Dispatcher.Invoke(() =>
{
model.AnimatedBorderVisibility = value ? Visibility.Hidden : Visibility.Visible;
model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden;
});
}
set => Dispatcher.Invoke(() => model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden);
}
public bool TopMost
@ -151,7 +144,6 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
model = new RuntimeWindowViewModel(LogTextBlock);
AnimatedBorder.DataContext = model;
ProgressBar.DataContext = model;
StatusTextBlock.DataContext = model;

View file

@ -18,21 +18,8 @@ namespace SafeExamBrowser.UserInterface.Mobile.ViewModels
{
internal class RuntimeWindowViewModel : ProgressIndicatorViewModel
{
private Visibility animatedBorderVisibility, progressBarVisibility;
private TextBlock textBlock;
public Visibility AnimatedBorderVisibility
{
get
{
return animatedBorderVisibility;
}
set
{
animatedBorderVisibility = value;
OnPropertyChanged(nameof(AnimatedBorderVisibility));
}
}
private Visibility progressBarVisibility;
private readonly TextBlock textBlock;
public Visibility ProgressBarVisibility
{

View file

@ -15,24 +15,6 @@
</ResourceDictionary>
</Window.Resources>
<Grid>
<Border x:Name="AnimatedBorder" Panel.ZIndex="10" BorderBrush="DodgerBlue" BorderThickness="5" Visibility="{Binding AnimatedBorderVisibility}">
<Border.Effect>
<BlurEffect Radius="10" />
</Border.Effect>
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation AutoReverse="True" Storyboard.TargetProperty="Opacity" From="0.2" To="1.0" Duration="0:0:2.5" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
<Border BorderBrush="DodgerBlue" BorderThickness="1">
<Grid Margin="20">
<Grid.RowDefinitions>

View file

@ -36,14 +36,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
public bool ShowProgressBar
{
set
{
Dispatcher.Invoke(() =>
{
model.AnimatedBorderVisibility = value ? Visibility.Hidden : Visibility.Visible;
model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden;
});
}
set => Dispatcher.Invoke(() => model.ProgressBarVisibility = value ? Visibility.Visible : Visibility.Hidden);
}
public bool TopMost
@ -151,7 +144,6 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
model = new RuntimeWindowViewModel(LogTextBlock);
AnimatedBorder.DataContext = model;
ProgressBar.DataContext = model;
StatusTextBlock.DataContext = model;