{"id":3247,"date":"2018-09-04T15:17:30","date_gmt":"2018-09-04T06:17:30","guid":{"rendered":"https:\/\/elleneast.com\/?p=3247"},"modified":"2018-09-04T19:27:59","modified_gmt":"2018-09-04T10:27:59","slug":"%e3%80%90vb-net%e3%80%91%e3%80%90wpf%e3%80%91richtextbox-%e3%81%ae%e3%83%8f%e3%82%a4%e3%83%91%e3%83%bc%e3%83%aa%e3%83%b3%e3%82%af%e3%82%92%e5%8b%95%e4%bd%9c%e3%81%95%e3%81%9b%e3%82%8b%e3%81%ab","status":"publish","type":"post","link":"https:\/\/elleneast.com\/?p=3247","title":{"rendered":"\u3010VB.NET\u3011\u3010WPF\u3011RichTextBox \u306e\u30cf\u30a4\u30d1\u30fc\u30ea\u30f3\u30af\u3092\u52d5\u4f5c\u3055\u305b\u308b\u306b\u306f"},"content":{"rendered":"<p>WPF \u306e RichTextBox \u306b RTF \u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307e\u305b\u308b\u30c6\u30b9\u30c8\u3092\u3057\u3066\u3044\u305f\u3089\u3001\u304a\u304b\u3057\u306a\u3053\u3068\u306b\u6c17\u4ed8\u3044\u305f\u3002<\/p>\n<p>\u5143\u3005 RTF \u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u3066\u3042\u3063\u305f\u30cf\u30a4\u30d1\u30fc\u30ea\u30f3\u30af\u304c\u3001RichTextBox \u306b\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3068\u3001RichTextBox \u4e0a\u3067\u52d5\u4f5c\u3057\u306a\u3044\u3002RichTextBox \u4e0a\u3067\u30ea\u30f3\u30af\u306e\u4e0a\u306b\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u3092\u52d5\u304b\u3057\u3066\u3082\u624b\u306e\u30de\u30fc\u30af\u306b\u306a\u3089\u306a\u3044\u3057\u3001\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082\u30b8\u30e3\u30f3\u30d7\u3057\u306a\u3044\u3002<\/p>\n<p>Forms \u306e RichTextBox \u306b\u3082\u3044\u308d\u3044\u308d\u554f\u984c\u304c\u3042\u3063\u305f\u3051\u3069\u3001WPF \u306e RichTextBox \u306f\u305d\u308c\u306b\u8f2a\u3092\u304b\u3051\u3066\u554f\u984c\u304c\u591a\u3044\u3088\u3046\u306b\u601d\u3046\uff08\u500b\u4eba\u306e\u611f\u60f3\u3067\u3059\uff09\u3002\u305d\u308c\u306f\u3068\u3082\u304b\u304f\u3001\u5bfe\u7b56\u3092\u8abf\u3079\u3066\u307f\u305f\u3002<\/p>\n<p>\u30ea\u30f3\u30af\u304c\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001\u307e\u305a xaml \u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u4fee\u6b63\u3059\u308b\u3002<\/p>\n<pre class=\"lang:xhtml mark:3-6 decode:true\">&lt;RichTextBox Name=\"body\" Margin=\"10,10,10,50\" IsReadOnly=\"True\" ScrollViewer.HorizontalScrollBarVisibility=\"Auto\" ScrollViewer.VerticalScrollBarVisibility=\"Auto\"&gt;\n&lt;RichTextBox.Resources&gt;\n&lt;Style TargetType=\"Hyperlink\"&gt;\n&lt;Setter Property=\"Cursor\" Value=\"Hand\" \/&gt;\n&lt;EventSetter Event=\"MouseLeftButtonDown\" Handler=\"Hyperlink_MouseLeftButtonDown\" \/&gt;\n&lt;\/Style&gt;\n&lt;\/RichTextBox.Resources&gt;\n&lt;\/RichTextBox&gt;<\/pre>\n<p>\u6b21\u306b\u3001\u30cf\u30f3\u30c9\u30e9\u3092\u7528\u610f\u3059\u308b\u3002<\/p>\n<pre class=\"lang:vbnet decode:true\">Private Sub Hyperlink_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)\n\nDim hyperlink As Hyperlink = sender\nProcess.Start(hyperlink.NavigateUri.ToString())\n\nEnd Sub\n<\/pre>\n<p>\u3053\u308c\u3067\u3001RichTextBox \u5185\u306e\u30cf\u30a4\u30d1\u30fc\u30ea\u30f3\u30af\u304c\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<p>\u306a\u304a\u3001\u300c\u306a\u3093\u3067\u30a4\u30d9\u30f3\u30c8\u304c MouseLeftButtonDown \u306a\u306e\uff1f\u300d\u300cClick \u3058\u3083\u30c0\u30e1\u306a\u306e\uff1f\u300d\u300cMouseLeftButtonUp \u306e\u307b\u3046\u304c\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u3067\u3059\u304b\uff1f\u300d\u3068\u3044\u3046\u3054\u3082\u3063\u3068\u3082\u306a\u7591\u554f\u304c\u51fa\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u79c1\u3082\u305d\u3046\u601d\u3063\u305f\u3002<\/p>\n<p>\u305d\u308c\u3067 Click \u3068\u304b&nbsp;MouseLeftButtonUp \u306b\u5909\u3048\u3066\u307f\u3066\u3001\u305d\u308c\u306a\u308a\u306b\u6642\u9593\u3092\u304b\u3051\u3066\u8a66\u3057\u3066\u307f\u305f\u306e\u3060\u304c\u3001\u306a\u305c\u304b\u5168\u304f\u52d5\u4f5c\u3057\u306a\u3044\u3002<\/p>\n<p>\u300c\u304a\u3063\u304b\u3057\u30fc\u306a\uff5e(-\u201c-)\u300d\u3068\u601d\u3063\u3066\u3001\u305d\u306e\u7406\u7531\u3092\u30cd\u30c3\u30c8\u691c\u7d22\u3057\u3066\u8abf\u3079\u3066\u307f\u308b\u3068\u3001\u3069\u3046\u3084\u3089 WPF \u306e RichTextBox \u3067\u306e\u30cf\u30a4\u30d1\u30fc\u30ea\u30f3\u30af\u306f\u300c\u305d\u3046\u3044\u3046\u3082\u306e\u300d\u3089\u3057\u3044\u3002MouseLeftButtonDown \u3067\u306a\u3044\u3068\u52d5\u4f5c\u3057\u306a\u3044\u3002\u305d\u3046\u6c7a\u307e\u3063\u3066\u308b\u3089\u3057\u3044\u3002\uff08\u8aac\u5f97\u529b\u306e\u306a\u3044\u8aac\u660e\u3067\u30b9\u30f3\u30de\u30bb\u30f3\uff09<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001TextBlock \u3084 Label \u3084&nbsp;NavigationWindow \u3084 Frame \u306e\u4e2d\u306a\u3069\u3067\u306f\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u5909\u306a\u3053\u3068\u3092\u3057\u306a\u3044\u3067\u3082\u3061\u3083\u3093\u3068\u30ea\u30f3\u30af\u304c\u52d5\u4f5c\u3059\u308b\u3089\u3057\u3044\u3002<\/p>\n<p>\u7d20\u76f4\u306b\u30cf\u30a4\u30d1\u30fc\u30ea\u30f3\u30af\u3092\u52d5\u4f5c\u3055\u305b\u305f\u3044\u306a\u3089\u3070\u3001WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u4f7f\u3046\u3068\u3044\u3046\u9078\u629e\u80a2\u3082\u3042\u308b\u3002\u79c1\u306f MouseLeftButtonDown \u306b\u9055\u548c\u611f\u3092\u611f\u3058\u305f\u306e\u3067\u3001WebBrowser \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3088\u3063\u3068\u3002<\/p>\n<div class=\"memo \">\n<div class=\"memo_ttl dfont\"> MouseLeftButtonDown  \u3068 MouseLeftButtonUp \u306e\u9055\u3044<\/div>\n<p>\u3054\u5b58\u77e5\u3060\u3068\u601d\u3046\u304c\u3001MouseLeftButtonDown&nbsp; \u3068&nbsp;MouseLeftButtonUp \u306e\u3069\u3061\u3089\u304b\u3092\u4f7f\u3046\u304b\u306b\u3088\u3063\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u4e0e\u3048\u308b\u5f71\u97ff\u306f\u5c0f\u3055\u304f\u306a\u3044\u3068\u8003\u3048\u308b\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30a6\u30a3\u30f3\u30c9\u30a6\u5185\u306e\u300c\u5b9f\u884c\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u305d\u3046\u3068\u3057\u3066\u3001\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u3092\u30dc\u30bf\u30f3\u306e\u4e0a\u306b\u91cd\u306d\u3066\u30de\u30a6\u30b9\u306e\u5de6\u30dc\u30bf\u30f3\u3092\u30b0\u30c3\u3068\u62bc\u3057\u3053\u3093\u3060\u3068\u3059\u308b\u3002<\/p>\n<p>\u3067\u3082\u3001\u305d\u306e\u30dc\u30bf\u30f3\u304b\u3089\u6307\u3092\u96e2\u3059\u524d\u306b\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u3092\u30dc\u30bf\u30f3\u4e0a\u304b\u3089\u305a\u3089\u3057\u3066\u9060\u3056\u3051\u3066\u3057\u307e\u3048\u3070\u3001\u300c\u5b9f\u884c\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u3053\u3068\u306b\u306f\u306a\u3089\u306a\u3044\uff08\u78ba\u5b9a\u3057\u306a\u3044\uff09\u3002\u3053\u306e\u3088\u3046\u306b\u3001\u300c\u62bc\u305d\u3046\u304b\u3069\u3046\u304b\u300d\u3092\u8ff7\u3063\u305f\u30e6\u30fc\u30b6\u30fc\u306b\u306f\u3001\u3059\u3093\u3067\u306e\u3068\u3053\u308d\u3067\u300c\u3084\u3081\u308b\u300d\u3068\u3044\u3046\u6a5f\u4f1a\u304c\uff08\u901a\u5e38\u306f\uff09\u4e0e\u3048\u3089\u308c\u3066\u3044\u308b\u3002<\/p>\n<p>\u3068\u3053\u308d\u304c\u30a4\u30d9\u30f3\u30c8\u306b&nbsp;MouseLeftButtonDown&nbsp; \u3092\u4f7f\u3063\u3066\u3057\u307e\u3046\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u3053\u306e\u6700\u5f8c\u306e\u300c\u3084\u3081\u308b\u300d\u6a5f\u4f1a\u3092\u596a\u3046\u3053\u3068\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3002\u5de6\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3060\u3060\u3051\u3067\u306f\uff08\u901a\u5e38\u306f\uff09\u78ba\u5b9a\u3057\u306a\u3044\u3053\u3068\u3092\u77e5\u3063\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u6df7\u4e71\u3055\u305b\u3066\u3057\u307e\u3046\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>WPF \u306e RichTextBox \u306b RTF \u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307e\u305b\u308b\u30c6\u30b9\u30c8\u3092\u3057\u3066\u3044\u305f\u3089\u3001\u304a\u304b\u3057\u306a\u3053\u3068\u306b\u6c17\u4ed8\u3044\u305f\u3002 \u5143\u3005 RTF \u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u3066\u3042\u3063\u305f\u30cf\u30a4\u30d1\u30fc\u30ea\u30f3\u30af\u304c\u3001RichTextBox \u306b\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3068\u3001Ric &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2656,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[57],"tags":[60,62],"class_list":{"0":"post-3247","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-57","8":"tag-vb-net","9":"tag-wpf"},"_links":{"self":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/3247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3247"}],"version-history":[{"count":3,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/3247\/revisions"}],"predecessor-version":[{"id":3279,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/3247\/revisions\/3279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/media\/2656"}],"wp:attachment":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}