Here we see how to create WPF ScrollViewer
control in xaml and also explains various property of the ScrollViewer control
The ScrollViewer control Represents a
scrollable area that can contain other visible elements. The ScrollViewer
control that can allow you to scroll, either horizontally, or vertically or in
both directions. Suppose an image which has the large size and Image control
alone would not be sufficient to display the content of the picture. only part
of it would be visible in the UI. To see the entire image you need a control
that can allow you to scroll, either horizontally, or vertically or in both
Creating ScrollViewer control in XAML
The Width and Height
attributes represent the width and the height of a ScrollViewer. The Control can
be uniquely identified by Name attribute represents the name of the control.
Important property - The below property are the important property of the
HorizontalScrollBarVisibility - This
property is used to indicates whether a horizontal ScrollBar should be
VerticalScrollBarVisibility - This
property is used to indicates whether a Vertical ScrollBar should be displayed.
Width - Gets or sets the width of a
Height - Gets or sets the height of a
Foreground - This property is used to
describes the foreground color.
ScrollViewer control and an Image control in xaml.
Now run the application.
Image after scrolling horizontally and