You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
569 B
18 lines
569 B
using System;
|
|
|
|
namespace Microsoft.Windows.Controls.PropertyGrid.Attributes
|
|
{
|
|
public class ItemsSourceAttribute : Attribute
|
|
{
|
|
public Type Type { get; set; }
|
|
|
|
public ItemsSourceAttribute(Type type)
|
|
{
|
|
var valueSourceInterface = type.GetInterface("Microsoft.Windows.Controls.PropertyGrid.Attributes.IItemsSource");
|
|
if (valueSourceInterface == null)
|
|
throw new ArgumentException("Type must implement the IItemsSource interface.", "type");
|
|
|
|
Type = type;
|
|
}
|
|
}
|
|
}
|