Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
This example shows how to create a ScrollBar.
Example
The following example creates a horizontal ScrollBar.
hscrollb = new ScrollBar();
hscrollb.Orientation = Orientation.Horizontal;
spanel2.Children.Add(hscrollb);
The following example creates a vertical ScrollBar.
vscrollb = new ScrollBar();
vscrollb.Orientation = Orientation.Vertical;
vscrollb.HorizontalAlignment = HorizontalAlignment.Left;
vscrollb.Width = (20);
vscrollb.Height = (80);
Canvas.SetLeft(vscrollb, (50));
spanel2.Children.Add(vscrollb);
For the complete sample, which shows how to create several controls and includes a horizontal and vertical ScrollBar, see Creating Controls Sample.