问题
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