随笔分类 - WPF
交互使用WPF常见套路
摘要:类型转换类: public class StringToHumanTypeConverter:TypeConverter { public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture,
阅读全文
摘要:1、关于枚举绑定combobox this.com.ItemsSource = Enum.GetValues(typeof(Student)); 其中student是枚举类型的数据; 参考链接:枚举绑定combobox 2、关于枚举绑定多个RadioButton 通用方法是使用数据转换的方式 参考链
阅读全文
摘要:<TextBlock.Text> <Binding Path="Title"> <Binding.RelativeSource> <RelativeSource Mode="FindAncestor" AncestorType="{x:Type Window}"></RelativeSource>
阅读全文
摘要:由于部分操作会直接导致树状图和嵌套使用的表格的数据结构发生较大的变化,需要进行全局刷新,这里全局刷新的基本方法 datagrid.itemsSource=null; datagrid.itemsSource=list; 现将数据源清空,再将数据重新赋值;
阅读全文
摘要:关于WPF实现方向绑定选中的要求 反向选择的相关要求 [ValueConversion(typeof(bool), typeof(bool))] public class InverseBooleanConverter : IValueConverter { #region IValueConver
阅读全文
摘要:参照链接内容 <i:Interaction.Triggers> <i:EventTrigger EventName="DropDownClosed"> <i:InvokeCommandAction Command="{Binding DataContent.GetFunctionCommand}"
阅读全文
摘要:[TypeConverter(typeof(HumanTypeConvert))] public class model { public string id { get; set; } public model Name { get; set; } } public class HumanType
阅读全文
摘要:添加事件: this.KeyDown += OnKeyDown;// /// /// Esc键按下,关闭当前窗口 /// /// /// private void OnKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Escape)/
阅读全文
摘要:关于ObservableCollection<T>内容上概述,数据结构子集数据变化,会引起UI层面的改变。 关于如何实现List等绑定,Model内含有ObservableCollection<T>数据数组的内容绑定,实现数据内容更新的关系;
阅读全文
摘要:原始链接:关于如何合并单元格 主要效果:本质上是对DataGridTemplateColumn的分割。 DataGrid内联集合,关于datagrid内容下拉框显式内容方面的内容 DataGrid下拉框内联集合内容
阅读全文
摘要:关于如何获取DataGrid内的单元格 DataGridRow rowContainer = (DataGridRow)dataGrid1.ItemContainerGenerator.ContainerFromIndex(rowIndex); DataGridCellsPresenter pres
阅读全文
摘要:简要介绍 目前为止最强WPF进阶教程WPF进阶教程 现阶段对部分概念依旧不怎么理解,但是此教程能跟着解决部分自制控件的问题 解决方案 <Window x:Class="WpfApp6.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006
阅读全文
摘要:System.Windows.Interop.WindowInteropHelper mainUI = new System.Windows.Interop.WindowInteropHelper(view); mainUI.Owner = System.Diagnostics.Process.Ge
阅读全文
摘要:非MVVM模式下的DataGrid数据的增删 MVVM方式获取
阅读全文
摘要:<ListBox x:Name="listMember" Height="30" Margin="0" ItemsSource="{Binding }" Grid.Row="3" Grid.Column="1" ScrollViewer.VerticalScrollBarVisibility="Di
阅读全文

浙公网安备 33010602011771号