-
Notifications
You must be signed in to change notification settings - Fork 3
PropertyList.ExperimentalPropertyList
Back to home | Back to Reference | View raw text
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi.PropertyList
SolidShineUi.PropertyList.ExperimentalPropertyList[[ExperimentalPropertyList]]
end
subgraph System.Windows.Markup
System.Windows.Markup.IComponentConnector[[IComponentConnector]]
end
subgraph System.Windows.Controls
System.Windows.Controls.UserControl[[UserControl]]
end
System.Windows.Markup.IComponentConnector --> SolidShineUi.PropertyList.ExperimentalPropertyList
System.Windows.Controls.UserControl --> SolidShineUi.PropertyList.ExperimentalPropertyList
Type | Name | Methods |
---|---|---|
Brush |
ButtonClickBrush Get or set the brush for the buttons on the toolbar when they are being clicked. |
get, set |
Brush |
ButtonHighlightBorderBrush Get or set the brush for the borders of the buttons on the toolbar, when the buttons are being highlighted or clicked. (The buttons display no border when not focused.) |
get, set |
Brush |
ButtonHighlightBrush Get or set the brush for the buttons on the toolbar when they are highlighted (i.e. mouse over or keyboard focus). |
get, set |
ColorScheme |
ColorScheme Get or set the color scheme to apply to the control. The color scheme can quickly apply a whole visual style to your control. |
get, set |
object |
Content Get the internal contents of this PropertyList control. |
get, set |
PropertyListDisplayFlags |
DisplayOptions Get or set the settings for what properties should be displayed in the PropertyList. |
get, set |
string |
FilterBoxToolTip Get or set the label to display in a tool-tip when the Filter text box has focus or mouse over. |
get, set |
Brush |
GridlineBrush Get or set the brush of the gridlines in the control. Use ExperimentalPropertyList.ShowGridlines to actually display the gridlines. |
get, set |
Brush |
HeaderBackground Get or set the brush for the background of the column headers. |
get, set |
Brush |
HeaderDividerBrush Get or set the brush for the dividers between the column headers. |
get, set |
Brush |
HeaderForeground Get or set the brush for the foreground of the column headers. |
get, set |
string |
NameHeaderLabel Get or set the label to display in the column header for the Name column. |
get, set |
string |
ObjectDisplayName Get or set the string used to name the object being observed. The PropertyList will try to set this automatically via looking at the Name property, or otherwise you can set a custom name to display. |
get, set |
ReadOnlyDictionary <Type , Type > |
RegisteredPropertyEditors Get a list of editors currently registered for each property type. |
get |
bool |
ShowFilterBox Get or set if the Filter textbox should be visible at the top of the PropertyList control. |
get, set |
bool |
ShowGridlines Get or set if gridlines are visible between the properties in the control. |
get, set |
bool |
ShowInheritedProperties Get or set if inherited properties (properties not defined directly in the observed object's type) are visible in the PropertyList. |
get, set |
bool |
ShowNameDisplay Get or set if the name display text is displayed at the top of the PropertyList control. |
get, set |
bool |
ShowReadOnlyProperties Get or set if inherited properties (properties not defined directly in the observed object's type) are visible in the PropertyList. |
get, set |
bool |
ShowReloadButton Get or set if the Reload button should be visible at the top of the PropertyList control. |
get, set |
bool |
ShowTypeDisplay Get or set if the type display text should be visible at the top of the PropertyList control. |
get, set |
bool |
ShowViewMenu Get or set if the View and Sort menu button should be visible at the top of the PropertyList control. |
get, set |
PropertySortOption |
SortOption Get or set how the list of properties are sorted in the PropertyList. |
get, set |
Brush |
ToolbarBackground Get or set the brush for the background of the toolbar near the top of the control. |
get, set |
Brush |
TopPanelBackground Get or set the brush for the background of the top panel of the control (where the name and type are displayed). |
get, set |
Brush |
TopPanelForeground Get or set the brush for the foreground of the top panel of the control (where the name and type are displayed). |
get, set |
string |
TypeHeaderLabel Get or set the label to display in the column header for the Type column. |
get, set |
string |
TypeLabel Get or set the label to display next to the object's type at the top of the control. |
get, set |
string |
ValueHeaderLabel Get or set the label to display in the column header for the Value column. |
get, set |
string |
ViewMenuLabel Get or set the label to display in the View menu in the toolbar. |
get, set |
Returns | Name |
---|---|
void |
ApplyColorScheme (ColorScheme cs)Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control. |
void |
Clear ()Unload the currently observed object, so that nothing is observed. |
IPropertyEditor |
CreateEditorForType (Type propType)Create a new IPropertyEditor object appropriate for the passed-in type. This is based upon what types are registered in this PropertyList control. |
void |
FilterProperties (string filter)Change the text used to filter the list of properties. Applying a filter text will hide any properties that don't contain this text (or its type doesn't contain this text). |
object |
GetCurrentlyLoadedObject ()Get the object that is currently being observed in this PropertyList. |
void |
InitializeComponent ()InitializeComponent |
void |
LoadObject (object o)Set the object to observe. All properties of the observed object will be displayed in the ExperimentalPropertyList, alongside the values of these properties. |
void |
RegisterEditor (Type type, Type editor)Register an editor for a certain property type. When the control loads an object with a property of this type, the registered editor will be used to view and edit it. |
void |
ReloadObject (... )Reload the properties and values from the currently observed object. |
bool |
UnregisterEditor (Type type)Unregister the editor for a certain type. |
Returns | Name |
---|---|
Delegate |
_CreateDelegate (Type delegateType, string handler) |
Returns | Name |
---|---|
string |
PrettifyPropertyType (Type type, bool fullName)Get a slightly cleaned up and more human-readable name of a type. |
IComponentConnector
UserControl
public ExperimentalPropertyList()
Create a PropertyList.
public void ApplyColorScheme(ColorScheme cs)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The color scheme to apply. |
Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.
public object GetCurrentlyLoadedObject()
Get the object that is currently being observed in this PropertyList.
public void ReloadObject()
Reload the properties and values from the currently observed object.
public void ReloadObject(bool resetViewSettings)
Type | Name | Description |
---|---|---|
bool |
resetViewSettings | Set if the filter and view settings should be reset when the object is reloaded. |
Reload the properties and values from the currently observed object, with the option to reset filter and view settings if desired.
public void Clear()
Unload the currently observed object, so that nothing is observed.
This clears out the UI and resets internal properties; however, this does not need to be run before loading in another object.
public void LoadObject(object o)
Type | Name | Description |
---|---|---|
object |
o | The object to load and observe. |
Set the object to observe. All properties of the observed object will be displayed in the ExperimentalPropertyList, alongside the values of these properties.
Note that if the object has a property called "Name", that name will be displayed at the top of the ExperimentalPropertyList control. If this object doesn't have a Name property, or you want to set a different name, please use the ExperimentalPropertyList.ObjectDisplayName property.
public void FilterProperties(string filter)
Type | Name | Description |
---|---|---|
string |
filter | The filter text to apply. Use null or an empty string to not apply a filter. Start the string with "@" to only filter by property name only (not name or type). |
Change the text used to filter the list of properties. Applying a filter text will hide any properties that don't contain this text (or its type doesn't contain this text).
public void RegisterEditor(Type type, Type editor)
Type | Name | Description |
---|---|---|
Type |
type | The type to register the editor for. |
Type |
editor | The type of the IPropertyEditor control that will handle viewing and editing type . |
Register an editor for a certain property type. When the control loads an object with a property of this type, the registered editor will be used to view and edit it.
If a different editor is already registered for a certain type, this will replace that registration and the control will use this editor instead.
Name | Description |
---|---|
ArgumentException | Thrown if the editor type does not inherit the IPropertyEditor interface. |
public bool UnregisterEditor(Type type)
Type | Name | Description |
---|---|---|
Type |
type | The property type to unregister the editor of. (For example, enter in typeof(string) , not typeof(StringEditor) ). |
Unregister the editor for a certain type.
Returns true on success. Returns false if the editor couldn't be unregistered, or there was no editor registered to begin with.
public IPropertyEditor CreateEditorForType(Type propType)
Type | Name | Description |
---|---|---|
Type |
propType | The type for which to get a IPropertyEditor for. |
Create a new IPropertyEditor object appropriate for the passed-in type. This is based upon what types are registered in this PropertyList control.
public static string PrettifyPropertyType(Type type, bool fullName)
Type | Name | Description |
---|---|---|
Type |
type | The type to get the name of. |
bool |
fullName | Determine if the full name (including namespaces) should be returned or just the type's own name |
Get a slightly cleaned up and more human-readable name of a type.
public virtual void InitializeComponent()
InitializeComponent
internal Delegate _CreateDelegate(Type delegateType, string handler)
Type | Name | Description |
---|---|---|
Type |
delegateType | |
string |
handler |
public object Content { get; set; }
Get the internal contents of this PropertyList control.
To load in an object into the PropertyList, please use the ExperimentalPropertyList.LoadObject(System.Object) function instead. It is highly unrecommended to access and modify the internal contents of the PropertyList control in this way, but it is possible.
public ColorScheme ColorScheme { get; set; }
Get or set the color scheme to apply to the control. The color scheme can quickly apply a whole visual style to your control.
public string ObjectDisplayName { get; set; }
Get or set the string used to name the object being observed. The PropertyList will try to set this automatically via looking at the Name property, or otherwise you can set a custom name to display.
public string TypeLabel { get; set; }
Get or set the label to display next to the object's type at the top of the control.
You can hide the entire type label and display by setting ExperimentalPropertyList.ShowTypeDisplay to false.
public string ViewMenuLabel { get; set; }
Get or set the label to display in the View menu in the toolbar.
public string NameHeaderLabel { get; set; }
Get or set the label to display in the column header for the Name column.
public string TypeHeaderLabel { get; set; }
Get or set the label to display in the column header for the Type column.
public string ValueHeaderLabel { get; set; }
Get or set the label to display in the column header for the Value column.
public string FilterBoxToolTip { get; set; }
Get or set the label to display in a tool-tip when the Filter text box has focus or mouse over.
public PropertySortOption SortOption { get; set; }
Get or set how the list of properties are sorted in the PropertyList.
If this setting is changed, you will need to reload the object ( ExperimentalPropertyList.ReloadObject ) or load a new object to apply that change.
public PropertyListDisplayFlags DisplayOptions { get; set; }
Get or set the settings for what properties should be displayed in the PropertyList.
When loading in an object, the attributes for each property in that object are looked at. If a property has an attribute that matches what a flag disallows, that property is not loaded. If this setting is changed, you will need to reload the object ( ExperimentalPropertyList.ReloadObject ) or load a new object to apply that change.
public bool ShowInheritedProperties { get; set; }
Get or set if inherited properties (properties not defined directly in the observed object's type) are visible in the PropertyList.
public bool ShowReadOnlyProperties { get; set; }
Get or set if inherited properties (properties not defined directly in the observed object's type) are visible in the PropertyList.
public ReadOnlyDictionary<Type, Type> RegisteredPropertyEditors { get; }
Get a list of editors currently registered for each property type.
The key of the dictionary is a property type. The corresponding value is the type of the editor that will handle viewing and editing that type.
public bool ShowNameDisplay { get; set; }
Get or set if the name display text is displayed at the top of the PropertyList control.
PropertyList tries to load the name of a control by looking at its Name
property; otherwise, you can also custom set a name via the ExperimentalPropertyList.ObjectDisplayName property.
public bool ShowTypeDisplay { get; set; }
Get or set if the type display text should be visible at the top of the PropertyList control.
public bool ShowFilterBox { get; set; }
Get or set if the Filter textbox should be visible at the top of the PropertyList control.
public bool ShowReloadButton { get; set; }
Get or set if the Reload button should be visible at the top of the PropertyList control.
public bool ShowViewMenu { get; set; }
Get or set if the View and Sort menu button should be visible at the top of the PropertyList control.
public bool ShowGridlines { get; set; }
Get or set if gridlines are visible between the properties in the control.
public Brush GridlineBrush { get; set; }
Get or set the brush of the gridlines in the control. Use ExperimentalPropertyList.ShowGridlines to actually display the gridlines.
public Brush HeaderBackground { get; set; }
Get or set the brush for the background of the column headers.
public Brush HeaderForeground { get; set; }
Get or set the brush for the foreground of the column headers.
public Brush ToolbarBackground { get; set; }
Get or set the brush for the background of the toolbar near the top of the control.
public Brush ButtonHighlightBrush { get; set; }
Get or set the brush for the buttons on the toolbar when they are highlighted (i.e. mouse over or keyboard focus).
public Brush ButtonClickBrush { get; set; }
Get or set the brush for the buttons on the toolbar when they are being clicked.
public Brush ButtonHighlightBorderBrush { get; set; }
Get or set the brush for the borders of the buttons on the toolbar, when the buttons are being highlighted or clicked. (The buttons display no border when not focused.)
public Brush TopPanelBackground { get; set; }
Get or set the brush for the background of the top panel of the control (where the name and type are displayed).
public Brush TopPanelForeground { get; set; }
Get or set the brush for the foreground of the top panel of the control (where the name and type are displayed).
public Brush HeaderDividerBrush { get; set; }
Get or set the brush for the dividers between the column headers.
public event PropertyValueChangedEventHandler PropertyValueChanged
Raised when the value of a property has changed via a property editor. This refers to the properties of the object currently being observed by the PropertyList control.
public event PropertyListObjectEventHandler LoadedObjectChanged
Raised when the currently loaded/observed object in the PropertyList control changes.
This is also raised when the ReloadObject
public event DependencyPropertyChangedEventHandler ColorSchemeChanged
Raised when the ColorScheme property is changed.
internal event EventHandler GridlinePropertyChanged
public delegate void PropertyValueChangedEventHandler(object sender, PropertyValueChangedEventArgs e)
Type | Name | Description |
---|---|---|
object |
sender | |
PropertyValueChangedEventArgs |
e |
public delegate void PropertyListObjectEventHandler(object sender, PropertyListObjectEventArgs e)
Type | Name | Description |
---|---|---|
object |
sender | |
PropertyListObjectEventArgs |
e |
Generated with ModularDoc