1
- using System . Collections . ObjectModel ;
1
+ using MaterialWPF . UI ;
2
+ using System . Collections . ObjectModel ;
2
3
using System . Windows ;
3
- using MaterialWPF . UI ;
4
4
5
5
namespace MaterialWPF . Demo
6
6
{
@@ -19,10 +19,12 @@ public MainWindow()
19
19
{
20
20
new NavItem { Icon = MaterialIcon . GridView , Name = "Dashboard" , Tag = "dashboard" , Type = typeof ( Pages . Dashboard ) } ,
21
21
new NavItem { Icon = MaterialIcon . AdjustHologram , Name = "Controls" , Tag = "controls" , Type = typeof ( Pages . Controls ) } ,
22
- new NavItem { Icon = MaterialIcon . Input , Name = "Fields " , Tag = "fields" , Type = typeof ( Pages . Fields ) } ,
22
+ new NavItem { Icon = MaterialIcon . Input , Name = "Forms " , Tag = "fields" , Type = typeof ( Pages . Fields ) } ,
23
23
new NavItem { Icon = MaterialIcon . Color , Name = "Colors" , Tag = "colors" , Type = typeof ( Pages . Colors ) } ,
24
24
new NavItem { Icon = MaterialIcon . Calories , Name = "Icons" , Tag = "icons" , Type = typeof ( Pages . Icons ) } ,
25
+ #if DEBUG
25
26
new NavItem { Icon = MaterialIcon . AlignLeft , Name = "Tree List" , Tag = "treelist" , Type = typeof ( Pages . TreeList ) }
27
+ #endif
26
28
} ;
27
29
28
30
rootNavigation . Footer = new ObservableCollection < NavItem >
@@ -46,7 +48,10 @@ public void OnSettingsNavigate()
46
48
47
49
private async void Splash ( )
48
50
{
49
- mainSplash . Version = System . Reflection . Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version . ToString ( ) ;
51
+ System . Version ? version = System . Reflection . Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version ;
52
+ if ( version != null )
53
+ mainSplash . Version = version . ToString ( ) ;
54
+
50
55
mainSplash . Logo = new System . Windows . Media . Imaging . BitmapImage ( new System . Uri ( "pack://application:,,,/Assets/banner-dark.png" ) ) ;
51
56
mainSplash . SubTitle = "Loading a fantastic demo app..." ;
52
57
@@ -69,7 +74,7 @@ private void ToggleTheme(object sender, RoutedEventArgs e)
69
74
if ( rootNavigation . PageNow == "dashboard" )
70
75
( rootNavigation . Items [ 0 ] . Instance as Pages . Dashboard ) . ToggleTheme ( isChecked ) ;
71
76
72
- if ( ! isChecked )
77
+ if ( ! isChecked )
73
78
MaterialWPF . Theme . Switch ( MaterialWPF . MaterialTheme . Light ) ;
74
79
else
75
80
MaterialWPF . Theme . Switch ( MaterialWPF . MaterialTheme . Dark ) ;
0 commit comments