Dreamine.UI.Wpf.Controls 1.0.1
Dreamine.UI.Wpf.Controls 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
DreamineDataGrid.cs
이 파일의 문서화 페이지로 가기
1using System.Windows;
2using System.Windows.Controls;
3
5{
14 public class DreamineDataGrid : DataGrid
15 {
33 {
34 DefaultStyleKeyProperty.OverrideMetadata(typeof(DreamineDataGrid),
35 new FrameworkPropertyMetadata(typeof(DreamineDataGrid)));
36
37 var uri = new Uri("/Dreamine.UI.Wpf.Themes;component/DreamineDataGridStyle.xaml", UriKind.RelativeOrAbsolute);
38
39 if (Application.Current != null)
40 {
41 bool alreadyAdded = Application.Current.Resources.MergedDictionaries
42 .OfType<ResourceDictionary>()
43 .Any(x => x.Source != null && x.Source.Equals(uri));
44
45 if (!alreadyAdded)
46 {
47 var dict = new ResourceDictionary { Source = uri };
48 Application.Current.Resources.MergedDictionaries.Add(dict);
49 }
50 }
51 }
52 }
53}