WPF
hx_windy
这个作者很懒,什么都没留下…
展开
-
后台cs 设置DataGrid样式 new style
private void DataGrid_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e){ Style style = this.Resources["cellStyle"] as Style; //Style cellStyle = new Style(typeof(Da...原创 2020-04-08 15:46:49 · 237 阅读 · 0 评论 -
Action的一个使用场景
多个父界面local 另一界面,子界面中的点击事件需要调用父界面中的查询函数,不同的父中的查询函数不一样。父1 ocal 子界面,子界面则调用父1的查询函数;父2 local子界面,子界面则调用父2的查询函数GridEmbedControl.xaml<Grid> <Viewbox Stretch="Fill"> <Border Wi...原创 2019-11-01 10:47:39 · 266 阅读 · 0 评论 -
WPF auto 与 *
使用自动尺寸设置方式,可使用Auto值。表示自动适应显示内容的宽度, 如文本需要多长,控件就显示多长.如果存在显示不全的问题,就会截断显示。<RowDefinition Height="Auto"></RowDefinition>按比例尺寸设置方式,需要使用星号(*)<RowDefinition Height="*"></RowDefiniti...原创 2019-07-02 16:33:06 · 797 阅读 · 0 评论 -
引用与命名空间
xmlns:local="clr-namespace:Geoway.GDC.Viewer.Frame" 该xaml文件同在Geoway.GDC.Viewer.Frame空间中,需引用同一空间中其他文件<Grid Grid.Row="0" Name="Data_Drill"> <local:DataContent_Drill></ss:Dat...原创 2019-07-29 11:29:54 · 140 阅读 · 0 评论 -
WPF TextBox 添加Enter事件与数据双向绑定的问题
键盘按下Enter键时触发事件。TextBox虽然双向绑定到CurrentPageNumber,但是Enter事件触发时,此时焦点还在textbox上时,后台CurrentPageNumber 的值仍未动态更新(双向绑定未触发)。解决办法Text="{Binding CurrentPageNumber, UpdateSourceTrigger=PropertyChanged}" ,Enter事件触...原创 2019-07-24 10:57:24 · 4671 阅读 · 2 评论