问题描述:

Is it possible to add a class (or wlasses) to an existing library. I want to use an ItemTemplateSelector in Windows Phone development and I know how to implement it but can I add it to System.Windows.Controls rathe than add it separately?

网友答案:

You can do it by creating your component and re-use the namespace

namespace System.Windows.Control
{
   \\Put your code here
}

You will have a seperate dll, but it will belong to the same namespace.

However you should not do this. It is a bad practice to extend .Net Framework libraries and not recommended by Microsoft. The main reason for this is that changes in later version of the .Net Framework might collide with the changes.

相关阅读:
Top