合集-wpf
摘要:TextWrapping="Wrap" 不显示滚动条 ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"
阅读全文
摘要://view和viewmodel绑定 DataContext = LogViewModel.Instance; //指具体绑定对象
阅读全文
摘要:https://learn.microsoft.com/zh-cn/dotnet/core/porting/
阅读全文
摘要:<Viewbox Stretch="Fill"> 布局内容 </Viewbox>
阅读全文
摘要:Invoke是同步更新,会阻塞所在工作者线程,而BeginInvoke是异步更新,不会阻塞当前线程
阅读全文
摘要:拖放通常指一种数据传输的方法:使用鼠标(或类似其他设备)选择一个或多个对象,将其拖至用户界面(UI)中的目标位置 1.拖放操作通常涉及两个参与方 *拖动对象、拖放目标 *拖动对象和拖放目标可能是相同应用程序或不同应用程序中的UI元素 *在 Internet 区域中 OLE 拖放无效 *拖放属于广义的
阅读全文
摘要:1.创建拖放对象 1.1创建一个圆自定义控件,UI代码如下(Circle.xaml): <UserControl x:Class="WpfApp1.Circle" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xm
阅读全文
摘要:private System.Threading.Mutex mutex; public App() { this.Startup += new StartupEventHandler(App_Startup); } private void App_Startup(object sender, S
阅读全文
摘要:类继承INotifyPropertyChanged接口,然后把List的类型改为ObservableCollection 如下 private ObservableCollection<string> reagentNameList = new ObservableCollection<string
阅读全文
摘要:WindowState="Maximized" //窗口最大化 WindowStyle="None" //不使用wpf自带标题栏
阅读全文
摘要:找不到字典时设置如下 <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Themes/1.xaml"/> <ResourceDictionary Source="/The
阅读全文
摘要:textbox中UpdateSourceTrigger=PropertyChanged,设置此属性后,输入非零整数无问题,输入小数有问题, 更改为UpdateSourceTrigger=LostFocus后,输入小数无问题
阅读全文