@@ -30,15 +30,43 @@ public enum ResizeDirection
3030 [ DllImport ( "user32.dll" , CharSet = CharSet . Auto ) ]
3131 public static extern IntPtr SendMessage ( IntPtr hWnd , uint Msg , IntPtr wParam , IntPtr lParam ) ;
3232
33+ public enum WindowTheme
34+ {
35+ Dark ,
36+ Light
37+ }
38+
39+ public string AppName
40+ {
41+ get { return ( string ) GetValue ( AppNameProperty ) ; }
42+ set { SetValue ( AppNameProperty , value ) ; }
43+ }
44+
45+ public static readonly DependencyProperty AppNameProperty = DependencyProperty . Register ( nameof ( AppName ) , typeof ( string ) , typeof ( PictureWindow ) , new FrameworkPropertyMetadata ( null , FrameworkPropertyMetadataOptions . Inherits ) ) ;
46+
47+ public WindowTheme Theme
48+ {
49+ get { return ( WindowTheme ) GetValue ( ThemeProperty ) ; }
50+ set { SetValue ( ThemeProperty , value ) ; }
51+ }
3352
53+ public static readonly DependencyProperty ThemeProperty = DependencyProperty . Register ( nameof ( Theme ) , typeof ( WindowTheme ) , typeof ( PictureWindow ) , new FrameworkPropertyMetadata ( WindowTheme . Dark , FrameworkPropertyMetadataOptions . Inherits ) ) ;
3454
35- public FrameworkElement TitleBar
55+ public bool IsTransparency
3656 {
37- get { return ( FrameworkElement ) GetValue ( TitleBarProperty ) ; }
38- set { SetValue ( TitleBarProperty , value ) ; }
57+ get { return ( bool ) GetValue ( IsTransparencyProperty ) ; }
58+ set { SetValue ( IsTransparencyProperty , value ) ; }
3959 }
4060
41- public static readonly DependencyProperty TitleBarProperty = DependencyProperty . Register ( nameof ( TitleBar ) , typeof ( FrameworkElement ) , typeof ( PictureWindow ) , new FrameworkPropertyMetadata ( null , FrameworkPropertyMetadataOptions . Inherits ) ) ;
61+ public static readonly DependencyProperty IsTransparencyProperty = DependencyProperty . Register ( nameof ( IsTransparency ) , typeof ( bool ) , typeof ( PictureWindow ) , new FrameworkPropertyMetadata ( true , FrameworkPropertyMetadataOptions . Inherits ) ) ;
62+
63+ public FrameworkElement TitleBarContent
64+ {
65+ get { return ( FrameworkElement ) GetValue ( TitleBarContentProperty ) ; }
66+ set { SetValue ( TitleBarContentProperty , value ) ; }
67+ }
68+
69+ public static readonly DependencyProperty TitleBarContentProperty = DependencyProperty . Register ( nameof ( TitleBarContent ) , typeof ( FrameworkElement ) , typeof ( PictureWindow ) , new FrameworkPropertyMetadata ( null , FrameworkPropertyMetadataOptions . Inherits ) ) ;
4270
4371 public Visibility TitleBarVisibility
4472 {
@@ -48,6 +76,13 @@ public Visibility TitleBarVisibility
4876
4977 public static readonly DependencyProperty TitleBarVisibilityProperty = DependencyProperty . Register ( nameof ( TitleBarVisibility ) , typeof ( Visibility ) , typeof ( PictureWindow ) , new FrameworkPropertyMetadata ( Visibility . Visible , FrameworkPropertyMetadataOptions . Inherits ) ) ;
5078
79+ public bool IsTopmostButtonEnabled
80+ {
81+ get { return ( bool ) GetValue ( IsTopmostButtonEnabledProperty ) ; }
82+ set { SetValue ( IsTopmostButtonEnabledProperty , value ) ; }
83+ }
84+
85+ public static readonly DependencyProperty IsTopmostButtonEnabledProperty = DependencyProperty . Register ( nameof ( IsTopmostButtonEnabled ) , typeof ( bool ) , typeof ( PictureWindow ) , new FrameworkPropertyMetadata ( false , FrameworkPropertyMetadataOptions . Inherits ) ) ;
5186
5287
5388 public PictureWindow ( )
0 commit comments