I have this App.xaml.cs
code in my WPF project:
public partial class App : Application
{
public static bool IsInitialized
{
get;
private set;
}
public static async Task Initialize()
{
// Mark application as initialized
IsInitialized = true;
}
}
Main window of my application should be disabled (IsEnabled
== False
) while App.IsInitialized
flag is not set, so window gets enabled when Initialize()
finished.
How to achieve this?
Tried to use this XAML:
IsEnabled="{Binding App.IsInitialized, Mode=TwoWay}"