-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.xml
More file actions
37 lines (34 loc) · 1.25 KB
/
main.xml
File metadata and controls
37 lines (34 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<Window MinHeight="10" MinWidth="25" >
<Panel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<TextEditor VerticalAlignment="Top" HorizontalAlignment="Left"
Height="10" Width="25"
>public delegate void ScrollBarValueChangedEventHandler(object sender, ScrollBarValueChanged args);
// Auxiliary control only displaying the scroll bar.
public class ScrollBar : Control {
public static RoutedEvent ScrollBarValueChangedEvent =
EventManager.RegisterRoutedEvent("ScrollBarValueChanged", RoutingStrategy.Bubble,
typeof(ScrollBarValueChangedEventHandler), typeof(ScrollBar));
private Orientation orientation = Orientation.Horizontal;
public Orientation Orientation {
get => orientation;
set {
if (orientation != value) {
orientation = value;
Invalidate();
}
}
}
private int value = 0;
public int Value {
get => value;
set {
if (value != this.value) {
this.value = Math.Min(maxValue, value);
Invalidate();
}
}
}
}</TextEditor>
<!--<ScrollBar Width="25" Height="1" Value="99"></ScrollBar>-->
</Panel>
</Window>