All the controls missing in WPF. Over 1 million downloads.
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.

37 lines
946 B

using System;
using System.Linq;
using System.Collections.ObjectModel;
namespace Microsoft.Windows.Controls.PropertyGrid
{
public class EditorDefinitionCollection : ObservableCollection<EditorDefinition>
{
public EditorDefinition this[string propertyName]
{
get
{
foreach (var item in Items)
{
if (item.PropertiesDefinitions.Where(x => x.Name == propertyName).Any())
return item;
}
return null;
}
}
public EditorDefinition this[Type targetType]
{
get
{
foreach (var item in Items)
{
if (item.TargetType == targetType)
return item;
}
return null;
}
}
}
}