예제 #1
0
        private void PasteCode_Loaded(object sender, RoutedEventArgs e)
        {
            ComboBackground = TextCodeLanguage.Background;

            DataContext = this;
            WebBrowserCode.Focus();


            editor = new MarkdownEditorSimple(WebBrowserCode, Code, CodeLanguage);
            editor.IsDirtyAction = () =>
            {
                Code = editor.GetMarkdown();
                return(true);
            };

            Dispatcher.InvokeAsync(() =>
            {
                if (!string.IsNullOrEmpty(Code))
                {
                    TextCodeLanguage.Focus();
                    TextCodeLanguage.Background = Brushes.SlateGray;

                    var sb = Resources["StoryboardLanguageCombo"] as Storyboard;
                    sb.Begin();
                }
            }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
        }
예제 #2
0
        private void PasteCode_Loaded(object sender, RoutedEventArgs e)
        {
            DataContext = this;
            WebBrowserCode.Focus();

            editor = new MarkdownEditorSimple(WebBrowserCode, Code, CodeLanguage);
            editor.IsDirtyAction = () =>
            {
                Code = editor.GetMarkdown();
                return(true);
            };

            Dispatcher.InvokeAsync(() =>
            {
                if (!string.IsNullOrEmpty(Code))
                {
                    TextCodeLanguage.Focus();
                }
            }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
        }