示例#1
0
        private void LoadXamlForWpf()
        {
            try
            {
                var visualTree = new WpfLoader().FromString(Xaml);

                var window = GetVisualizerWindow(visualTree);
                window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                window.DataContext           = new TestViewModel();
                window.Show();
            }
            catch (LoadException e)
            {
                ShowProblemLoadingError(e);
            }
        }
示例#2
0
        protected object LoadXaml(string xamlContent)
        {
            var p = new WpfLoader();

            return(LoadMixin.FromString(p, xamlContent));
        }
 protected object LoadXaml(string xamlContent)
 {
     var p = new WpfLoader();
     return LoadMixin.FromString(p, xamlContent);
 }