using System.Linq;
using System.Windows.Forms;
using UserControl = System.Windows.Controls.UserControl;
namespace ResourceViewer
{
///
/// Interaction logic for PropertyGrid.xaml
///
public partial class PropertyGrid : UserControl
{
public PropertyGrid()
{
InitializeComponent();
}
///
/// Display or hide help panel
///
public bool HelpVisible
{
get { return this.ResourcePropertyGrid.HelpVisible; }
set { this.ResourcePropertyGrid.HelpVisible = value; }
}
///
/// Fake Select Object Inheritance
///
public object[] SelectedObjects
{
get { return this.ResourcePropertyGrid.SelectedObjects; }
set { this.ResourcePropertyGrid.SelectedObjects = value; }
}
///
/// Provide an event to be called when some of the property value changed
///
/// the handler to be added
public void RegisterPropertyValueChangedEventHandler(PropertyValueChangedEventHandler eventHandler)
{
this.ResourcePropertyGrid.PropertyValueChanged += eventHandler;
}
///
/// Provide an event to be called when some of the property value changed
///
/// the handler to be removed
public void UnregisterPropertyValueChangedEventHandler(PropertyValueChangedEventHandler eventHandler)
{
this.ResourcePropertyGrid.PropertyValueChanged -= eventHandler;
}
}
}