Slider control issue

Haviv Elbsz 2,071 Reputation points
2022-11-12T22:25:23.883+00:00

Hi all

How to define a vertical slider.

Thank you

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,206 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,623 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2022-11-13T10:23:25.927+00:00

    The wpf slider control has an orientation property you can set to vertical

    https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.slider?view=windowsdesktop-7.0

    0 comments No comments

  2. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 38,906 Reputation points Microsoft Vendor
    2022-11-16T02:30:00.67+00:00

    Hello,

    On MAUI platform, you could modify the value of Rotation property to 90 or -90 of Slider to make it vertical.

       <Slider x:Name="sldCameraZoomValue"  Maximum="500.0" Minimum="10.0"  
               VerticalOptions="Center" HorizontalOptions="FillAndExpand" Margin="0" Rotation="-90" />  
     
    

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments