JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › ScrollBar › Blazor usage › Reply To: Blazor usage
July 16, 2021 at 9:46 am
#102060
admin
Keymaster
Example with Scrollbar that changes DIV tag using Smart.Blazor 9.4.15
Here is a sample built with Smart.Blazor 9.4.15
@page "/"<Example Name="ScrollBar"> <ScrollBar @ref="scrollbar" OnChange="ChangeHandler"></ScrollBar> <div style="@scrollStyle"> Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here Some text content here </div></Example>@code { ScrollBar scrollbar; string scrollStyle = "overflow: auto; width: 100px; height:100px;"; private void ChangeHandler(Event args) { ScrollBarChangeEventDetail detail = args["Detail"] as ScrollBarChangeEventDetail; scrollStyle = "overflow: auto; width: " + detail.Value + "px; height: " + detail.Value + "px;"; Console.WriteLine(detail.OldValue + "/" + detail.Value); }}
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/