Struct EventDispatcherGate
Gates control when the dispatcher processes events.
Syntax
public struct EventDispatcherGate : IDisposable, IEquatable<EventDispatcherGate>
Examples
Here is an example of using a gate:
public class MyElement : VisualElement
{
void Foo()
{
using (new EventDispatcherGate(dispatcher))
{
// do something that sends events
}
}
}
Constructors
EventDispatcherGate(EventDispatcher)
Declaration
public EventDispatcherGate(EventDispatcher d)
Parameters
Type |
Name |
Description |
EventDispatcher |
d |
The dispatcher controlled by this gate.
|
Methods
Dispose()
Implementation of IDisposable.Dispose. Opens the gate. If all gates are open, events in the queue are processed.
Declaration
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Equals(EventDispatcherGate)
Declaration
public bool Equals(EventDispatcherGate other)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Operators
Equality(EventDispatcherGate, EventDispatcherGate)
Declaration
public static bool operator ==(EventDispatcherGate left, EventDispatcherGate right)
Parameters
Returns
Inequality(EventDispatcherGate, EventDispatcherGate)
Declaration
public static bool operator !=(EventDispatcherGate left, EventDispatcherGate right)
Parameters
Returns