12 2024 档案
ContentControl的精彩使用
摘要:先看效果 在WPF中ContentControl的Content属性是object,预示着它可以绑定任何类型,不管是View还是ViewModel都可以。 我们先看正确的代码 <Window.Resources> <DataTemplate DataType="{x:Type viewModel:U
我的思想天马行空1
摘要:1、WPF MarkupExtension的学习 public class StudentList: ObservableCollection<Student> { public StudentList() { Add(new Student() { Id=1,Name="张三"}); Add(ne