摘要:1.在DataGrid中添加PreviewMouseWheel事件,并将事件的Handled属性设置为false,以便将滚动事件传递给ScrollViewer。示例代码如下: <DataGrid PreviewMouseWheel="DataGrid_PreviewMouseWheel"> <!--
阅读全文
摘要:普通的设置就直接套用官方文档即可 //创建字体 ExcelFont font1 = workbook.CreateFont(); //设置字体,字形,大小,颜色 font1.FontName = "宋体"; font1.IsBold = true; font1.Size = 10; font1.Kn
阅读全文
摘要:Spire.Xls.Workbook workbook = new Spire.Xls.Workbook(); workbook.LoadFromFile(@".\excle\text.xlsx"); Worksheet sheet = workbook.Worksheets[0]; IBorder
阅读全文
摘要:在datagrid节点下加入如下代码 <DataGridTemplateColumn Header="模版" MinWidth="50" x:Name="test"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox Sel
阅读全文
摘要:repositoryItem1.EditValueChanged += RepositoryItem1_EditValueChanged; private void RepositoryItem1_EditValueChanged(object sender, EventArgs e) { Mess
阅读全文
摘要:写起来和网页一样xaml类似css+html的组合,很多都可以进行拖拽什么的蛮爽的存在对接,xaml和.cs文件存在对接,.cs中可以用this.FindResource("name")来查找.xaml中定义的量和值特征类是啥using System.ComponentModel;[TypeConv
阅读全文
摘要:总是感觉和goto一样,有可能会出现死循环,但耐不住他方便(耦合upup 例如btGetData的一个click事件叫btGetData_Click(object sender,EvebtArg e) 这里sender是指调用事件的控件,e是参数 想要调用可以这样 btGetData_Click(t
阅读全文