Ejemplo n.º 1
0
        private void CreateAndShowContent()
        {
            Dispatcher = Dispatcher.CurrentDispatcher;
            VisualTargetPresentationSource source =
                new VisualTargetPresentationSource(HostVisual);

            _sync.Set();
            source.RootVisual = _createContent();
            DesiredSize       = source.DesiredSize;
            _invalidateMeasure();

            Dispatcher.Run();
            source.Dispose();
        }
Ejemplo n.º 2
0
            private void CreateAndShowContent()
            {
                if (Dispatcher == null)
                {
                    Dispatcher = Dispatcher.CurrentDispatcher;
                }

                VisualTargetPresentationSource source = new VisualTargetPresentationSource(HostVisual);

                _sync.Set();
                _content          = _createContent();
                source.RootVisual = _content;
                _invalidateMeasure();

                if (!_usingExternalDispatcher)
                {
                    Dispatcher.Run();
                }

                source.Dispose();
            }