Skip to content

Commit 8f536e1

Browse files
csharpfritzCopilot
andcommitted
feat: ToolTip base class, ValidationSummary comma fix, SkinID type fix
- Move ToolTip parameter to BaseStyledComponent (fixes 28+ controls) - Fix ValidationSummary comma-split data corruption bug - Change SkinID from bool to string (matches Web Forms) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7d0c04d commit 8f536e1

11 files changed

Lines changed: 10 additions & 30 deletions

src/BlazorWebFormsComponents/BaseStyledComponent.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public abstract class BaseStyledComponent : BaseWebFormsComponent, IStyle
3333
[Parameter]
3434
public FontInfo Font { get; set; } = new FontInfo();
3535

36+
[Parameter]
37+
public string ToolTip { get; set; }
38+
3639
protected string Style => this.ToStyle().Build().NullIfEmpty();
3740
}
3841
}

src/BlazorWebFormsComponents/BaseWebFormsComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void ParentWrappingBuildRenderTree(RenderTreeBuilder builder)
9898
/// 🚨🚨 Theming is not available in Blazor 🚨🚨
9999
/// </summary>
100100
[Parameter, Obsolete("Theming is not available in Blazor")]
101-
public bool SkinID { get; set; }
101+
public string SkinID { get; set; }
102102

103103
#endregion
104104

src/BlazorWebFormsComponents/Button.razor.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,5 @@ public partial class Button : ButtonBaseComponent
1515
[Parameter, Obsolete("In Blazor this behaves the same whether activated or not")]
1616
public bool UseSubmitBehavior { get; set; }
1717

18-
[Parameter]
19-
public string ToolTip { get; set; }
20-
2118
}
2219
}

src/BlazorWebFormsComponents/Calendar.razor.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ public DateTime VisibleDate
185185
[Parameter]
186186
public int CellSpacing { get; set; } = 0;
187187

188-
/// <summary>
189-
/// Tooltip text.
190-
/// </summary>
191-
[Parameter]
192-
public string ToolTip { get; set; }
193-
194188
// Legacy CSS string style properties (backward compatible)
195189
#pragma warning disable CS0618
196190
[Parameter]

src/BlazorWebFormsComponents/DataList.razor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public partial class DataList<ItemType> : DataBoundComponent<ItemType>, IDataLis
4444
[Parameter] public bool ShowHeader { get; set; } = true;
4545
[Parameter] public bool ShowFooter { get; set; } = true;
4646
[Parameter] public new string Style { get; set; }
47-
[Parameter] public string ToolTip { get; set; }
4847
[Parameter] public bool UseAccessibleHeader { get; set; } = false;
4948
[Parameter]
5049
public EventCallback<DataListItemEventArgs> OnItemDataBound { get; set; }

src/BlazorWebFormsComponents/FileUpload.razor.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,6 @@ public PostedFileWrapper PostedFile
115115
[Parameter]
116116
public long MaxFileSize { get; set; } = 512000; // ~500 KiB default
117117

118-
/// <summary>
119-
/// Gets or sets the tooltip text displayed when hovering over the control.
120-
/// </summary>
121-
[Parameter]
122-
public string ToolTip { get; set; }
123-
124118
/// <summary>
125119
/// Event raised when a file is selected.
126120
/// </summary>

src/BlazorWebFormsComponents/HyperLink.razor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ public string NavigationUrl
2121
[Parameter]
2222
public string Text { get; set; }
2323

24-
[Parameter] public string ToolTip { get; set; }
2524
}
2625
}

src/BlazorWebFormsComponents/Image.razor.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ public partial class Image : BaseStyledComponent, IImageComponent
1818
[Parameter]
1919
public string ImageUrl { get; set; }
2020

21-
[Parameter]
22-
public string ToolTip { get; set; }
23-
2421
[Parameter]
2522
public bool GenerateEmptyAlternateText { get; set; }
2623
}

src/BlazorWebFormsComponents/ImageButton.razor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,5 @@ public partial class ImageButton : ButtonBaseComponent, IImageComponent
1717
[Parameter]
1818
public string ImageUrl { get; set; }
1919

20-
[Parameter]
21-
public string ToolTip { get; set; }
2220
}
2321
}

src/BlazorWebFormsComponents/ImageMap.razor.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ public partial class ImageMap : BaseStyledComponent, IImageComponent
3636
[Parameter]
3737
public string ImageUrl { get; set; } = string.Empty;
3838

39-
/// <summary>
40-
/// Gets or sets the ToolTip text for the ImageMap control.
41-
/// </summary>
42-
[Parameter]
43-
public string ToolTip { get; set; } = string.Empty;
44-
4539
/// <summary>
4640
/// Gets or sets the default behavior for the HotSpot objects in the ImageMap control when the HotSpot objects are clicked.
4741
/// </summary>

0 commit comments

Comments
 (0)