Example #1
0
        public UserControl1()
        {
            InitializeComponent();
            DataContext = new XmlFileViewModel();

            // http://stackoverflow.com/questions/6250240/how-to-add-a-scrollbar-to-a-stackpanel
            ScrollViewer sv = new ScrollViewer();
            StackPanel sp = new StackPanel();
            sv.Content = sp;
            this.Content = sv;
            foreach (XmlNode i in ((XmlFileViewModel)DataContext).XmlFile.xdoc.ChildNodes)
            {
                NestedControlPlacement(sp, i);
            }
        }
 public UpdateXmlFileCommand(XmlFileViewModel viewModel)
 {
     this.viewModel = viewModel;
 }