public void Transform_givenstring() { var resources = (ResourceDictionary)XamlReader.Parse(Utils.LoadText("IndentTest.xaml")); var markdownViewer = new MarkdownScrollViewer(); markdownViewer.MarkdownStyle = null; foreach (var idx in Enumerable.Range(1, 4)) { var jaggingMarkdown = (string)resources["Indent" + idx]; markdownViewer.HereMarkdown = jaggingMarkdown; var document = markdownViewer.Document; Approvals.Verify(Utils.AsXaml(document)); } }
public MainWindow() { InitializeComponent(); DataContext = new { Background = new SolidColorBrush(Color.Parse(CommonData.theme.Background)), Foreground = new SolidColorBrush(Color.Parse(CommonData.theme.Foreground)), Activecolor = new SolidColorBrush(Color.Parse(CommonData.theme.ActiveColor)) }; // load controls this.inputTbx = this.FindControl <TextBox>("inputTextBox"); this.searchBox = this.FindControl <TextBox>("searchBox"); this.articleListPanel = this.FindControl <StackPanel>("postItemsPanel"); this.markdownPreview = this.FindControl <MarkdownScrollViewer>("markdownPreview"); this.mainGrid = this.FindControl <Grid>("mainGrid"); // load config // todo: check config is null or not // this.markdownPreview.AssetPathRoot = CommonData.config.PostDirectory; }
public static ICommand GetValidationResult(MarkdownScrollViewer ctrl) => ctrl.GetValue(ValidationResultProperty);
public static void SetValidationResult(MarkdownScrollViewer ctrl, ICommand cmd) => ctrl.SetValue(ValidationResultProperty, cmd);
public static string GetXamlText(MarkdownScrollViewer ctrl) => ctrl.GetValue(XamlTextProperty);
public static void SetXamlText(MarkdownScrollViewer ctrl, string xamlTxt) => ctrl.SetValue(XamlTextProperty, xamlTxt);