{"id":768,"date":"2020-06-07T17:23:58","date_gmt":"2020-06-07T08:23:58","guid":{"rendered":"https:\/\/todosoft.net\/blog\/?p=768"},"modified":"2021-03-14T05:38:44","modified_gmt":"2021-03-13T20:38:44","slug":"post-768","status":"publish","type":"post","link":"https:\/\/todosoft.net\/blog\/?p=768","title":{"rendered":"\u30ea\u30bd\u30fc\u30b9\u306b\u57cb\u3081\u8fbc\u3093\u3060\u753b\u50cf\u3092\u8868\u793a\u3059\u308b"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u753b\u50cf\u306e\u767b\u9332<\/h2>\n\n\n\n<p>\uff11\uff0e \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3 \u2192 \u30ea\u30bd\u30fc\u30b9 \u2192 \u30a4\u30e1\u30fc\u30b8 \u306b\u3001\u8868\u793a\u3057\u305f\u3044\u753b\u50cf\u3092\u767b\u9332\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_01-1024x658.png\" alt=\"\" class=\"wp-image-769\" srcset=\"https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_01-1024x658.png 1024w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_01-300x193.png 300w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_01-768x493.png 768w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_01-1536x987.png 1536w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_01.png 1560w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<!--more-->\n\n\n\n<p>\uff12\uff0e \u753b\u50cf\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u30d3\u30eb\u30c9\u30a2\u30af\u30b7\u30e7\u30f3\u3092 Resource \u306b\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_02-1024x658.png\" alt=\"\" class=\"wp-image-770\" srcset=\"https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_02-1024x658.png 1024w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_02-300x193.png 300w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_02-768x493.png 768w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_02-1536x987.png 1536w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_02.png 1560w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">MainView.xaml<\/h2>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-csharp\"><code class=\"language-csharp\">&lt;Window x:Class=\"WpfApp16.View.MainView\"\n        xmlns=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation\"\n        xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\"\n        xmlns:d=\"http:\/\/schemas.microsoft.com\/expression\/blend\/2008\"\n        xmlns:mc=\"http:\/\/schemas.openxmlformats.org\/markup-compatibility\/2006\"\n        xmlns:i=\"http:\/\/schemas.microsoft.com\/xaml\/behaviors\"\n        xmlns:l=\"http:\/\/schemas.livet-mvvm.net\/2011\/wpf\"\n        xmlns:local=\"clr-namespace:WpfApp16.View\"\n        xmlns:vm=\"clr-namespace:WpfApp16.ViewModel\"\n        mc:Ignorable=\"d\"\n        Title=\"MainView\" Height=\"450\" Width=\"800\">\n\n    &lt;Window.DataContext>\n        &lt;vm:MainViewModel\/>\n    &lt;\/Window.DataContext>\n\n    &lt;i:Interaction.Triggers>\n        &lt;i:EventTrigger EventName =\"ContentRendered\">\n            &lt;l:LivetCallMethodAction MethodTarget=\"{Binding}\" MethodName=\"OnContentRendered\" \/>\n        &lt;\/i:EventTrigger>\n    &lt;\/i:Interaction.Triggers>\n\n    &lt;Grid>\n        &lt;Image Source=\"{Binding BackgroudImage}\" Stretch=\"Uniform\">&lt;\/Image>\n    &lt;\/Grid>\n&lt;\/Window>\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">MainViewModel.cs<\/h2>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-csharp\"><code class=\"language-csharp\">using System;\nusing System.Windows.Media;\nusing System.Windows.Media.Imaging;\n\nnamespace WpfApp16.ViewModel\n{\n    public class MainViewModel : Livet.ViewModel\n    {\n        private ImageSource _BackgroudImage = null;\n        public ImageSource BackgroudImage\n        {\n            get\n            {\n                return _BackgroudImage;\n            }\n            set\n            {\n                _BackgroudImage = value;\n                RaisePropertyChanged();\n            }\n        }\n\n        \/\/\/ &lt;summary>\n        \/\/\/ \u753b\u9762\u8868\u793a\u6642\u51e6\u7406\n        \/\/\/ &lt;\/summary>\n        public void OnContentRendered()\n        {\n            BackgroudImage = new BitmapImage(new Uri(@\"pack:\/\/application:,,,\/Resources\/ikina01.png\"));\n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u7d50\u679c<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"443\" src=\"https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_03.png\" alt=\"\" class=\"wp-image-771\" srcset=\"https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_03.png 786w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_03-300x169.png 300w, https:\/\/todosoft.net\/blog\/wp-content\/uploads\/2020\/06\/image_resource_03-768x433.png 768w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u753b\u50cf\u306e\u767b\u9332 \uff11\uff0e \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3 \u2192 \u30ea\u30bd\u30fc\u30b9 \u2192 \u30a4\u30e1\u30fc\u30b8 \u306b\u3001\u8868\u793a\u3057\u305f\u3044\u753b\u50cf\u3092\u767b\u9332\u3059\u308b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,20,15],"tags":[63],"class_list":["post-768","post","type-post","status-publish","format-standard","hentry","category-c","category-wpf","category-15","tag-resources"],"_links":{"self":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=768"}],"version-history":[{"count":1,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/768\/revisions"}],"predecessor-version":[{"id":772,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/768\/revisions\/772"}],"wp:attachment":[{"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/todosoft.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}