File tree 3 files changed +33
-5
lines changed
3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,21 @@ Custom Avalonia Themes developed by [Devolutions](https://devolutions.net/)
8
8
9
9
➡️ [ DevExpress Theme] ( https://github.com/Devolutions/avalonia-themes/blob/master/src/Devolutions.AvaloniaTheme.DevExpress/README.md )
10
10
11
+ ➡️ [ Linux Theme] ( https://github.com/Devolutions/avalonia-themes/blob/master/src/Devolutions.AvaloniaTheme.Linux/README.md )
12
+
13
+ # Sample App
14
+
15
+ Contributers can use the SampleApp to test, debug and document styles for the various controls under each theme.
16
+
17
+ ## Debugging
18
+
19
+ The SampleApp attaches the Avalonia Dev Tools for inspecting controls (open with F12).
20
+
21
+ If you own a licence for the new Dev Tools in _ Avalonia Accelerate_ , you can set an environment variable in your IDE's debug configuration.
22
+ For example, in Rider:
23
+
24
+ - Open ** Run > Edit Configurations**
25
+ - Pick your configuration for the SampleApp
26
+ - In the ** Environment Variables** field add ` USE_AVALONIA_ACCELERATE_TOOLS=true `
27
+
28
+ The F12 key then opens the new Dev Tools, and F10 opens the old version
Original file line number Diff line number Diff line change @@ -19,10 +19,6 @@ public class App : Application
19
19
public override void Initialize ( )
20
20
{
21
21
AvaloniaXamlLoader . Load ( this ) ;
22
-
23
- #if DEBUG
24
- this . AttachDeveloperTools ( ) ;
25
- #endif
26
22
27
23
if ( ! Avalonia . Controls . Design . IsDesignMode )
28
24
{
Original file line number Diff line number Diff line change
1
+ using System ;
1
2
using Avalonia ;
2
3
using Avalonia . Controls ;
3
4
using Avalonia . Controls . Primitives ;
@@ -12,7 +13,20 @@ public MainWindow()
12
13
{
13
14
InitializeComponent ( ) ;
14
15
#if DEBUG
15
- this . AttachDevTools ( new KeyGesture ( Key . F10 ) ) ;
16
+ bool useAccelerate = Environment . GetEnvironmentVariable ( "USE_AVALONIA_ACCELERATE_TOOLS" ) ? . ToLowerInvariant ( ) == "true" ;
17
+
18
+ if ( useAccelerate )
19
+ {
20
+ // Enable Accelerate dev tools (AvaloniaUI.DiagnosticsSupport) - requiring a licence to use
21
+ ( Application . Current as App ) ? . AttachDeveloperTools ( ) ;
22
+ // Enable original free dev tools (Avalonia.Diagnostics) as an additional option available on F10
23
+ this . AttachDevTools ( new KeyGesture ( Key . F10 ) ) ;
24
+ }
25
+ else
26
+ {
27
+ // Enable original free dev tools (Avalonia.Diagnostics)
28
+ this . AttachDevTools ( ) ;
29
+ }
16
30
#endif
17
31
}
18
32
You can’t perform that action at this time.
0 commit comments