XAMDataGrid column template

会有一股神秘感。 提交于 2019-12-12 01:45:14

问题


i have to show Text and Graphical status in one(same) column of the XAMDataGrid. can please someone suggest me template for this.


回答1:


There are two ways you can accomplish this. The first is to use a Style targeting the CellValuePresenter where you change the Template. If you are not editing the values, this is the recommended approach and there is an example in the Embedding a Custom Control in a Field help topic.

The second way to do this is to create a custom ValueEditor which is better if you need to allow editing. You may be able to use the ControlHostEditor that Andrew Smith provides in the sample in his Hosting WPF Controls in a XamDataGrid Cell blog post.



来源:https://stackoverflow.com/questions/19836856/xamdatagrid-column-template

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!