init
This commit is contained in:
28
DataPRO/CustomWindow/WindowCloseButton.cs
Normal file
28
DataPRO/CustomWindow/WindowCloseButton.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CustomWindow
|
||||
{
|
||||
public class WindowCloseButton : WindowButton
|
||||
{
|
||||
|
||||
public WindowCloseButton()
|
||||
{
|
||||
// open resource where in XAML are defined some required stuff such as icons and colors
|
||||
var resourceStream = Application.GetResourceStream(new Uri("pack://application:,,,/CustomWindow;component/ButtonIcons.xaml")).Stream;
|
||||
var resourceDictionary = (ResourceDictionary)XamlReader.Load(resourceStream);
|
||||
|
||||
// set icon
|
||||
Content = resourceDictionary["WindowButtonCloseIcon"];
|
||||
ContentDisabled = resourceDictionary["WindowButtonCloseIconDisabled"];
|
||||
|
||||
// radius
|
||||
//this.CornerRadius = new CornerRadius(0, 0, 3, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user