In my WPF project I've done with clicking some UI element such stuff:
void vb1_click(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
DispatcherTimer dt = new DispatcherTimer();
dt.Interval = new TimeSpan(0, 0, 0, 0, 1000);
dt.Tick += new System.EventHandler(dt_Tick);
dt.Start();
}
void dt_Tick(object sender, System.EventArgs e)
{
for(int i = 0; i < 20; i++)
{
this.vb2_blur_eff.Radius = (double)i;
}
}
The main problem is: "I can't see the each step of blur-effect per second. The program is idling and when the process is complete it gives me the final step of bluring the UI element.
I don't want it, cause both program idling is looking ugly and I want actually see the rendered result at the each period.