This repository was archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPlaceableScrollbarScrollViewer.cs
More file actions
44 lines (33 loc) · 1.56 KB
/
PlaceableScrollbarScrollViewer.cs
File metadata and controls
44 lines (33 loc) · 1.56 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
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace CustomControlLibrary
{
public class PlaceableScrollbarScrollViewer : ScrollViewer
{
static PlaceableScrollbarScrollViewer()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(PlaceableScrollbarScrollViewer), new FrameworkPropertyMetadata(typeof(PlaceableScrollbarScrollViewer)));
}
public Dock VerticalScrollbarPlacement
{
get { return (Dock)GetValue(VerticalScrollbarPlacementProperty); }
set { SetValue(VerticalScrollbarPlacementProperty, value); }
}
// Using a DependencyProperty as the backing store for VerticalScrollbarPlacement. This enables animation, styling, binding, etc...
public static readonly DependencyProperty VerticalScrollbarPlacementProperty =
DependencyProperty.Register("VerticalScrollbarPlacement", typeof(Dock), typeof(PlaceableScrollbarScrollViewer), new PropertyMetadata(Dock.Right));
public Dock HorizontalScrollbarPlacement
{
get { return (Dock)GetValue(HorizontalScrollbarPlacementProperty); }
set { SetValue(HorizontalScrollbarPlacementProperty, value); }
}
// Using a DependencyProperty as the backing store for HorizontalScrollbarPlacement. This enables animation, styling, binding, etc...
public static readonly DependencyProperty HorizontalScrollbarPlacementProperty =
DependencyProperty.Register("HorizontalScrollbarPlacement", typeof(Dock), typeof(PlaceableScrollbarScrollViewer), new PropertyMetadata(Dock.Bottom));
}
}