mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
e388c018dc
The exit animations on errors were not firing if the datacontext was what changed. Adding a middleman property fixed the issue. Probably a bit hacky
29 lines
955 B
C#
29 lines
955 B
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using Wabbajack.Lib;
|
|
|
|
namespace Wabbajack
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for FilePicker.xaml
|
|
/// </summary>
|
|
public partial class FilePicker : UserControl
|
|
{
|
|
// This exists, as utilizing the datacontext directly seemed to bug out the exit animations
|
|
// "Bouncing" off this property seems to fix it, though. Could perhaps be done other ways.
|
|
public FilePickerVM PickerVM
|
|
{
|
|
get => (FilePickerVM)GetValue(PickerVMProperty);
|
|
set => SetValue(PickerVMProperty, value);
|
|
}
|
|
public static readonly DependencyProperty PickerVMProperty = DependencyProperty.Register(nameof(PickerVM), typeof(FilePickerVM), typeof(FilePicker),
|
|
new FrameworkPropertyMetadata(default(FilePickerVM)));
|
|
|
|
public FilePicker()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
}
|
|
}
|