Skip to content

Commit 41403ea

Browse files
committed
attempt to load source locally
1 parent 0a417e8 commit 41403ea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

MainDemo.Wpf/MainWindow.xaml.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using CodeDisplayer;
1010
using MaterialDesignColors.WpfExample.Domain;
1111
using MaterialDesignThemes.Wpf;
12+
using System.IO;
1213

1314
namespace MaterialDesignColors.WpfExample
1415
{
@@ -20,10 +21,13 @@ public partial class MainWindow : Window {
2021
public MainWindow()
2122
{
2223
InitializeComponent();
24+
25+
var sourceLocation = File.Exists(@"..\..\MainWindow.xaml") ? XamlDisplayerPanel.SourceEnum.LoadFromLocal : XamlDisplayerPanel.SourceEnum.LoadFromRemote;
26+
2327
XamlDisplayerPanel.Initialize(
24-
source: XamlDisplayerPanel.SourceEnum.LoadFromRemote,
25-
defaultLocalPath: $@"C:\Users\User\Desktop\MaterialDesignXAMLToolKitNew\MaterialDesignInXamlToolkit\MainDemo.Wpf\",
26-
defaultRemotePath: @"https://raw.githubusercontent.com/wongjiahau/MaterialDesignInXamlToolkit/New-Demo-2/MainDemo.Wpf/" ,
28+
source: sourceLocation,
29+
defaultLocalPath: $@"..\..\",
30+
defaultRemotePath: @"https://raw.githubusercontent.com/ButchersBoy/MaterialDesignInXamlToolkit/master/MainDemo.Wpf/",
2731
attributesToBeRemoved:
2832
new List<string>()
2933
{

0 commit comments

Comments
 (0)