Skip to content

Commit

Permalink
Setting a value to MarkdownStyle has no effect with DataTemplate. ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
whistyun committed May 14, 2022
1 parent 5802e96 commit 13003bd
Showing 1 changed file with 2 additions and 3 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

0 comments on commit 13003bd

Please sign in to comment.