摘要:
重写 用关键字 virtual 修饰的方法,叫虚方法。可以在子类中用override 声明同名的方法,这叫“重写”。相应的没有用virtual修饰的方法,我们叫它实方法。 重写会改变父类方法的功能。 public class C1 { public virtual string GetName() 阅读全文
摘要:
把元素绑定到一起 绑定到非元素对象 1.使用DataContext和Source两种绑定方式及对比: <StackPanel Margin="10" DataContext="{x:Static SystemFonts.IconFontFamily}"> <TextBlock Margin="5" 阅读全文