作者:lipei0927 | 来源:互联网 | 2023-09-24 12:15
问题各位WPF高手,我在我的前台页面中绑定了datagrid的样式,但是不论怎么改,行数据都无法居中,请问是什么原因啊?难道是设置冲突?1、页面前提xaml代码ViewCode1
问题
各位WPF高手,我在我的前台页面中绑定了datagrid的样式,但是不论怎么改,行数据都无法居中,请问是什么原因啊?难道是设置冲突?
1、页面前提xaml代码
View Code
1 "-6,0,0,0" Background="#CEEDC4" >
2 "True" color: #800000;">"{StaticResource dataGridStyle}" Cellcolor: #800000;">"{StaticResource dataGridCellStyle}" Rowcolor: #800000;">"{StaticResource dataGridRowStyle}" AlternatingRowBackground="#d7e6d9" 490" HorizOntalAlignment="Center" Name="dataGrid1" VerticalAlignment="Top" Margin="6,31,0,0" 780" RowHeadercolor: #800000;">"{StaticResource dataGridRowHeaderStyle}" ColumnHeadercolor: #800000;">"{StaticResource dataGridColumnStyle}">
3
4 "">
5
6
7 "cbCheck" Checked="CheckBox_Checked" >
8
9
10
11
12 "团号" Min120" Binding="{Binding Path=GroupNum}"/>
13
14 "国籍" Min70" Binding="{Binding Path=NationalityName}" />
15 "计划/实际人数" Min100" Binding="{Binding Path=Reserved1}" />
16 "预计入境时间" Min120" Binding="{Binding Path=Intime}"/>
17 "预计出境时间" Min120" Binding="{Binding Path=Outtime}"/>
18 "入境航次" Min70" Binding="{Binding Path=InairlineNum}"/>
19 "出境航次" Min70" Binding="{Binding Path=Outairlinenum}"/>
20 "状态" *" Binding="{Binding Path=Reserved3}" Min80"/>
21
22 2、app.xaml样式代码
View Code
1
2
16
17
18
21
22
30
31
51
52
53
68
69
最佳回答
使用模版列把