Exemplo n.º 1
0
        /// <summary>
        /// Initialise the dispatcher
        /// </summary>
        public void Initialize()
        {
            if (Window.Current != null)
            {
                this.dispatcher = Windows.UI.Xaml.Window.Current.Dispatcher;
            }

            DispatchHelper.Initialise(this);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Forces the raising of the CanExecute Changed event
        /// </summary>
        public void RaiseCanExecuteChanged()
        {
            var threadSafeCopy = this.CanExecuteChanged;

            if (threadSafeCopy != null)
            {
                DispatchHelper.InvokeOnUIThread(() => threadSafeCopy.Invoke(this, EventArgs.Empty));
            }
        }