سؤال

I have a Class in my main WPF application which has a Property defined in the class as follows:

Public Class AppExample
    Public PropertyName As CollectionViewSource

The project solution also inherits a Class Library (separate project but included in the solution and using the Inherits statement) - in the Class Library I want to do the same thing but I get an error.

Public Class ClassLibraryExample
    Public PropertyName as CollectionViewSource

this results in:

Type 'CollectionViewSource' is not defined

How do I fix this?

هل كانت مفيدة؟

المحلول

Add the refernce of PresentationFramework.dll to your class library. It has namespace System.Windows.Data which contains CollectionViewSource

نصائح أخرى

When you are using CollectionViewSource you have to use Data namespace(System.Windows.Data).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top