Hello,
Does anyone know how to do this? I want to draw verticle lines that
will sit on top of all other windows. Preferably I would do this in
c#.
using System;
using System.Windows;
using System.Windows. Controls;
using System.Windows. Media;
using System.Windows. Shapes;
namespace PopupIndicator
{
public static class Program
{
[STAThread]
public static int Main()
{
new Application().R un(new PopupWindow());
return 0;
}
public class PopupWindow : Window
{
public PopupWindow()
{
var stack = new StackPanel {Orientation = Orientation.Hor izontal};
Content = stack;
WindowStyle = WindowStyle.Non e;
AllowsTranspare ncy = true;
Background = Brushes.Transpa rent;
SizeToContent = SizeToContent.W idthAndHeight;
for(int a = 0; a < 10; a++)
{
var rectangle = new Rectangle {Width = 5, Height = 25, Fill = Brushes.Lime,
Stroke = Brushes.Green};
if(a 0)
rectangle.Margi n = new Thickness(5, 0, 0, 0);
stack.Children. Add(rectangle);
}
}
}
}
}
(H) Serge