I have a WPF application in VB in VSTS 2008 RTM. I am trying to
"blink" (momentarily clear) a field of data if the data is reloaded
from the database to give the user some visual indication of the LOAD
operation.
So on the LOAD button I clear the text fields, do
mainCanvas.Upda teLayout( ), and the reload the text field from the
database. But the text fields are not cleared long enough to see them
blink.
So I add a Thread.Sleep(20 0) before reloading the text fields. Still
no visual blink.
So I change the Sleep(200) to Sleep(2000), Still no visual blink.
So I attempt to add an Application.DoE vents so that the application
gets a chance to repaint the screen. But when I attempt to add the
"Imports System.Windows. Forms" for the DoEvents, the IDE says
"System.Windows .Forms doesn't contain any public member(s) or cannot
be found."
Apparently DoEvents can not be used in a WPF application because it is
not a Windows Forms.
OK, so how do I get WPF to visually "blink" some text fields in
response to a button push?
How do I replace the DoEvents functionality in a WPF application?
"blink" (momentarily clear) a field of data if the data is reloaded
from the database to give the user some visual indication of the LOAD
operation.
So on the LOAD button I clear the text fields, do
mainCanvas.Upda teLayout( ), and the reload the text field from the
database. But the text fields are not cleared long enough to see them
blink.
So I add a Thread.Sleep(20 0) before reloading the text fields. Still
no visual blink.
So I change the Sleep(200) to Sleep(2000), Still no visual blink.
So I attempt to add an Application.DoE vents so that the application
gets a chance to repaint the screen. But when I attempt to add the
"Imports System.Windows. Forms" for the DoEvents, the IDE says
"System.Windows .Forms doesn't contain any public member(s) or cannot
be found."
Apparently DoEvents can not be used in a WPF application because it is
not a Windows Forms.
OK, so how do I get WPF to visually "blink" some text fields in
response to a button push?
How do I replace the DoEvents functionality in a WPF application?
Comment