async void OnOnItemAdded(RendererItem rendererItem) { LogHelper.Log("Found new rendererItem " + rendererItem.name() + " can render audio " + rendererItem.canRenderAudio() + " can render video " + rendererItem.canRenderVideo()); RendererItems.Add(rendererItem); await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, () => OnPropertyChanged(nameof(HasRenderer))); }
async void OnOnRendererItemDeleted(RendererItem rendererItem) { var match = RendererItems.FirstOrDefault(item => item.name().Equals(rendererItem.name())); if (match != null) { RendererItems.Remove(match); } if (IsRendererSet && !RendererItems.Any()) { DisconnectRenderer(); } await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, () => OnPropertyChanged(nameof(HasRenderer))); }