且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在C#中将DataTemplate添加到特定的GridView Column单元格

更新时间:2023-10-12 11:12:58

在上面的代码中查看.

As you look at your code above.

您能看到多少?

如果您使人们难以接受,那么获得良好答案的机会就会降低.

If you make it hard for people then your chance of getting a good answer is lower.

如果人们怀疑您在问题上没有花太多力气,那么他们很有可能会认为回答这个问题将很艰辛.

If people suspect you've not put much effort into your question then there's a fair chance they will assume it will be hard work answering it.

只有MSFT可以付费.

Only MSFT are paid to do so.

.

我要说的第一件事是,在代码中构建UI应该是您选择的绝对最后的选择.

The first thing I would say is that building UI in code should be the absolute last option you choose.

这比xaml或将xaml构建为字符串或选择模板等要困难得多.

It's way harder to do than xaml or building xaml as strings or selecting templates etc.

发件人:

https://msdn.microsoft.com/zh-cn/library/system.windows.frameworkelementfactory(v = vs.110).aspx

https://msdn.microsoft.com/en-us/library/system.windows.frameworkelementfactory(v=vs.110).aspx

"