Skip to content

Commit

Permalink
Merge pull request #35 from whistyun/fixstyleset
Browse files Browse the repository at this point in the history
Setting a value to MarkdownStyle has no effect with DataTemplate.
  • Loading branch information
whistyun authored May 14, 2022
2 parents 5802e96 + c53449f commit e03f57b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions MdXaml/MarkdownScrollViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ public class MarkdownScrollViewer : FlowDocumentScrollViewer, IUriContext
nameof(MarkdownStyle),
typeof(Style),
typeof(MarkdownScrollViewer),
new PropertyMetadata(null, UpdateStyle));
new PropertyMetadata(MdStyle.Standard, UpdateStyle));

public static readonly DependencyProperty MarkdownStyleNameProperty =
DependencyProperty.Register(
nameof(MarkdownStyleName),
typeof(string),
typeof(MarkdownScrollViewer),
new PropertyMetadata(null, UpdateStyleName));
new PropertyMetadata(nameof(MdStyle.Standard), UpdateStyleName));

public static readonly DependencyProperty AssetPathRootProperty =
DependencyProperty.Register(
Expand Down Expand Up @@ -253,7 +253,6 @@ public ClickAction ClickAction
public MarkdownScrollViewer()
{
Engine = new Markdown();
SetCurrentValue(MarkdownStyleNameProperty, nameof(MdStyle.Standard));
}

private void UpdateClickAction()
Expand Down
2 changes: 1 addition & 1 deletion MdXaml/MdXaml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netcoreapp3.0;net45;net5.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<PackageId>MdXaml</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Authors>Bevan Arps(original); whistyun</Authors>
<Company />
<Description>Markdown XAML processor</Description>
Expand Down
2 changes: 1 addition & 1 deletion MdXaml/MdXamlMigfree.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netcoreapp3.0;net45;net5.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<PackageId>MdXaml_migfree</PackageId>
<Version>1.14.0</Version>
<Version>1.15.0</Version>
<Authors>Bevan Arps(original); whistyun</Authors>
<Company />
<Description>Markdown XAML processor</Description>
Expand Down

0 comments on commit e03f57b

Please sign in to comment.