{"id":487,"date":"2016-09-11T18:14:04","date_gmt":"2016-09-11T09:14:04","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2016\/09\/11\/wpf_xaml\/"},"modified":"2016-09-11T18:14:04","modified_gmt":"2016-09-11T09:14:04","slug":"wpf_xaml","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2016\/09\/11\/wpf_xaml\/","title":{"rendered":"WPF \u6587\u5b57\u5217\u30ea\u30bd\u30fc\u30b9\u3092Xaml\u304b\u3089\u5229\u7528\u3059\u308b"},"content":{"rendered":"<p>[<a href=\"http:\/\/typea.info\/tips\/wiki.cgi?page=WPF+Tips\"><u>WPF Tips<\/u><\/a>]<\/p>\n<p><a href=\"http:\/\/typea.info\/products\/shikalog.html\">WPF \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u4f5c\u6210\u3067\u5f97\u305fTips\u3092\u30e1\u30e2<\/a>\u3002<\/p>\n<p> <a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4798114200\/ref=as_li_ss_il?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4798114200&amp;linkCode=as2&amp;tag=typea09-22\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4798114200&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4798114200\" width=\"1\" height=\"1\" \/>   <\/p>\n<h2>&#160;<\/h2>\n<h2>1.\u72b6\u6cc1<\/h2>\n<p>XAML\u304b\u3089\u3001\u30ea\u30bd\u30fc\u30b9\u306b\u8a2d\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3092\u4f7f\u7528\u3057\u305f\u3044\u3002<\/p>\n<h2>2.\u5bfe\u5fdc<\/h2>\n<h3><\/h3>\n<h3>2.1 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eProperties\u306e\u914d\u4e0b\u306b\u3001Resource.resx \u304c\u5b58\u5728\u3059\u308b\u3002<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml01.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"wpf_resourece_xaml01\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"wpf_resourece_xaml01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml01_thumb.jpg\" width=\"223\" height=\"311\" \/><\/a><\/p>\n<h3>2.2 App.xaml \u3092\u7de8\u96c6\u3057\u3001Application.Resource \u306b resource \u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u8ffd\u52a0<\/h3>\n<p>xmlns:prperties \u8981\u7d20\u3082\u8ffd\u52a0<\/p>\n<pre class=\"prettyprint linenums\">&lt;Application x:Class=&quot;DSMoviePlayer.App&quot;\r\n             xmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;\r\n             xmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;\r\n             xmlns:vm=&quot;clr-namespace:DSMoviePlayer.ViewModel&quot;\r\n             xmlns:d=&quot;http:\/\/schemas.microsoft.com\/expression\/blend\/2008&quot;\r\n             xmlns:mc=&quot;http:\/\/schemas.openxmlformats.org\/markup-compatibility\/2006&quot;\r\n             xmlns:ignore=&quot;http:\/\/www.galasoft.ch\/ignore&quot;\r\n             StartupUri=&quot;MainWindow.xaml&quot;\r\n             xmlns:properties=&quot;clr-namespace:{\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540d}.Properties&quot;\r\n             mc:Ignorable=&quot;d ignore&quot;&gt;\r\n    \r\n    &lt;Application.Resources&gt;\r\n        &lt;!--Global View Model Locator--&gt;\r\n        &lt;vm:ViewModelLocator x:Key=&quot;Locator&quot;\r\n                             d:IsDataSource=&quot;True&quot; \/&gt;\r\n        &lt;properties:Resources x:Key=&quot;resources&quot; \/&gt;\r\n    &lt;\/Application.Resources&gt;\r\n    \r\n&lt;\/Application&gt;<\/pre>\n<h3>2.3 \u6587\u5b57\u5217\u30ea\u30bd\u30fc\u30b9\u306e\u30a2\u30af\u30bb\u30b9\u4fee\u98fe\u5b50\u3092 Public \u306b\u3059\u308b<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml02.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"wpf_resourece_xaml02\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"wpf_resourece_xaml02\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml02_thumb.jpg\" width=\"299\" height=\"113\" \/><\/a><\/p>\n<h3>2.4 \u30d0\u30a4\u30f3\u30c9\u3057\u305f\u3044\u9805\u76ee\u306e\u30d7\u30ed\u30d1\u30c6\u30a3(\u4eca\u56de\u306fWindow.Title)\u304b\u3089\u3001\u30c7\u30fc\u30bf\u30d0\u30a4\u30f3\u30c9\u306e\u4f5c\u6210\u3092\u9078\u629e<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml03.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"wpf_resourece_xaml03\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"wpf_resourece_xaml03\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml03_thumb.jpg\" width=\"297\" height=\"240\" \/><\/a><\/p>\n<h3>2.5 \u30c0\u30a4\u30a2\u30ed\u30b0\u3067\u8ffd\u52a0\u3057\u305f\u3001App.xaml \uff0dresources \u3092\u9078\u629e\u3001\u30ab\u30b9\u30bf\u30e0\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3001\u30d1\u30b9\u306b\u6587\u5b57\u5217\u30ea\u30bd\u30fc\u30b9\u306e\u30ad\u30fc\u3092\u5165\u529b<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml04.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"wpf_resourece_xaml04\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"wpf_resourece_xaml04\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml04_thumb.jpg\" width=\"264\" height=\"293\" \/><\/a><\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u304c\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">    &lt;Window.Title&gt;\r\n        &lt;Binding Path=&quot;APP_TITLE&quot; Source=&quot;{StaticResource resources}&quot;\/&gt;\r\n    &lt;\/Window.Title&gt;<\/pre>\n<h3>2.6 \u8868\u793a\u3055\u308c\u308b<\/h3>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml05.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"wpf_resourece_xaml05\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"wpf_resourece_xaml05\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/d335e20fe3d9_FA46\/wpf_resourece_xaml05_thumb.jpg\" width=\"373\" height=\"135\" \/><\/a><\/p>\n<p>\u3081\u3067\u305f\u3057\u3002<\/p>\n<p><a href=\"https:\/\/www.amazon.co.jp\/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0C-%E7%AC%AC7%E7%89%88-Ian-Griffiths\/dp\/4873116503\/ref=as_li_ss_il?ie=UTF8&amp;qid=1473585176&amp;sr=8-7&amp;keywords=C#&amp;linkCode=li2&amp;tag=typea09-22&amp;linkId=68a5b1eb65b9728ee102e88bf1928933\" target=\"_blank\"><img decoding=\"async\" border=\"0\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4873116503&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=li2&amp;o=9&amp;a=4873116503\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[WPF Tips] WPF \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u4f5c\u6210\u3067\u5f97\u305fTips\u3092\u30e1\u30e2\u3002 &#160; 1.\u72b6\u6cc1 XAML\u304b\u3089\u3001\u30ea\u30bd\u30fc\u30b9\u306b\u8a2d\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3092\u4f7f\u7528\u3057\u305f\u3044\u3002 2.\u5bfe\u5fdc 2.1 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eProperties\u306e\u914d\u4e0b\u306b\u3001R [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[77,93],"tags":[],"class_list":["post-487","post","type-post","status-publish","format-standard","hentry","category-c","category-wpf"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=487"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/487\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}