Ejemplo n.º 1
0
        /// <summary>
        /// Occurs when the items collection changes.
        /// </summary>
        protected virtual async Task CollectionChangedAsync(NotifyCollectionChangedEventArgs e)
        {
            if (renderHandle.IsInitialized)
            {
                if (renderHandle.Dispatcher.CheckAccess())
                {
                    RenderItems();
                }
                else
                {
                    await renderHandle.Dispatcher.InvokeAsync(RenderItems);
                }
            }

            await CollectionChanged.InvokeAsync(e);
        }