-
- MarioBarbero
- Posts: 30
- Joined:
Equivalent to Dispatcher in Noesis
Hello
I want yo do a Dispatcher en Noesis but I dont know what it is the equivalent. This Dispatcher code is worng when execute it in Unity.
How can I do that for Unity?
I want yo do a Dispatcher en Noesis but I dont know what it is the equivalent. This Dispatcher code is worng when execute it in Unity.
How can I do that for Unity?
Code: Select all
public string Password
{
get { return (string)GetValue(PasswordProperty); }
set { SetValue(PasswordProperty, value); }
}
public static readonly DependencyProperty PasswordProperty =
DependencyProperty.Register(nameof(Password), typeof(string), typeof(PasswordBoxControl), new PropertyMetadata(default(string), OnPasswordChanged));
private static void OnPasswordChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = (PasswordBoxControl)d;
PasswordBox p = control.FindName("passwordControl") as PasswordBox;
//Set the delay of 800ms to give time to the PasswordChanged event of the PasswordBoxRevealBehavior behavior
Task.Delay(800).ContinueWith(t =>
{
Application.Current.Dispatcher.Invoke(() =>
{
if (p.Password != e.NewValue?.ToString())
p.Password = e.NewValue?.ToString();
});
});
}Re: Equivalent to Dispatcher in Noesis
Yes, our Views inherit from DispatcherObject. In fact, any framework object inherits from it and can be used to access the Dispatcher.
Could you try that?
Could you try that?
-
- MarioBarbero
- Posts: 30
- Joined:
Re: Equivalent to Dispatcher in Noesis
Yes, that is work.
Thank you very much
Thank you very much
Who is online
Users browsing this forum: No registered users and 5 guests