public FileOperationDialog()
{
this.DataContext = this;
Contents = new ObservableCollection<FileOperation>();
Contents.CollectionChanged += Contents_CollectionChanged;
InitializeComponent();
var Name = Environment.OSVersion.Version.ToString().StartsWith("6.1") ? "Windows 7" : "Windows 8";
Background = Name == "Windows 7" ? Brushes.WhiteSmoke : Brushes.White;
//Background = Theme.Background;
//ensure win32 handle is created
var handle = new WindowInteropHelper(this).EnsureHandle();
//set window background
/*var result =*/
SetClassLong(handle, GCL_HBRBACKGROUND, GetSysColorBrush(COLOR_WINDOW));
if (!IsShown)
{
if (LoadTimer == null)
{
LoadTimer = new DispatcherTimer();
LoadTimer.Interval = TimeSpan.FromMilliseconds(1500);
LoadTimer.Tick += LoadTimer_Tick;
LoadTimer.Start();
}
}
}