[解决]] WPF工具包网格控制问题 [英] [Solve]]WPF Toolkit Grid Control issue

查看:77
本文介绍了[解决]] WPF工具包网格控制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑
我找到了解决方法
这是WPFToolkit版本的问题
我只是更新版本并解决问题
完成

感谢您阅读我的问题





如果我将Grid的 SelectioMode 属性设置为 Single ,并设置所有列的 Width 属性,则标题看起来不正确.每个标题列的高度更改为非常小的尺寸,例如约10个像素.

如果我删除了具有最高 Width 的列的 Width 属性,那么它看起来还可以


我的代码是

Edit
I found solution
It was issue of WPFToolkit version
I just update version and problem solve
done

Thanks for reading my question





if I set Grid''s SelectioMode Property to Single and set Width property of all columns then header is not look proper. Height of each header column is changed to very small say approx 10 pixel.

if I remove Width property of column which having highest Width then it looks OK


My code is

<dg:datagrid name="GridControl" itemssource="{Binding ElementName=WindowPartyMaster1, Path=PartyMasterTable}" xmlns:dg="#unknown">
                 IsReadOnly="True" AutoGenerateColumns="False"  GridLinesVisibility="Vertical" SelectionMode="Single" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" SelectionChanged="GridControl_SelectionChanged" FontFamily="Verdana">
                <dg:datagrid.columns>
                    <dg:datagridtextcolumn binding="{Binding CompanyId}" header="Company Id" width="60" />
                    <dg:datagridtextcolumn binding="{Binding CompanyName}" header="Company Name" width="200" />
                </dg:datagrid.columns>
            </dg:datagrid>


有人遇到这样的问题吗?

如果您因为我的英语而不懂,请发表评论
在此先感谢


:-D


Anybody face issue like this ?

if you don''t understand because of my English, please comment
Thanks in advance


:-D

推荐答案

也许您可以尝试在每个列标题上设置边距.
Maybe you could try setting a margin on each of the column headers.


这篇关于[解决]] WPF工具包网格控制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆