blob: 3c580070f94d5c933af87c2eaf74a1e070f923c3 (
plain)
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
|
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
namespace WindowsPlatform.MainToolbar
{
/// <summary>
/// Interaction logic for DottedSeparator.xaml
/// </summary>
public partial class DottedSeparator : UserControl
{
public DottedSeparator()
{
InitializeComponent();
SizeChanged += ModifyPoints;
}
void ModifyPoints(object sender, SizeChangedEventArgs args)
{
DotPanel.Children.Clear();
for (int i = 0; i < args.NewSize.Height; i+=2)
{
DotPanel.Children.Add(new Ellipse
{
Fill = Foreground,
Stroke = Foreground,
HorizontalAlignment = HorizontalAlignment.Center,
Width = 1,
Height = 1,
StrokeThickness = 1,
Margin = new Thickness (0, 0, 0, 1),
});
}
}
}
}
|