Description
The OnPropertyDirty
method is a member of the RenderOptions
class in the Sandbox namespace. This method is used to handle changes to properties within the RenderOptions
class. When a property is marked as dirty, indicating that its value has changed, this method is invoked to perform any necessary updates or actions in response to the change.
Usage
To use the OnPropertyDirty
method, you need to have an instance of the RenderOptions
class. This method is typically called internally when a property within the RenderOptions
class is modified. It is not intended to be called directly by user code.
The method takes a single parameter, p
, which is a reference to a WrappedPropertySet<T>
object. This parameter represents the property that has been marked as dirty.
Example
// Example of how OnPropertyDirty might be used internally
public class CustomRenderOptions : RenderOptions
{
public void UpdateProperty()
{
// Assume some property has changed
WrappedPropertySet<bool> propertySet = new WrappedPropertySet<bool>();
// Mark the property as dirty
OnPropertyDirty(ref propertySet);
}
}