DispatcherTimer.IsEnabled Property
.NET Framework 3.0
Gets or sets whether the timer is running.
Namespace: System.Windows.Threading
Assembly: WindowsBase (in windowsbase.dll)
Assembly: WindowsBase (in windowsbase.dll)
/** @property */ public boolean get_IsEnabled () /** @property */ public void set_IsEnabled (boolean value)
public function get IsEnabled () : boolean public function set IsEnabled (value : boolean)
This property is not typically used in XAML.
<object IsEnabled="bool" .../>
Property Value
true if this timer is enabled; otherwise, false. The default value is false.The following example creates a DispatcherTimer. A new DispatcherTimer object named dispatcherTimer is created. The event handler dispatcherTimer_Tick is added to the Tick event. The Interval is set to one second using a TimeSpan object.
// DispatcherTimer setup dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0,0,1); dispatcherTimer.Start();
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Show: