Exemplo n.º 1
0
        private void LoadXamlForWpf()
        {
            try
            {
                var localLoader = new WpfXamlLoader();

                var window = (Window)localLoader.Load(Xaml);
                window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                window.DataContext = new TestViewModel();
                window.Show();

            }
            catch (Exception e)
            {
                ShowProblemLoadingError(e);
            }
        }
Exemplo n.º 2
0
        private void LoadXamlForWpf()
        {
            try
            {
                var visualTree = new WpfXamlLoader().Load(Xaml);

                var window = GetVisualizerWindow(visualTree);
                window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                window.DataContext = new TestViewModel();
                window.Show();

            }
            catch (XamlLoadException e)
            {
                ShowProblemLoadingError(e);
            }
        }
Exemplo n.º 3
0
 protected GivenAXamlXmlLoader()
 {
     Loader = new WpfXamlLoader();
 }