Path: redb/redb.PropsEditor/Attributes/PropsDisplayAttribute.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.PropsEditor/Attributes/PropsDisplayAttribute.cs
----
namespace redb.PropsEditor.Attributes;
///
/// Specifies display settings for a property in PropsEditor.
///
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class PropsDisplayAttribute : Attribute
{
///
/// Display label for the property.
///
public string? Label { get; set; }
///
/// Placeholder text for input fields.
///
public string? Placeholder { get; set; }
///
/// Description/help text shown below the field.
///
public string? Description { get; set; }
///
/// Display order within the group.
///
public int Order { get; set; }
public PropsDisplayAttribute() { }
public PropsDisplayAttribute(string label)
{
Label = label;
}
}
///
/// Renders the property as a multiline text area.
///
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class PropsTextAreaAttribute : Attribute
{
///
/// Number of rows for the text area.
///
public int Rows { get; set; } = 4;
public PropsTextAreaAttribute() { }
public PropsTextAreaAttribute(int rows)
{
Rows = rows;
}
}
///
/// Hides the property from the editor.
///
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class PropsHiddenAttribute : Attribute { }
///
/// Groups properties together in a collapsible section.
///
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class PropsGroupAttribute : Attribute
{
///
/// Name of the group.
///
public string GroupName { get; set; }
///
/// Whether the group is collapsed by default.
///
public bool Collapsed { get; set; }
public PropsGroupAttribute(string groupName)
{
GroupName = groupName;
}
}
///
/// Marks the property as read-only in the editor.
///
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class PropsReadOnlyAttribute : Attribute { }