Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
XAML Slider Code Sample
WhatsApp
Mahesh Chand
6y
30.7k
0
6
100
Article
The XAML <Slider> element represents a slider control for WPF apps.
Slider element syntax: <Slider></Slider>
Similar to any other XAML element, Slider has common control properties. The Minimum and Maximum properties of Slider represent the minimum and maximum values of the slider range.
The following code snippet creates a Slider and sets its properties in XAML.
<
Slider
x:Name
=
"mcSlider"
Width
=
"300"
Height
=
"20"
Background
=
"Gray"
Maximum
=
"100"
Minimum
=
"0"
>
</
Slider
>
The IsFocused property indicates whether the slider control has the focus and the IsDirectionReversed property represents the direction of the increasing value. By default, the slider control sits on the UI in a horizontal direction. Using the Orientation property, a slider control can be placed vertically.
<
Slider
x:Name
=
"mcSlider"
Width
=
"30"
Height
=
"300"
Background
=
"Gray"
Maximum
=
"100"
Minimum
=
"0"
Orientation
=
"Vertical"
>
</
Slider
>
To avoid duplicate content, this article has move here :
WPF Slider Control Tutorial
WPF
XAML
XAML Slider
XAML Slider in WPF
Up Next
Ebook Download
View all
Programming XAML
Read by 12.3k people
Download Now!
Learn
View all
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.
Membership not found