{"id":580,"date":"2021-05-23T20:15:53","date_gmt":"2021-05-23T12:15:53","guid":{"rendered":"http:\/\/www.wayln.com\/?p=580"},"modified":"2021-05-23T20:21:13","modified_gmt":"2021-05-23T12:21:13","slug":"%e7%ac%ac%e4%b8%80%e7%ab%a0-wpf%e6%a6%82%e8%bf%b0","status":"publish","type":"post","link":"https:\/\/www.wayln.com\/?p=580","title":{"rendered":"\u7b2c\u4e00\u7ae0 WPF\u6982\u8ff0"},"content":{"rendered":"<div id=\"toc_container\" class=\"toc_transparent no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#13\"><span class=\"toc_number toc_depth_1\">1<\/span> 1.3 \u5206\u8fa8\u7387\u65e0\u5173\u6027<\/a><ul><li><a href=\"#131_WPF\"><span class=\"toc_number toc_depth_2\">1.1<\/span> 1.3.1 WPF\u5355\u4f4d<\/a><\/li><li><a href=\"#132_DPI\"><span class=\"toc_number toc_depth_2\">1.2<\/span> 1.3.2 \u7cfb\u7edfDPI<\/a><\/li><\/ul><\/li><li><a href=\"#14_WPF\"><span class=\"toc_number toc_depth_1\">2<\/span> 1.4 WPF\u4f53\u7cfb\u7ed3\u6784<\/a><\/li><\/ul><\/div>\n<h1><span id=\"13\">1.3 \u5206\u8fa8\u7387\u65e0\u5173\u6027<\/span><\/h1>\n<h2><span id=\"131_WPF\">1.3.1 WPF\u5355\u4f4d<\/span><\/h2>\n<p>WPF\u4e32\u53e3\u4ee5\u53ca\u5176\u4e2d\u7684\u6240\u6709\u5143\u7d20\u90fd\u4f7f\u7528\u8bbe\u5907\u65e0\u5173\u5355\u4f4d\u8fdb\u884c\u5ea6\u91cf\u3002\u4e00\u4e2a\u8bbe\u5907\u65e0\u5173\u5355\u4f4d\u88ab\u5b9a\u4e49\u4e3a1\/96\u82f1\u5bf8\u3002<br \/>\n\u8bbe\u60f3\u4f7f\u7528WPF\u521b\u5efa\u4e00\u4e2a\u5c3a\u5bf8\u4e3a96&#215;96\u5355\u4f4d\u7684\u5c0f\u6309\u94ae\uff0c\u4f7f\u7528\u6807\u51c6\u7684Windows DPI\u8bbe\u7f6e\uff0896dpi\uff09,\u6bcf\u4e2a\u8bbe\u5907\u65e0\u5173\u5355\u4f4d\u5b9e\u9645\u4e0a\u5bf9\u5e94\u4e00\u4e2a\u7269\u7406\u50cf\u7d20\u3002\u56e0\u4e3a\u5bf9\u4e8e\u8fd9\u79cd\u60c5\u51b5\uff0cWPF\u4f7f\u7528\u4ee5\u4e0b\u516c\u5f0f\u8fdb\u884c\u8ba1\u7b97\uff1a<\/p>\n<div class=\"katex math multi-line no-emojify\">\\left[\u7269\u7406\u5355\u4f4d\u5c3a\u5bf8\\right]=\\left[\u8bbe\u5907\u65e0\u5173\u5355\u4f4d\u5c3a\u5bf8\\right]\\times \\left[\u7cfb\u7edfDPI\\right]\\\\<br \/>\n=1\/96\u82f1\u5bf8 \\times 96dpi\\\\<br \/>\n=1\u50cf\u7d20\n<\/div>\n<p>\u672c\u8d28\u4e0a\uff0cWPF\u5047\u5b9a\u4f7f\u752896\u4e2a\u50cf\u7d20\u6784\u62101\u82f1\u5bf8\uff0c\u56e0\u4e3a\u8fd9\u662fWindows\u64cd\u4f5c\u7cfb\u7edf\u901a\u8fc7\u7cfb\u7edfDPI\u8bbe\u7f6e\u544a\u8bc9WPF\u7684\uff0c\u4f46\u662f\uff0c\u5b9e\u9645\u4e0a\u4f9d\u8d56\u4e8e\u663e\u793a\u8bbe\u5907\u3002<br \/>\n\u4f8b\u5982\uff0c\u8003\u8651\u4e00\u4e2a\u6700\u5927\u5206\u8fa8\u7387\u4e3a1600\u50cf\u7d20<span class=\"katex math inline\">\\times<\/span>1200\u50cf\u7d20\u768419\u82f1\u5bf8LCD\u663e\u793a\u5668\u3002\u4f7f\u7528\u52fe\u80a1\u5b9a\u7406\u53ef\u4ee5\u8ba1\u7b97\u51fa\u8fd9\u4e2a\u663e\u793a\u5668\u7684\u50cf\u7d20\u5bc6\u5ea6\uff1a<\/p>\n<div class=\"katex math multi-line no-emojify\">\\left[\u5c4f\u5e55DPI\\right] = \\frac{\\sqrt{1600^2+1200^2}\u50cf\u7d20}{19\u82f1\u5bf8}\\\\<br \/>\n=100dpi\n<\/div>\n<p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u50cf\u7d20\u5bc6\u5ea6\u8fbe\u5230100dpi,\u6bd4windows\u5047\u5b9a\u7684\u6570\u503c\u7a0d\u9ad8\u3002\u56e0\u6b64\u5728\u8fd9\u4e2a\u663e\u793a\u5668\u4e0a\uff0c\u4e00\u4e2a96&#215;96\u50cf\u7d20\u7684\u6309\u94ae\u5c06\u7a0d\u5c0f\u4e8e1\u82f1\u5bf8\u3002<\/p>\n<h2><span id=\"132_DPI\">1.3.2 \u7cfb\u7edfDPI<\/span><\/h2>\n<p>WPF\u672c\u8eab\u5c31\u652f\u6301\u7cfb\u7edfDPI\u8bbe\u7f6e\u3002\u5047\u5982\uff0c\u5982\u679c\u5c06\u7cfb\u7edfDPI\u8bbe\u7f6e\u6539\u4e3a120dpi(\u9ad8\u5206\u8fa8\u7387\u663e\u793a\u5668\u7684\u7528\u6237\u901a\u5e38\u9009\u62e9\u8fd9\u4e48\u505a)\uff0cWPF\u5047\u5b9a\u5b83\u9700\u8981120\u4e2a\u50cf\u7d20\u6765\u586b\u6ee11\u82f1\u5bf8\u7a7a\u95f4\u3002WPF\u4f7f\u7528\u4ee5\u4e0b\u516c\u5f0f\u8ba1\u7b97\u5982\u4f55\u5c06\u903b\u8f91\u5355\u4f4d\u53d8\u6362\u4e3a\u7269\u7406\u8bbe\u5907\u50cf\u7d20\uff1a<\/p>\n<div class=\"katex math multi-line no-emojify\">\\left[\u7269\u7406\u5355\u4f4d\u5c3a\u5bf8\\right] = \\left[\u8bbe\u5907\u65e0\u5173\u5355\u4f4d\u5c3a\u5bf8\\right]\\times \\left[\u7cfb\u7edfDPI\\right]\\\\<br \/>\n=1\/96\u82f1\u5bf8 \\times 120dpi \\\\<br \/>\n=1.25\u50cf\u7d20\n<\/div>\n<p>\u6362\u53e5\u8bdd\u8bf4\uff0c\u5c06\u7cfb\u7edfDPI\u8bbe\u7f6e\u4e3a120dpi\u65f6,WPF\u6e32\u67d3\u5f15\u64ce\u5047\u5b9a\u4e00\u4e2a\u8bbe\u5907\u65e0\u5173\u5355\u4f4d\u7b49\u4e8e1.25\u50cf\u7d20\u3002\u5982\u679c\u73b0\u5b9e\u4e00\u4e2a96&#215;96\u5927\u5c0f\u7684\u6309\u94ae\uff0c\u7269\u7406\u5c3a\u5bf8\u5b9e\u9645\u4e3a120\u50cf\u7d20X120\u50cf\u7d20\uff08\u56e0\u4e3a96&#215;1.25=120\uff09\u3002\u8fd9\u6b63\u662f\u6240\u671f\u671b\u7684\u7ed3\u679c\u2014\u2014\u4e00\u4e2a\u5728\u6807\u51c6\u663e\u793a\u5668\u4e0a\u5927\u5c0f\u4e3a1\u82f1\u5bf8\u7684\u6309\u94ae\uff0c\u5728\u50cf\u7d20\u5bc6\u5ea6\u66f4\u9ad8\u7684\u663e\u793a\u5668\u4e0a\u4ecd\u7136\u4fdd\u63011\u82f1\u5bf8\u5927\u5c0f\u3002<\/p>\n<h1><span id=\"14_WPF\">1.4 WPF\u4f53\u7cfb\u7ed3\u6784<\/span><\/h1>\n<div class=\"mermaid mermaid-diagram no-emojify\"><script type=\"text\/javascript\">document.write(\"graph TD\\nA[PresentationFramework.dll&lt;br&gt;PresentationCore.dll&lt;br&gt;WindowsBase.dll]  \\nA--&gt;B[milcore.dll&lt;br&gt;WindowsCodecs.dll]\\nB--&gt;C[Direct3D&lt;br&gt;User32]\\n\");<\/script><\/div>\n<ul>\n<li>PresentationFramework.dll\u5305\u542b\u4e86WPF\u9876\u5c42\u7684\u7c7b\u578b\uff0c\u5305\u62ec\u90a3\u4e9b\u8868\u793a\u7a97\u53e3\u3001\u9762\u677f\u4ee5\u53ca\u5176\u4ed6\u7c7b\u578b\u63a7\u4ef6\u7684\u7c7b\u578b\u3002\u5b83\u8fd8\u5b9e\u73b0\u4e86\u9ad8\u5c42\u62bd\u8c61\u7f16\u7a0b\uff0c\u5982\u6837\u5f0f\u3002<\/li>\n<li>PresentationCore.dll\u5305\u542b\u4e86\u57fa\u7840\u7c7b\u578b\uff0c\u5982UIElement\u7c7b\u548cVisual\u7c7b\uff0c\u6240\u6709\u5f62\u72b6\u7c7b\u548c\u63a7\u4ef6\u7c7b\u90fd\u7ee7\u627f\u81ea\u8fd9\u4e24\u4e2a\u7c7b<\/li>\n<li>WindowsBase.dll\u5305\u542b\u4e86\u66f4\u591a\u57fa\u672c\u8981\u7d20\uff0c\u8fd9\u4e9b\u8981\u7d20\u5177\u6709\u5728WPF\u4e4b\u5916\u91cd\u7528\u7684\u6f5c\u80fd\uff0c\u5982DispatcherObject\u7c7b\u548cDependencyObject\u7c7b\uff0c\u8fd9\u4e24\u4e2a\u7c7b\u5f15\u5165\u4e86\u4f9d\u8d56\u9879\u5c5e\u6027<\/li>\n<li>milcore.dll\u662fWPF\u6e32\u67d3\u7cfb\u7edf\u7684\u6838\u5fc3\uff0c\u4e5f\u662f\u5a92\u4f53\u96c6\u6210\u5c42\u7684\u57fa\u7840<\/li>\n<li>WindowsCodecs.dll \u662f\u4e00\u5957\u63d0\u4f9b\u56fe\u50cf\u652f\u6301\u7684\u4f4e\u7ea7API\uff08\u4f8b\u5982\uff0c\u5904\u7406\u548c\u663e\u793a\u4ee5\u53ca\u7f29\u653e\u4f4d\u56fe\u4e0eJPEG\u56fe\u50cf\uff09<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 1.3 \u5206\u8fa8\u7387\u65e0\u5173\u60271.1 1.3.1 WPF\u5355\u4f4d1.2 1.3.2 \u7cfb\u7edfDPI2 1.4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":581,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,35,36,2],"tags":[],"class_list":["post-580","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c","category-wpf","category-2"],"_links":{"self":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=580"}],"version-history":[{"count":2,"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts\/580\/revisions"}],"predecessor-version":[{"id":583,"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/posts\/580\/revisions\/583"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=\/wp\/v2\/media\/581"}],"wp:attachment":[{"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wayln.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}