private void InitializeRenderResource() { if (isInitialized || renderResource == null || UriSource == null) { return; } renderResource.Initialize(UriSource.ResolveAbsoluteUri(BaseUri), SourceRect); isInitialized = true; }
private void CreateRenderImageSource() { if (renderImageSource != null || UriSource == null) { return; } renderImageSource = ApplicationHost.Current.RenderImageSourceFactory.CreateRenderImageSource(UriSource.ResolveAbsoluteUri(BaseUri), SourceRect); renderImageSource.StateChanged += (sender, e) => SetRenderImageState(renderImageSource.State); SetRenderImageState(renderImageSource.State); }