Skip to content

Commit

Permalink
Add windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Apr 20, 2024
1 parent 64dce34 commit 6889e7a
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using WGrid = Microsoft.UI.Xaml.Controls.Grid;
using WVisibility = Microsoft.UI.Xaml.Visibility;
using WFrameworkElement = Microsoft.UI.Xaml.FrameworkElement;
using WScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility;
using Microsoft.Maui.Platform;
using Microsoft.UI.Xaml;

Expand Down Expand Up @@ -164,4 +165,26 @@ void UpdateEmptyView()

UpdateEmptyViewVisibility();
}

void UpdateVerticalScrollbarVisibility(ScrollBarVisibility scrollBarVisibility)
{
scrollViewer.VerticalScrollBarVisibility = scrollBarVisibility switch
{
ScrollBarVisibility.Default => WScrollBarVisibility.Auto,
ScrollBarVisibility.Always => WScrollBarVisibility.Visible,
ScrollBarVisibility.Never => WScrollBarVisibility.Hidden,
_ => WScrollBarVisibility.Auto
};
}

void UpdateHorizontalScrollbarVisibility(ScrollBarVisibility scrollBarVisibility)
{
scrollViewer.HorizontalScrollBarVisibility = scrollBarVisibility switch
{
ScrollBarVisibility.Default => WScrollBarVisibility.Auto,
ScrollBarVisibility.Always => WScrollBarVisibility.Visible,
ScrollBarVisibility.Never => WScrollBarVisibility.Hidden,
_ => WScrollBarVisibility.Auto
};
}
}

0 comments on commit 6889e7a

Please sign in to comment.