开发者

DataGridTextColumn namespace found in silverlight MainPage xaml code behind, but not found in silverlight library

I'm successfully using DataGridTextColumn in a silverlightapp main page code behind.

This works:

using System.Windows.Controls; 
namespace myNamespace
{
    public partial class MainPage
    {
        <snip>
        private DataGridTextColumn CreateTextColumn(...)
        {
            DataGridTextColumn column = new DataGridTextColumn();
            <snip>
        }
    }
}

I want to move the method to a static class in a silverlight library

using System.Windows.Controls;

namespace myNamespace
{
    public static class DataGridBuilder
    {

        private static DataGridTextColumn CreateTextColumn(...)
        {
            DataGridTextColumn column = new DataGridTextColumn();
        }
     }
}

Intellisense is not seeing a definition for DataGridTextColumn, and it won't compile e开发者_如何学编程ither. I have a reference to System.Windows.Controls in both projects. MSDN says I have the right namespace. What am I missing? NOTE: class name light blue coloring in non-working code section is put there by StackOverflow, not intellisense.


The assembly is System.Windows.Controls.Data while the namespace is System.Windows.Controls.

Do you have a reference to System.Windows.Controls.Data?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜