首先在xaml中创建集合是一个不可取的方法. 本方法仅作为xaml的学习. 本文略微无聊,主要是编写的东西都是老玩意. 首先是定义一个类,作为你要加载集合的模型. 结构如下 internal class Student { public string Name { get; set; } public int Age { get; set; } } internal class StudentList:List<Student> { } class StringCollect { public…
原文:WPF中动态加载XAML中的控件 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; usin…