37 lines
971 B
C#
37 lines
971 B
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace HandyControl.Controls
|
|
{
|
|
public sealed class GrowlWindow : Window
|
|
{
|
|
internal Panel GrowlPanel { get; set; }
|
|
|
|
internal GrowlWindow()
|
|
{
|
|
WindowStyle = WindowStyle.None;
|
|
AllowsTransparency = true;
|
|
|
|
GrowlPanel = new StackPanel
|
|
{
|
|
VerticalAlignment = VerticalAlignment.Top,
|
|
Margin = new Thickness(0, 10, 10, 10)
|
|
};
|
|
|
|
Content = new ScrollViewer
|
|
{
|
|
VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
|
|
IsEnableInertia = true,
|
|
Content = GrowlPanel
|
|
};
|
|
}
|
|
|
|
internal void Init()
|
|
{
|
|
var desktopWorkingArea = SystemParameters.WorkArea;
|
|
Height = desktopWorkingArea.Height;
|
|
Left = desktopWorkingArea.Right - Width;
|
|
Top = 0;
|
|
}
|
|
}
|
|
} |