{"id":810,"date":"2010-08-25T00:00:00","date_gmt":"2010-08-24T15:00:00","guid":{"rendered":"http:\/\/localhost\/blog\/?p=796"},"modified":"2014-08-14T11:49:49","modified_gmt":"2014-08-14T02:49:49","slug":"%e7%84%a1%e9%a1%8c-25","status":"publish","type":"post","link":"https:\/\/denasu.com\/blog\/2010\/08\/diary810","title":{"rendered":"WPF\u5c0f\u30cd\u30bf"},"content":{"rendered":"<p>\u697d\u8b5c\u8868\u793a\u306eUI\u90e8\u5206\u304c\u5b8c\u6210\u3002\u3060\u3044\u3076WPF\u306b\u8a73\u3057\u304f\u306a\u3063\u305f\u6c17\u304c\u3059\u308b\u3002\u3042\u3068\u306f\u697d\u8b5c\u8868\u793a\u306b\u623b\u3063\u30668va\u3068\u304b\u672a\u5b9f\u88c5\u306a\u90e8\u5206\u3092\u5b9f\u88c5\u3059\u308c\u3070\u3068\u308a\u3042\u3048\u305a\u306f\u5b8c\u6210\u304b\u3002<\/p>\n<hr \/>\n<p>\u3066\u3053\u3068\u3067WPF\u95a2\u9023\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092.NET 3.5\u30d9\u30fc\u30b9\u306b\u3057\u3066\u3044\u308b\u3068\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3051\u3069.NET 4.0\u30d9\u30fc\u30b9\u306b\u3057\u305f\u3089\u3046\u307e\u304f\u3044\u3063\u305f\u30b1\u30fc\u30b9\u304c\u3042\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002.NET 4.0\u306fWindows 7\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u3044\u306a\u3044\u304c\uff0cWindows Update\u306b\u91cd\u8981\u306a\u66f4\u65b0\u3067\u51fa\u3066\u304f\u308b\u3057\uff0c\u5927\u4e08\u592b\u3067\u3057\u3087\u3046\u3002<\/p>\n<hr \/>\n<p>1\u3064\u76ee\u3002CheckBox\u306bbool\u578b\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092twoway Binding\u3057\u3066\u3044\u308b\u72b6\u6cc1\u3067\uff0c\u3042\u308b\u6761\u4ef6\u306e\u3068\u304d\u306fsetter\u3067\u4f55\u3082\u305b\u305a\u306b\u8fd4\u3059\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u305f\u3002\u30c1\u30a7\u30c3\u30af\u64cd\u4f5c\u3092\u3057\u305f\u3051\u3069\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\uff0c\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308b\u3002<\/p>\n<pre class=\"brush:xml\">\r\nXAML\r\n&lt;CheckBox IsChecked=&quot;{Binding IsDisplay, Mode=twoway}&quot;&gt;\r\n<\/pre>\n<pre class=\"brush:csharp\">\r\nC#\r\n bool IsDisplay\r\n {\r\n     set\r\n     {\r\n         if(xxx)\r\n         {\r\n             return;\r\n         }\r\n         _isdisplay = value;\r\n         PropertyChanged(this, new PropertyChangedEventArgs(\"IsDisplay\"));\r\n     }\r\n     get\r\n     {\r\n         return _isdisplay;\r\n     }\r\n }\r\n<\/pre>\n<p>\u3053\u306e\u72b6\u614b\u3067\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30aa\u30d5\u304b\u3089\u30aa\u30f3\u306b\u5909\u3048\u3088\u3046\u3068\u3059\u308b\u3068\uff0c\u30d7\u30ed\u30d1\u30c6\u30a3\u306ffalse\u306e\u307e\u307e\u306a\u306e\u306bUI\u306ftrue\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u72b6\u614b\u304c\u98df\u3044\u9055\u3046\u611f\u3058\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3002\u3067\u7d50\u5c40\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092.NET 4.0\u30d9\u30fc\u30b9\u306b\u3059\u308b\u3068\u3046\u307e\u304f\u30c1\u30a7\u30c3\u30af\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u305f\u3002<\/p>\n<hr \/>\n<p>2\u3064\u76ee\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306bListBox\u3067\u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u3068\u305d\u308c\u4ee5\u5916\u3092\u914d\u7f6e\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3067\uff0c\u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u3092\u53ef\u5909\u9577\uff08Width=&#8221;100*&#8221;\u3068\u304b\uff09\u306b\u3057\u3066\u3044\u308b\u5834\u5408\uff0c\u30a6\u30a3\u30f3\u30c9\u30a6\u30921\u5ea6\u3067\u3082\u5e83\u3052\u3066\u3044\u308c\u3070\u554f\u984c\u306f\u306a\u3044\u306e\u3060\u304c\uff0c\u30a6\u30a3\u30f3\u30c9\u30a6\u8868\u793a\u6642\u306b\u753b\u9762\u3092\u72ed\u304f\u3057\u3066\u3044\u308b\u3068\uff0c\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u5d29\u308c\u3066\u3057\u307e\u3046\u3002<\/p>\n<p><a href=\"http:\/\/denasu.com\/blog\/wp-content\/uploads\/2010\/08\/2010082501.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1138\" src=\"http:\/\/denasu.com\/blog\/wp-content\/uploads\/2010\/08\/2010082501.png\" alt=\"2010082501\" width=\"306\" height=\"133\" \/><\/a><\/p>\n<p><a href=\"http:\/\/denasu.com\/blog\/wp-content\/uploads\/2010\/08\/2010082502.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1139\" src=\"http:\/\/denasu.com\/blog\/wp-content\/uploads\/2010\/08\/2010082502.png\" alt=\"2010082502\" width=\"198\" height=\"138\" \/><\/a><\/p>\n<p>\u3053\u308c\u3082\u7d50\u5c40\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092.NET 4.0\u30d9\u30fc\u30b9\u306b\u3059\u308b\u3068\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u5d29\u308c\u306a\u304f\u306a\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u697d\u8b5c\u8868\u793a\u306eUI\u90e8\u5206\u304c\u5b8c\u6210\u3002\u3060\u3044\u3076WPF\u306b\u8a73\u3057\u304f\u306a\u3063\u305f\u6c17\u304c\u3059\u308b\u3002\u3042\u3068\u306f\u697d\u8b5c\u8868\u793a\u306b\u623b\u3063\u30668va\u3068\u304b\u672a\u5b9f\u88c5\u306a\u90e8\u5206\u3092\u5b9f\u88c5\u3059\u308c\u3070\u3068\u308a\u3042\u3048\u305a\u306f\u5b8c\u6210\u304b\u3002 \u3066\u3053\u3068\u3067WPF\u95a2\u9023\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092.NET 3.5\u30d9\u30fc\u30b9\u306b\u3057\u3066\u3044\u308b\u3068\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3051\u3069.NET 4.0\u30d9\u30fc\u30b9\u306b\u3057\u305f\u3089\u3046\u307e\u304f\u3044\u3063\u305f\u30b1\u30fc\u30b9\u304c\u3042\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002.NET 4.0\u306fWindows 7\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u3044\u306a\u3044\u304c\uff0cWindows Update\u306b\u91cd\u8981\u306a\u66f4\u65b0\u3067\u51fa\u3066\u304f\u308b\u3057\uff0c\u5927\u4e08\u592b\u3067\u3057\u3087\u3046\u3002 1\u3064\u76ee\u3002CheckBox\u306bbool\u578b\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092twoway Binding\u3057\u3066\u3044\u308b\u72b6\u6cc1\u3067\uff0c\u3042\u308b\u6761\u4ef6\u306e\u3068\u304d\u306fsetter\u3067\u4f55\u3082\u305b\u305a\u306b\u8fd4\u3059\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u305f\u3002\u30c1\u30a7\u30c3\u30af\u64cd\u4f5c\u3092\u3057\u305f\u3051\u3069\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\uff0c\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308b\u3002 XAML &lt;CheckBox IsChecked=&quot;{Binding IsDisplay, Mode=twoway}&quot;&gt; C# bool IsDisplay { set { if(xxx) { return; } _isdisplay = value; PropertyChanged(this, new PropertyChangedEventArgs(&#8220;IsDisplay&#8221;)); } get { return _isdisplay; } } \u3053\u306e\u72b6\u614b\u3067\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30aa\u30d5\u304b\u3089\u30aa\u30f3\u306b\u5909\u3048\u3088\u3046\u3068\u3059\u308b\u3068\uff0c\u30d7\u30ed\u30d1\u30c6\u30a3\u306ffalse\u306e\u307e\u307e\u306a\u306e\u306bUI\u306ftrue\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u72b6\u614b\u304c\u98df\u3044\u9055\u3046\u611f\u3058\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3002\u3067\u7d50\u5c40\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092.NET 4.0\u30d9\u30fc\u30b9\u306b\u3059\u308b\u3068\u3046\u307e\u304f\u30c1\u30a7\u30c3\u30af\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u305f\u3002 2\u3064\u76ee\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306bListBox\u3067\u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u3068\u305d\u308c\u4ee5\u5916\u3092\u914d\u7f6e\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u30b1\u30fc\u30b9\u3067\uff0c\u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u3092\u53ef\u5909\u9577\uff08Width=&#8221;100*&#8221;\u3068\u304b\uff09\u306b\u3057\u3066\u3044\u308b\u5834\u5408\uff0c\u30a6\u30a3\u30f3\u30c9\u30a6\u30921\u5ea6\u3067\u3082\u5e83\u3052\u3066\u3044\u308c\u3070\u554f\u984c\u306f\u306a\u3044\u306e\u3060\u304c\uff0c\u30a6\u30a3\u30f3\u30c9\u30a6\u8868\u793a\u6642\u306b\u753b\u9762\u3092\u72ed\u304f\u3057\u3066\u3044\u308b\u3068\uff0c\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u5d29\u308c\u3066\u3057\u307e\u3046\u3002 \u3053\u308c\u3082\u7d50\u5c40\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092.NET 4.0\u30d9\u30fc\u30b9\u306b\u3059\u308b\u3068\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u5d29\u308c\u306a\u304f\u306a\u3063\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[25],"class_list":["post-810","post","type-post","status-publish","format-standard","hentry","category-programming","tag-wpf"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4ZThs-d4","_links":{"self":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts\/810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/comments?post=810"}],"version-history":[{"count":4,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts\/810\/revisions"}],"predecessor-version":[{"id":2464,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/posts\/810\/revisions\/2464"}],"wp:attachment":[{"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/media?parent=810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/categories?post=810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/denasu.com\/blog\/wp-json\/wp\/v2\/tags?post=810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}