需求背景 需要显示 ViewModel 中的 Message/DpMessage,显示内容根据其某些属性来确定.代码结构抽象如下: // Model public class Message : INotifyPropertyChanged { public string MSG; public string Stack; } // ViewModel public class MessageViewModel : INotifyPropertyChanged { public Message
今天运行在windows平板上的程序,有个功能是弹出子窗体,点弹出窗体的关闭按钮,要点好几次才能触发.网上找了找,也有人与我类似的情形. 解决方法如下: public static void DisableWPFTabletSupport() { // Get a collection of the tablet devices for this window. TabletDeviceCollection devices = System.Windows.Input.Tablet.Tablet