Skip to content

Commit 54ddefa

Browse files
committed
fix link
1 parent 4ab8b58 commit 54ddefa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

MainDemo.Wpf/Domain/DocumentationLink.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,20 @@ public static DocumentationLink DemoPageLink<TDemoPage>()
6161
}
6262

6363
public static DocumentationLink DemoPageLink<TDemoPage>(string label)
64+
{
65+
return DemoPageLink<TDemoPage>(label, null);
66+
}
67+
68+
public static DocumentationLink DemoPageLink<TDemoPage>(string label, string nameSpace)
6469
{
6570
var ext = typeof(UserControl).IsAssignableFrom(typeof(TDemoPage))
6671
? "xaml"
6772
: "cs";
6873

74+
6975
return new DocumentationLink(
7076
DocumentationLinkType.DemoPageSource,
71-
$"{ConfigurationManager.AppSettings["GitHub"]}/blob/master/MainDemo.Wpf/{typeof(TDemoPage).Name}.{ext}",
77+
$"{ConfigurationManager.AppSettings["GitHub"]}/blob/master/MainDemo.Wpf/{(string.IsNullOrWhiteSpace(nameSpace) ? "" : ("/" + nameSpace + "/" ))}{typeof(TDemoPage).Name}.{ext}",
7278
label ?? typeof(TDemoPage).Name);
7379
}
7480

MainDemo.Wpf/Domain/MainWindowViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public MainWindowViewModel()
108108
new []
109109
{
110110
DocumentationLink.DemoPageLink<Lists>("Demo View"),
111-
DocumentationLink.DemoPageLink<ListsAndGridsViewModel>("Demo View Model"),
111+
DocumentationLink.DemoPageLink<ListsAndGridsViewModel>("Demo View Model", "Domain"),
112112
DocumentationLink.StyleLink("ListBox"),
113113
DocumentationLink.StyleLink("ListView")
114114
})

0 commit comments

Comments
 (0)