I have some code that executes and gets the return value of execution. I set this value to a dependency property of my window because there are style triggers bound to it. When the variable is 0 it uses the default style, when 1 a reddish style, and when 2 a greenish.
But i have to reset this style after a while in some practical way.
What is the easiest method to do this?
if (!Compiler.TryCompile(strText, Models[Model], EntryPoint.Text, out error))
{
output.Items.Add("Error compiling:");
output.Items.Add(error);
CompilationStatus = 1; // dependency property bound on ui
}
else {
output.Items.Add("Compilation successful!");
CompilationStatus = 2; // dependency property bound on ui
}
// should execute this after 5 seconds
CompilationStatus = 0; // dependency property bound on ui
WPF and .Net 4 is used in project. Thanks!!