|
|
|
@ -0,0 +1,97 @@ |
|
|
|
|
@page "/compohorizontalscroll" |
|
|
|
|
|
|
|
|
|
@rendermode RenderMode.InteractiveServer |
|
|
|
|
|
|
|
|
|
<h3>HorizontalScroll</h3> |
|
|
|
|
<FluentDivider class="mt-1 mb-3" Role="DividerRole.Separator" /> |
|
|
|
|
<div> |
|
|
|
|
The <code>FluentHorizontalScroll</code> wraps a web component of a <code>horizontal scroller</code>. |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="mt-4">Default</h4> |
|
|
|
|
<FluentCard Class="mt-3" Width="auto" Height="auto" AreaRestricted="false"> |
|
|
|
|
<FluentHorizontalScroll Speed="600" |
|
|
|
|
Easing="ScrollEasing.EaseInOut" |
|
|
|
|
@onscrollstart="OnEScrollStart" |
|
|
|
|
@onscrollend="OnEScrollStart"> |
|
|
|
|
<FluentCard> |
|
|
|
|
Card number 1 |
|
|
|
|
<FluentButton Appearance="Appearance.Neutral">A button</FluentButton> |
|
|
|
|
</FluentCard> |
|
|
|
|
<FluentCard>Card number 2</FluentCard> |
|
|
|
|
<FluentCard>Card number 3</FluentCard> |
|
|
|
|
<FluentCard>Card number 4</FluentCard> |
|
|
|
|
<FluentCard>Card number 5</FluentCard> |
|
|
|
|
<FluentCard>Card number 6</FluentCard> |
|
|
|
|
<FluentCard>Card number 7</FluentCard> |
|
|
|
|
<FluentCard>Card number 8</FluentCard> |
|
|
|
|
<FluentCard>Card number 9</FluentCard> |
|
|
|
|
<FluentCard>Card number 10</FluentCard> |
|
|
|
|
<FluentCard>Card number 11</FluentCard> |
|
|
|
|
<FluentCard>Card number 12</FluentCard> |
|
|
|
|
<FluentCard>Card number 13</FluentCard> |
|
|
|
|
<FluentCard>Card number 14</FluentCard> |
|
|
|
|
<FluentCard>Card number 15</FluentCard> |
|
|
|
|
<FluentCard>Card number 16</FluentCard> |
|
|
|
|
</FluentHorizontalScroll> |
|
|
|
|
<p><b>Message</b>: @emessage?.ToString()</p> |
|
|
|
|
</FluentCard> |
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
.full-width, |
|
|
|
|
.full-width fluent-card { |
|
|
|
|
width: 300px; |
|
|
|
|
height: 150px; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
<h4 class="mt-4">Full width cards</h4> |
|
|
|
|
<FluentCard Class="mt-3" Width="auto" Height="auto" AreaRestricted="false"> |
|
|
|
|
<FluentHorizontalScroll Class="full-width" Speed="600" |
|
|
|
|
Easing="ScrollEasing.EaseInOut" |
|
|
|
|
@onscrollstart="OnFScrollStart" |
|
|
|
|
@onscrollend="OnFScrollStart"> |
|
|
|
|
<FluentCard>Card number 1</FluentCard> |
|
|
|
|
<FluentCard>Card number 2</FluentCard> |
|
|
|
|
<FluentCard>Card number 3</FluentCard> |
|
|
|
|
<FluentCard>Card number 4</FluentCard> |
|
|
|
|
<FluentCard>Card number 5</FluentCard> |
|
|
|
|
<FluentCard>Card number 6</FluentCard> |
|
|
|
|
<FluentCard>Card number 7</FluentCard> |
|
|
|
|
<FluentCard>Card number 8</FluentCard> |
|
|
|
|
<FluentCard>Card number 9</FluentCard> |
|
|
|
|
<FluentCard>Card number 10</FluentCard> |
|
|
|
|
<FluentCard>Card number 11</FluentCard> |
|
|
|
|
<FluentCard>Card number 12</FluentCard> |
|
|
|
|
<FluentCard>Card number 13</FluentCard> |
|
|
|
|
<FluentCard>Card number 14</FluentCard> |
|
|
|
|
<FluentCard>Card number 15</FluentCard> |
|
|
|
|
<FluentCard>Card number 16</FluentCard> |
|
|
|
|
</FluentHorizontalScroll> |
|
|
|
|
<p><b>Message</b>: @fmessage?.ToString()</p> |
|
|
|
|
</FluentCard> |
|
|
|
|
|
|
|
|
|
@code { |
|
|
|
|
string? emessage; |
|
|
|
|
void OnEScrollStart(HorizontalScrollEventArgs args) |
|
|
|
|
{ |
|
|
|
|
emessage = $"Scroll: {args.Scroll}"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OnEScrollEnd(HorizontalScrollEventArgs args) |
|
|
|
|
{ |
|
|
|
|
emessage = $"Scroll: {args.Scroll}"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
string? fmessage; |
|
|
|
|
void OnFScrollStart(HorizontalScrollEventArgs args) |
|
|
|
|
{ |
|
|
|
|
fmessage = $"Scroll: {args.Scroll}"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OnFScrollEnd(HorizontalScrollEventArgs args) |
|
|
|
|
{ |
|
|
|
|
fmessage = $"Scroll: {args.Scroll}"; |
|
|
|
|
} |
|
|
|
|
} |