Skip to content

Commit 08d4616

Browse files
committed
Enhance TemplateBase<T> with new props and documentation
Added properties for tooltip, symbol, and various [Parameter] options (Onliner, IsReadOnly, HideLabel, Unit, Format) to TemplateBase<T>. Introduced or documented protected properties LastValue and Value. Included XML documentation and System.Globalization usage for culture-aware formatting. These changes improve configurability and code clarity.
1 parent b3cfb69 commit 08d4616

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ namespace AXSharp.Presentation.Blazor.Controls.Templates
1515
{
1616
public abstract class TemplateBase<T> : RenderableComponentBase
1717
{
18+
/// <summary>
19+
/// Gets the tooltip or human readable name of the Onliner.
20+
/// </summary>
1821
protected string ToolTipOrHumanReadable => string.IsNullOrEmpty(Onliner.AttributeToolTip)
1922
? Onliner.GetHumanReadable(CultureInfo.CurrentUICulture)
2023
: Onliner.AttributeToolTip;
2124

25+
/// <summary>
26+
/// Gets the symbol of the Onliner.
27+
/// </summary>
2228
protected string Symbol => Onliner.Symbol;
2329

2430
private IJSObjectReference? module;
@@ -30,23 +36,44 @@ public IJSRuntime JSRuntime
3036
set;
3137
}
3238

39+
/// <summary>
40+
/// The Onliner associated with this template.
41+
/// </summary>
3342
[Parameter]
3443
public virtual OnlinerBase<T> Onliner { get; set; }
3544

45+
/// <summary>
46+
/// Indicates whether the control is read-only.
47+
/// </summary>
3648
[Parameter]
3749
public bool IsReadOnly { get; set; }
3850

51+
/// <summary>
52+
/// Indicates whether the label should be hidden.
53+
/// </summary>
3954
[Parameter]
4055
public bool HideLabel { get; set; } = false;
4156

57+
/// <summary>
58+
/// The unit of measurement for the value.
59+
/// </summary>
4260
[Parameter]
4361
public string? Unit { get; set; }
4462

63+
/// <summary>
64+
/// The format string for displaying the value.
65+
/// </summary>
4566
[Parameter]
4667
public string? Format { get; set; }
4768

69+
/// <summary>
70+
/// The last known value of the Onliner.
71+
/// </summary>
4872
protected T LastValue { get; set; }
4973

74+
/// <summary>
75+
/// Gets or sets the current value of the Onliner.
76+
/// </summary>
5077
protected T Value
5178
{
5279
get

0 commit comments

Comments
 (0)