Beispiel #1
0
        private void InitializeRenderResource()
        {
            if (isInitialized || renderResource == null || UriSource == null)
            {
                return;
            }

            renderResource.Initialize(UriSource.ResolveAbsoluteUri(BaseUri), SourceRect);
            isInitialized = true;
        }
Beispiel #2
0
        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);
        }