Example #1
0
 protected ElementContainer()
 {
     Child = new HostVisual();
     PresentationSource.AddSourceChangedHandler(this, OnPresentationSourceChanged);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HostedPresentationSource"/> class.
 /// </summary>
 /// <param name="host">The host.</param>
 public HostedPresentationSource(HostVisual host) => HostConnector = new VisualTarget(host);
Example #3
0
 public VisualTargetPresentationSource(HostVisual hostVisual)
 {
     _visualTarget = new VisualTarget(hostVisual);
 }
 private void CreateContentHelper()
 {
     _threadedHelper = new ThreadedVisualHelper(CreateContent, SafeInvalidateMeasure);
     _hostVisual     = _threadedHelper.HostVisual;
 }
Example #5
0
 private void CreateContentHelper()
 {
     _threadedHelper = new ThreadedVisualHelper(CreateContent, SafeInvalidateMeasure, _dispatcher);
     _hostVisual     = _threadedHelper.HostVisual;
     AddVisualChild(_hostVisual);
 }
Example #6
0
 public VisualTarget(HostVisual hostVisual)
 {
     _visualTarget = new System.Windows.Media.VisualTarget(hostVisual);
 }
 public VisualTargetPresentationSource(HostVisual hostVisual)
 {
     this.visualTarget = new VisualTarget(hostVisual);
     AddSource();
 }
Example #8
0
 public AsyncBox()
 {
     _hostVisual       = new HostVisual();
     _contentPresenter = new ContentPresenter();
     Loaded           += OnLoaded;
 }
Example #9
0
 public AsyncUISource(HostVisual hostVisual)
 {
     _visualTarget = new VisualTarget(hostVisual);
 }
Example #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VisualSource"/> class.</summary>
        /// <param name="hostVisual">
        /// The <see cref="HostVisual"/> that is the target of the presentation.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="hostVisual"/> is a null reference.</exception>
        /// <remarks>
        /// The specified <paramref name="hostVisual"/> may reside on a different thread than the
        /// <see cref="VisualSource"/> and its <see cref="RootVisual"/>. The necessary cross-thread
        /// marshalling is performed by the <see cref="VisualTarget"/> that is returned by <see
        /// cref="GetCompositionTargetCore"/>.</remarks>

        public VisualSource(HostVisual hostVisual)
        {
            // VisualTarget constructor performs null check
            _visualTarget = new VisualTarget(hostVisual);
        }