{"id":157337,"date":"2012-11-04T14:00:03","date_gmt":"2012-11-04T10:00:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=157337"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=157337","title":{"rendered":"<span class=\"post_title\">WPF: 4 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u0438\u043a\u043e\u043d\u043a\u043e\u0439 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u042f \u0434\u0443\u043c\u0430\u044e \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 (\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439), \u0438\u0437 \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 WPF \u0438\u0437 WinForms, \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0442\u0435\u0440\u044f\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432. <br \/>  \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u2013 \u0432\u043e\u0442 \u043e\u043d \u2014 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b. <br \/>  \u041e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u0438\u0437 WinForms. \u0414\u0430\u0436\u0435 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442, \u043b\u0438\u0431\u043e \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e (\u043d\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e Enabled \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0443 Is). \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u044f\u0431\u0438\u0442 \u0432 \u0433\u043b\u0430\u0437\u0430\u0445. <br \/>  \u041d\u043e \u043f\u0440\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0441\u043d\u043e\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043d\u0430\u0442\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0442\u0430 \u0441\u0430\u043c\u0430\u044f \u0440\u0430\u0441\u0442\u0435\u0440\u044f\u043d\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u0442\u0430\u043a? \u041d\u0443 \u043d\u0435\u0443\u0436\u0435\u043b\u0438 \u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 Image? \u0412\u044b \u0432\u0435\u0434\u044c \u0448\u0443\u0442\u0438\u0442\u0435, \u043f\u0440\u0430\u0432\u0434\u0430?<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 WPF (\u0442\u043e\u0447\u043d\u0435\u0435 \u0443 XAML) \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0438\u043d\u0430\u044f \u0438\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043b\u0438\u0448\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 (\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u0442\u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u044e) \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0449\u043d\u044b\u043c\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438 \u0441\u0442\u0438\u043b\u0435\u0439. <br \/>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u043e\u043d\u0438, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e, \u043b\u0438\u0431\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b, \u043b\u0438\u0431\u043e \u0431\u0435\u0437\u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438, \u043b\u0438\u0431\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u0442\u043d\u044b\u0435.<\/p>\n<p>  \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u044f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 (\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b) \u0437\u0430\u0434\u0430\u0447\u0438. \u042f \u0438\u0441\u0442\u0435\u0440\u0437\u0430\u043b \u0432\u0435\u0441\u044c \u0433\u0443\u0433\u043b \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0442\u0438\u043f\u0430 \u201cXAML button with image\u201d \u201cWPF button image text\u201d \u0438 \u0442.\u0434.<\/p>\n<p>  \u0421\u0440\u0435\u0434\u0438 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043a\u0430\u043a \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 (\u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0435) \u043f\u0443\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u043e\u0449\u0440\u0435\u043d\u043d\u044b\u0435. <\/p>\n<p>  <i>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440 1<\/i><br \/>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 \u0436\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0430\u043b\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e XAML \u0438 \u0438\u043a\u043e\u043d\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 png \u2013 \u0432\u0435\u0449\u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435. \u041d\u0435 \u0431\u0443\u0434\u0443 \u0434\u043e\u043b\u0433\u043e \u0440\u0430\u0441\u0442\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u2013 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u0438 \u043d\u0435\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0440\u0430\u0437\u043c\u044b\u0442\u044b\u0435, \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0443\u0434\u0440\u0443\u0447\u0430\u044e\u0449\u0435 \u0438 \u0442.\u0434\u2026<br \/>  \u041d\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0433\u043e\u0440\u0447\u0430\u0442\u044c\u0441\u044f \u2013 \u0432 \u0441\u0435\u0442\u0438 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0438 \u0441\u043e\u0442\u043d\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438. <br \/>  \u041b\u0443\u0447\u0448\u0435\u0435 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u043d\u0430\u0448\u0435\u043b \u2013 <a href=\"http:\/\/www.syncfusion.com\/downloads\/metrostudio\">SyncFusion Metro Studio 2<\/a> (\u043d\u0435 \u0440\u0435\u043a\u043b\u0430\u043c\u0430). \u042d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c 1700 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a \u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u044d\u0442\u0438\u0445 \u0438\u043a\u043e\u043d\u043e\u043a \u0432 XAML. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c Path, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c\u0443 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e \u0438\u043a\u043e\u043d\u043a\u0438. <br \/>  \u0421 \u044d\u0442\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u044f \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e \u0442\u0430\u043a \u2013 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e <i>ResourceDictionary<\/i> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c Icons.xaml \u0438 \u043a\u043b\u0430\u0434\u0443 \u0432 \u043d\u0435\u0433\u043e \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043d\u0435 \u0438\u043a\u043e\u043d\u043a\u0438:<\/p>\n<pre><code class=\"xml\">&lt;ResourceDictionary \txmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;  \txmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;&gt; \t&lt;!-- Resource dictionary entries should be defined here. --&gt; \t     &lt;Path x:Key=&quot;IconTriangle&quot; Stretch=&quot;Uniform&quot; Data=&quot;M50.25,133.5 L49.75,158.25 76,147.25 z&quot; Fill=&quot;Black&quot; Stroke=&quot;Black&quot;\/&gt; &lt;\/ResourceDictionary&gt; <\/code><\/pre>\n<p>  \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u0438\u043a\u043e\u043d\u043a\u043e\u0439.<\/p>\n<h5>\u041f\u0435\u0440\u0432\u044b\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2013 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 <i>Content<\/i> \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434\u0435 \u0444\u043e\u0440\u043c\u044b<\/h5>\n<p>  <\/p>\n<pre><code class=\"xml\">        &lt;Button              HorizontalAlignment=&quot;Center&quot;              VerticalAlignment=&quot;Center&quot;&gt;             &lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;                 &lt;ContentControl Width=&quot;16&quot; Height=&quot;16&quot; Margin=&quot;4&quot; Content=&quot;{DynamicResource IconTriangle}&quot;\/&gt;                 &lt;TextBlock HorizontalAlignment=&quot;Center&quot; VerticalAlignment=&quot;Center&quot;&gt;Button&lt;\/TextBlock&gt;             &lt;\/StackPanel&gt;         &lt;\/Button&gt; <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/6aa\/af3\/95f\/6aaaf395f2810fbc80d8903a1444a3f8.png\"\/> <br \/>  \u041d\u0443, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0451 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435. \u0415\u0441\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430, \u0443 \u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0430 \u0438 \u0442\u0435\u043a\u0441\u0442. \u0422\u0435\u0445, \u043a\u0442\u043e \u043f\u043e\u0432\u0435\u0440\u0438\u0442 \u0432 \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0438 \u0441\u0442\u0438\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043e\u0447\u0435\u043d\u044c \u0441\u043a\u043e\u0440\u043e \u0436\u0434\u0451\u0442 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0418 \u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443: \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0442\u0438\u043b\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0441\u043f\u0443\u0445\u0430\u043d\u0438\u044e XAML \u0437\u0430 \u0441\u0447\u0435\u0442 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434\u0435 \u0444\u043e\u0440\u043c\u044b. 10 \u043a\u043d\u043e\u043f\u043e\u043a \u2013 10 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439. \u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u00ab\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435-\u043a\u0430 \u043f\u043e\u043a\u0440\u0430\u0441\u0438\u043c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430\u0445 \u0432 \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0446\u0432\u0435\u0442\u00bb \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442 \u0438 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0440\u0430\u0441\u043f\u0443\u0445\u0430\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b.<\/p>\n<h5>\u0412\u0442\u043e\u0440\u043e\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 <i>Button<\/i><\/h5>\n<p>  \u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u00ab\u0441\u0432\u043e\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u0441 \u0431\u043b\u0435\u043a\u0434\u0436\u0435\u043a\u043e\u043c \u0438 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u0441 \u0447\u0435\u043c \u0435\u0449\u0435\u00bb? <br \/>  \u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0441\u044f \u043e\u0442 <i>Button<\/i> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <i>DependencyProperty<\/i> \u0434\u043b\u044f <i>ContentControl<\/i>, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437 XAML \u0444\u043e\u0440\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0438\u043a\u043e\u043d\u043a\u0438. \u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u0432\u043d\u0438\u0437\u0443 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438, \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c), \u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u043c\u0438\u043d\u0443\u0441\u044b \u2013 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430, \u043d\u0430 C#. \u041e\u0442\u0441\u044e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0443 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u0438 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u0430\u0445\u043d\u0435\u0442.<\/p>\n<h5>\u0422\u0440\u0435\u0442\u0438\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c <i>UserControl<\/i>.<\/h5>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c <i>UserControl<\/i>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u043b\u0430\u0434\u0435\u043c \u043e\u0434\u043d\u0443 \u043b\u0438\u0448\u044c \u043a\u043d\u043e\u043f\u043a\u0443. \u0412 <i>UserControl<\/i> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c <i>DependencyProperty<\/i>, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443 \u0434\u043b\u044f <i>ContentControl<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u043a\u043d\u043e\u043f\u043a\u0435. \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e \u043f\u0440\u0430\u0432\u0443 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u0435\u0434\u0430\u043b\u044c \u0437\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u0440\u044f\u0432\u043e\u0441\u0442\u044c. \u041e\u043d \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445. \u0412 \u043a\u043e\u0434\u0435 \u0444\u043e\u0440\u043c\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <i>UserControl<\/i>, \u043d\u043e \u0442\u0435\u0440\u044f\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443. \u0422\u0435\u0440\u044f\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438. <a href=\"http:\/\/blogs.msdn.com\/b\/knom\/archive\/2007\/10\/31\/wpf-control-development-3-ways-to-build-an-imagebutton.aspx\">\u0410\u0432\u0442\u043e\u0440 \u0438\u0434\u0435\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442<\/a> \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043e, \u0447\u0435\u0440\u0435\u0437 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 <i>DependencyProperty<\/i>, \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438. \u0421\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0437\u0430 \u0447\u0442\u043e \u0436\u0435 \u043c\u044b \u0431\u043e\u0440\u043e\u043b\u0438\u0441\u044c.<\/p>\n<h5>\u0427\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 AttachedProperty<\/h5>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u044f \u043e\u0442\u043d\u043e\u0448\u0443 \u043a \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u0438 \u0438\u0437\u043e\u0449\u0440\u0435\u043d\u043d\u044b\u043c. \u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 <a href=\"http:\/\/www.hardcodet.net\/2009\/01\/create-wpf-image-button-through-attached-properties\">\u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 <i>AttachedProperty<\/i>. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u044f \u0438 \u0432\u044b\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u044f \u043e\u043f\u0438\u0448\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u041e\u043d \u043d\u0435 \u043b\u0438\u0448\u0435\u043d \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u043e\u043f\u0438\u0448\u0443 \u043d\u0438\u0436\u0435), \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u043c\u043d\u0435 \u043e\u043d \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u0430\u0432\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0438\u043a\u043e\u043d\u043a\u0443 \u0432 \u0432\u0438\u0434\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 png, \u044f \u0436\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0438\u043a\u043e\u043d\u043a\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043b\u044e\u0448\u0435\u043a.<\/p>\n<h6>\u0418\u0442\u0430\u043a, \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438. \u0427\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u044d\u0442\u043e \u0441\u0430\u043c\u043e\u0435 <i>AttachedProperty<\/i><\/h6>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 XAML \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 <i>Attached<\/i> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u043a\u043e\u0433\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0434\u0430\u0432\u0430\u043b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>Grid.Column<\/i>.<br \/>  \u0415\u0441\u043b\u0438 \u0432 \u0442\u0440\u0451\u0445 \u0441\u043b\u043e\u0432\u0430\u0445 \u2013 \u0442\u043e \u044d\u0442\u043e \u0441\u0432\u043e\u0435\u0439 \u0438\u0434\u0435\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 Extension \u0438\u0437 Linq. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u043c\u0443 <i>DependencyObject<\/i>. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a (\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 MSDN):<\/p>\n<pre><code class=\"cs\">public class AquariumObject {     public static readonly DependencyProperty IsBubbleSourceProperty = DependencyProperty.RegisterAttached( \t\t&quot;IsBubbleSource&quot;, \t\ttypeof(Boolean), \t\ttypeof(AquariumObject), \t\tnew FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)     );     public static void SetIsBubbleSource(UIElement element, Boolean value)     {     \telement.SetValue(IsBubbleSourceProperty, value);     }     public static Boolean GetIsBubbleSource(UIElement element)     { \treturn (Boolean)element.GetValue(IsBubbleSourceProperty);     }  } <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>IsBubleSource<\/i>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043b\u044e\u0431\u043e\u043c\u0443 <i>DependencyObject<\/i>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043c\u0443 \u0436\u0435 <i>Button<\/i>, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"xml\">&lt;Button AquariumObject.IsBubbleSource=&quot;True&quot;&gt;Button&lt;\/Button&gt; <\/code><\/pre>\n<p>  \u041e\u0431\u0449\u0438\u0439 \u0441\u043c\u044b\u0441\u043b \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u2013 \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 IsBubbleSource \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u043c\u0435\u0442\u043e\u0434 <i>SetIsBubbleSource<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u043c\u0435\u0442\u043e\u0434 <i>GetIsBubbleSource<\/i>. \u042d\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0438\u0448\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 Set \u0438 Get, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u2013 \u0434\u0435\u043b\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u043c\u0430\u043b\u043e \u043a\u043e\u0434\u0430, \u0441\u0430\u043c\u043e\u043c\u0443 <i>Button<\/i> \u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0438 \u0436\u0430\u0440\u043a\u043e \u043d\u0438 \u0445\u043e\u043b\u043e\u0434\u043d\u043e \u2013 \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 <i>SetIsBubbleSource<\/i> \u0438 <i>GetIsBubbleSource<\/i> \u0445\u0438\u0442\u0440\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c <i>element<\/i> \u043a <i>Button<\/i>, \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u043e \u044d\u0442\u043e \u043e\u043f\u044f\u0442\u044c \u043f\u043b\u043e\u0445\u043e \u043f\u0430\u0445\u043d\u0435\u0442, \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. <\/p>\n<h5>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/h5>\n<p>  <i>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 2<\/i><br \/>  \u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u0430\u0432\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 EyeCandy \u0438 namespace \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u043e \u044d\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u043e \u0438 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u044f\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u2013 namespace Ext \u0438 \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 E.<\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0435\u043a\u0442 WPF \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"cs\">using System.Windows; using System.Windows.Controls; using System.Windows.Media;  namespace Ext { \tpublic class E \t{ \t\tpublic static readonly DependencyProperty IconProperty;  \t\tstatic E() \t\t{ \t\t\tvar metadata = new FrameworkPropertyMetadata(null); \t\t\tIconProperty = DependencyProperty.RegisterAttached(&quot;Icon&quot;, \ttypeof(FrameworkElement), \ttypeof(E), metadata);  \t\t}  \t\tpublic static FrameworkElement GetIcon(DependencyObject obj) \t\t{ \t\t\treturn obj.GetValue(IconProperty); \t\t}  \t\tpublic static void SetIcon(DependencyObject obj, FrameworkElement value) \t\t{ \t\t\tobj.SetValue(IconProperty, value); \t\t}        } } <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u041c\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 <i>Attached<\/i> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>Icon<\/i> \u0442\u0438\u043f\u0430 <i>FrameworkElement<\/i> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u044b\u043c null.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043a\u043d\u043e\u043f\u043a\u0438. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u00ab\u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442\u00bb \u2013 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443-\u0442\u043e \u044d\u0442\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u2013 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0435\u0442\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e.<br \/>  \u0418\u0442\u0430\u043a, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 <i>ResourceDictionary<\/i> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c Styles.xaml (\u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0435\u0449\u0435 \u043d\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0441\u0442\u0438\u043b\u0435\u0439). \u0412 \u044d\u0442\u043e\u043c <i>ResourceDictionary <\/i> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;ResourceDictionary  \txmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;  \txmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;  \txmlns:Microsoft_Windows_Themes=&quot;clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero&quot;&gt; \t&lt;Style x:Key=&quot;ButtonFocusVisual&quot;&gt; \t\t&lt;Setter Property=&quot;Control.Template&quot;&gt; \t\t\t&lt;Setter.Value&gt; \t\t\t\t&lt;ControlTemplate&gt; \t\t\t\t\t&lt;Rectangle Margin=&quot;2&quot; SnapsToDevicePixels=&quot;true&quot; Stroke=&quot;{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}&quot; StrokeThickness=&quot;1&quot; StrokeDashArray=&quot;1 2&quot;\/&gt; \t\t\t\t&lt;\/ControlTemplate&gt; \t\t\t&lt;\/Setter.Value&gt; \t\t&lt;\/Setter&gt; \t&lt;\/Style&gt; \t&lt;!-- Resource dictionary entries should be defined here. --&gt; \t&lt;LinearGradientBrush x:Key=&quot;ButtonNormalBackground&quot; EndPoint=&quot;0,1&quot; StartPoint=&quot;0,0&quot;&gt; \t\t&lt;GradientStop Color=&quot;#F3F3F3&quot; Offset=&quot;0&quot;\/&gt; \t\t&lt;GradientStop Color=&quot;#EBEBEB&quot; Offset=&quot;0.5&quot;\/&gt; \t\t&lt;GradientStop Color=&quot;#DDDDDD&quot; Offset=&quot;0.5&quot;\/&gt; \t\t&lt;GradientStop Color=&quot;#CDCDCD&quot; Offset=&quot;1&quot;\/&gt; \t&lt;\/LinearGradientBrush&gt; \t&lt;SolidColorBrush x:Key=&quot;ButtonNormalBorder&quot; Color=&quot;#FF707070&quot;\/&gt; \t&lt;Style TargetType=&quot;{x:Type Button}&quot;&gt; \t\t&lt;Setter Property=&quot;FocusVisualStyle&quot; Value=&quot;{StaticResource ButtonFocusVisual}&quot;\/&gt; \t\t&lt;Setter Property=&quot;Background&quot; Value=&quot;{StaticResource ButtonNormalBackground}&quot;\/&gt; \t\t&lt;Setter Property=&quot;BorderBrush&quot; Value=&quot;{StaticResource ButtonNormalBorder}&quot;\/&gt; \t\t&lt;Setter Property=&quot;BorderThickness&quot; Value=&quot;1&quot;\/&gt; \t\t&lt;Setter Property=&quot;Foreground&quot; Value=&quot;{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}&quot;\/&gt; \t\t&lt;Setter Property=&quot;HorizontalContentAlignment&quot; Value=&quot;Center&quot;\/&gt; \t\t&lt;Setter Property=&quot;VerticalContentAlignment&quot; Value=&quot;Center&quot;\/&gt; \t\t&lt;Setter Property=&quot;Padding&quot; Value=&quot;1&quot;\/&gt; \t\t&lt;Setter Property=&quot;Template&quot;&gt; \t\t\t&lt;Setter.Value&gt; \t\t\t\t&lt;ControlTemplate TargetType=&quot;{x:Type Button}&quot;&gt; \t\t\t\t\t&lt;Microsoft_Windows_Themes:ButtonChrome x:Name=&quot;Chrome&quot; BorderBrush=&quot;{TemplateBinding BorderBrush}&quot; Background=&quot;{TemplateBinding Background}&quot; RenderMouseOver=&quot;{TemplateBinding IsMouseOver}&quot; RenderPressed=&quot;{TemplateBinding IsPressed}&quot; RenderDefaulted=&quot;{TemplateBinding IsDefaulted}&quot; SnapsToDevicePixels=&quot;true&quot;&gt; \t\t\t\t\t\t&lt;VisualStateManager.VisualStateGroups&gt; \t\t\t\t\t\t\t&lt;VisualStateGroup x:Name=&quot;CommonStates&quot;&gt; \t\t\t\t\t\t\t\t&lt;VisualState x:Name=&quot;Normal&quot;\/&gt; \t\t\t\t\t\t\t\t&lt;VisualState x:Name=&quot;MouseOver&quot;\/&gt; \t\t\t\t\t\t\t\t&lt;VisualState x:Name=&quot;Pressed&quot;\/&gt; \t\t\t\t\t\t\t\t&lt;VisualState x:Name=&quot;Disabled&quot;&gt; \t\t\t\t\t\t\t\t\t&lt;Storyboard&gt; \t&lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=&quot;(UIElement.Opacity)&quot; Storyboard.TargetName=&quot;IconContent&quot;&gt; \t\t\t\t\t\t\t\t\t\t\t&lt;EasingDoubleKeyFrame KeyTime=&quot;0&quot; Value=&quot;0.5&quot;\/&gt; \t\t\t\t\t\t\t\t\t\t&lt;\/DoubleAnimationUsingKeyFrames&gt; \t\t\t\t\t\t\t\t\t&lt;\/Storyboard&gt; \t\t\t\t\t\t\t\t&lt;\/VisualState&gt; \t\t\t\t\t\t\t&lt;\/VisualStateGroup&gt; \t\t\t\t\t\t&lt;\/VisualStateManager.VisualStateGroups&gt; \t\t\t\t\t\t&lt;StackPanel&gt; \t\t\t\t\t\t\t&lt;ContentControl  \t\t\t\t\t\t\t\tContent=&quot;{DynamicResource IconTriangle}&quot; \t\t\t\t\t\t\t\tWidth=&quot;16&quot; \t\t\t\t\t\t\t\tHeight=&quot;16&quot; \t\t\t\t\t\t\t\tx:Name=&quot;IconContent&quot; Margin=&quot;4&quot; RenderTransformOrigin=&quot;0.5,0.5&quot; IsEnabled=&quot;{Binding IsEnabled, ElementName=Chrome}&quot;&gt; \t\t\t\t\t\t\t\t&lt;ContentControl.Effect&gt; \t\t\t\t\t\t\t\t\t&lt;DropShadowEffect Opacity=&quot;0&quot; BlurRadius=&quot;2&quot;\/&gt; \t\t\t\t\t\t\t\t&lt;\/ContentControl.Effect&gt; \t\t\t\t\t\t\t\t&lt;ContentControl.RenderTransform&gt; \t\t\t\t\t\t\t\t\t&lt;TransformGroup&gt; \t\t\t\t\t\t\t\t\t\t&lt;ScaleTransform\/&gt; \t\t\t\t\t\t\t\t\t\t&lt;SkewTransform\/&gt; \t\t\t\t\t\t\t\t\t\t&lt;RotateTransform\/&gt; \t\t\t\t\t\t\t\t\t\t&lt;TranslateTransform\/&gt; \t\t\t\t\t\t\t\t\t&lt;\/TransformGroup&gt; \t\t\t\t\t\t\t\t&lt;\/ContentControl.RenderTransform&gt; \t\t\t\t\t\t\t&lt;\/ContentControl&gt; \t\t\t\t\t\t\t&lt;TextBlock x:Name=&quot;textBlock&quot; Margin=&quot;4&quot; TextWrapping=&quot;Wrap&quot; Text=&quot;{TemplateBinding Content}&quot; VerticalAlignment=&quot;Center&quot; HorizontalAlignment=&quot;Center&quot;\/&gt; \t\t\t\t\t\t&lt;\/StackPanel&gt; \t\t\t\t\t&lt;\/Microsoft_Windows_Themes:ButtonChrome&gt; \t\t\t\t\t&lt;ControlTemplate.Triggers&gt; \t\t\t\t\t\t&lt;Trigger Property=&quot;IsKeyboardFocused&quot; Value=&quot;true&quot;&gt; \t\t\t\t\t\t\t&lt;Setter Property=&quot;RenderDefaulted&quot; TargetName=&quot;Chrome&quot; Value=&quot;true&quot;\/&gt; \t\t\t\t\t\t&lt;\/Trigger&gt; \t\t\t\t\t\t&lt;Trigger Property=&quot;ToggleButton.IsChecked&quot; Value=&quot;true&quot;&gt; \t\t\t\t\t\t\t&lt;Setter Property=&quot;RenderPressed&quot; TargetName=&quot;Chrome&quot; Value=&quot;true&quot;\/&gt; \t\t\t\t\t\t&lt;\/Trigger&gt; \t\t\t\t\t\t&lt;Trigger Property=&quot;IsEnabled&quot; Value=&quot;false&quot;&gt; \t\t\t\t\t\t\t&lt;Setter Property=&quot;Foreground&quot; Value=&quot;#ADADAD&quot;\/&gt; \t\t\t\t\t\t&lt;\/Trigger&gt; \t\t\t\t\t&lt;\/ControlTemplate.Triggers&gt; \t\t\t\t&lt;\/ControlTemplate&gt; \t\t\t&lt;\/Setter.Value&gt; \t\t&lt;\/Setter&gt; \t&lt;\/Style&gt; \t&lt;SolidColorBrush x:Key=&quot;IconColor&quot; Color=&quot;Black&quot; \/&gt; &lt;\/ResourceDictionary&gt; <\/code><\/pre>\n<p>  \u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435. \u042d\u0442\u0430 \u0437\u0430\u043f\u0438\u0441\u044c <i>ResourceDictionary<\/i> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043b\u044e\u0431\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u044d\u0442\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 WPF, \u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 <i>StackPanel<\/i>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043b\u0435\u0436\u0430\u0442 <i>ContentControl<\/i> \u0438 <i>TextBlock<\/i>, \u0442.\u0435. \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u044f \u0437\u0430\u0434\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0438\u043a\u043e\u043d\u043a\u0438 \u2013 \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u043e <i>IsEnabled == False<\/i>, \u0442\u043e \u0438\u043a\u043e\u043d\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c 50%, \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0445\u043e\u0436\u0435\u0439 \u043d\u0430 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430 \u043d\u0430\u0448\u0443 \u0444\u043e\u0440\u043c\u0443 4 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438. \u041d\u0430\u0437\u043d\u0430\u0447\u0438\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435 \u0441\u0432\u043e\u0439 \u0442\u0435\u043a\u0441\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0430\u043a: <i>Content=\u00ab\u041a\u043d\u043e\u043f\u043a\u0430 1\u00bb<\/i>. <br \/>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u044e\u0440\u043f\u0440\u0438\u0437. <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/3e7\/de6\/668\/3e7de6668c4d4ebbdac4a5f9c72f7e8b.png\"\/> <br \/>  \u041b\u0438\u0447\u043d\u043e \u044f \u043e\u0436\u0438\u0434\u0430\u043b \u0443\u0432\u0438\u0434\u0435\u0442\u044c 4 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c. \u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u044b\u0442\u0440\u044f\u0441\u0442\u0438 \u0443 \u0433\u0443\u0433\u043b\u0430 \u043e\u0442\u0432\u0435\u0442 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0442\u0438\u043f\u0430 \u201cAssign same DynamicResource two elements wpf\u201d \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043d\u0435 \u0434\u0430\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0432\u0440\u0430\u0437\u0443\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442 \u043c\u043d\u0435 \u0432 \u0447\u0435\u043c \u044f \u043d\u0435\u043f\u0440\u0430\u0432, \u043d\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u043e\u043b\u0438 \u043d\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u2013 \u043b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0438\u043a\u043e\u043d\u043a\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430\u0445 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 (\u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u0418\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u043a\u043e\u043d\u043a\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2013 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e, \u0447\u0435\u0433\u043e \u043c\u044b \u0434\u043e\u0431\u0438\u0432\u0430\u0435\u043c\u0441\u044f, \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 \u0434\u0435\u043b\u043e \u043d\u0430\u0448\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043e\u0440\u0443\u0436\u0438\u0435 \u2013 \u043a\u043b\u0430\u0441\u0441 Ext.E \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <i>AttachedProperty<\/i>. \u0414\u043b\u044f \u043d\u0435\u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043c\u0430\u0433\u0438\u044e (\u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u043c\u0435\u043d\u044f, \u043a\u043e\u0433\u0434\u0430 \u044f \u044d\u0442\u043e \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0443\u0432\u0438\u0434\u0435\u043b), \u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0438\u043a\u043d\u0443\u0442\u044c, \u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0437\u0430 \u0441\u0447\u0435\u0442 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0438\u0434\u0435\u043c \u0432 \u043d\u0430\u0448 \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Styles.xaml \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043d\u043e\u0432\u044b\u0439 <i>namespace<\/i>:<\/p>\n<pre><code class=\"xml\">xmlns:Ext=&quot;clr-namespace:Ext&quot; <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u043d\u0438\u0436\u0435 \u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f <i>ContentControl <\/i>\u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:  <\/p>\n<pre><code class=\"xml\">&lt;ContentControl  \tContent=&quot;{DynamicResource IconTriangle}&quot; ... <\/code><\/pre>\n<p>  \u041c\u0435\u043d\u044f\u0435\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u043d\u0430:  <\/p>\n<pre><code class=\"xml\">\tContent=&quot;{Binding (Ext:E.Icon), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}&quot; <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <i>ContentControl<\/i> \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 Ext.E.Icon \u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u0432\u043e\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 Ext.E.Icon \u0432 \u0441\u0430\u043c\u0443 \u043a\u043d\u043e\u043f\u043a\u0443. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u0444\u043e\u0440\u043c\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430.<\/p>\n<pre><code class=\"xml\">&lt;Button  \tExt:E.Icon=&quot;{DynamicResource IconTriangle}&quot; \tContent=&quot;\u041a\u043d\u043e\u043f\u043a\u0430 1&quot; \/&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u0438\u043a\u043e\u043d\u043a\u043e\u0439 \u0433\u043e\u0442\u043e\u0432. \u041c\u0435\u043d\u044f\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>IconTriangle<\/i> \u043d\u0430 \u0438\u043c\u0435\u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043a\u043e\u043d\u043a\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430\u0445. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0445 \u0442\u0440\u0435\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u0432\u0441\u0435 \u0435\u0435 \u0432\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043a \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <i>Content<\/i>, \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439). \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0438\u0437 C#, \u0438 \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<h5>\u041f\u043e\u0439\u0434\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/h5>\n<p>. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0442\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u043c\u0441\u044f \u0432\u043e\u0442 \u0441 \u0447\u0435\u043c:  <\/p>\n<ul>\n<li> \u0420\u0430\u0437\u043c\u0435\u0440 \u0438\u043a\u043e\u043d\u043a\u0438 \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/li>\n<li> \u041e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 (\u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043b\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f) \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0442\u043e\u0447\u043d\u0435\u0435, \u0442\u043e \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435, \u0442.\u0435. \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043d\u043e\u043f\u043e\u043a \u0441\u0440\u0430\u0437\u0443, \u043d\u043e \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u2013 \u044d\u0442\u043e \u0433\u0440\u0430\u0431\u043b\u0438 \u0438 \u0441\u043f\u043b\u043e\u0448\u043d\u043e\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e. \u0411\u043e\u0440\u043e\u043b\u0438\u0441\u044c \u043c\u044b \u043d\u0435 \u0437\u0430 \u044d\u0442\u043e. <br \/>  \u0420\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043a\u043b\u0430\u0441\u0441 Ext.E. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0443\u0434\u0430 \u0435\u0449\u0435 \u0434\u0432\u0430 <i>AttachedProperty<\/i>  <\/p>\n<ul>\n<li> <i>IconSize <\/i>\u0442\u0438\u043f\u0430 <i>double<\/i><\/li>\n<li> <i>Orientation <\/i>\u0442\u0438\u043f\u0430 <i>Orientation<\/i><\/li>\n<\/ul>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043e\u0434\u043d\u0438\u043c \u0430\u0440\u0445\u0438\u0432\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 Ext.E \u0432 \u0441\u0442\u0430\u0442\u044c\u0435. <\/p>\n<p>  \u041e\u043f\u0438\u0448\u0443 \u043b\u0438\u0448\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <i>Button<\/i>.<br \/>  \u0420\u0430\u0437\u043c\u0435\u0440\u044b <i>ContentControl<\/i> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <i>IconSize<\/i>:<\/p>\n<pre><code class=\"xml\">&lt;ContentControl  \tContent=&quot;{Binding (Ext:E.Icon), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}&quot; \tWidth=&quot;{Binding (Ext:E.IconSize), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}&quot; \tHeight=&quot;{Binding (Ext:E.IconSize), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}&quot;... <\/code><\/pre>\n<p>  \u041e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044e <i>StackPanel <\/i>\u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <i>Orientation<\/i><\/p>\n<pre><code class=\"xml\">&lt;StackPanel Orientation=&quot;{Binding (Ext:E.Orientation), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}&quot;&gt; <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"xml\">&lt;Button  \tExt:E.Icon=&quot;{DynamicResource IconLock}&quot; \tExt:E.IconSize=&quot;32&quot; \tExt:E.Orientation=&quot;Horizontal&quot; Content=&quot;\u041a\u043d\u043e\u043f\u043a\u0430 1&quot;\/&gt; <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0437\u043e\u043e\u043f\u0430\u0440\u043a (\u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430<i>IsEnabled=\u00abFalse\u00bb<\/i>):<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/667\/823\/9f6\/6678239f67ba8c531ac9093853c32888.png\"\/>&quot;   <\/p>\n<h5>\u041d\u0443 \u0438 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0443\u043f\u043e\u043c\u044f\u043d\u0443 \u043e\u0431 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445<\/h5>\n<p>  \u0412\u0441\u0435 \u043e\u043d\u0438 \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<br \/>   \u2014 XAML \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440 VisualStudio 2010 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/7c1\/ef8\/79e\/7c1ef879eebf6bd1696785f5e6169edc.png\"\/>&quot;<br \/>   \u2014 Blend 4 \u0438 VisualStudio 2012 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0442\u043e\u0436\u0435 \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438:  <\/p>\n<ul>\n<li> \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 Ext.E \u043b\u0443\u0447\u0448\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u044b \u0440\u0443\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442.<\/li>\n<li> \u041f\u043e \u043d\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043c\u043d\u043e\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e AttachedProperty, \u0442\u043e \u0432\u0438\u0434\u043d\u044b \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0443, \u0442\u043e \u043d\u0435\u0442. \u0427\u0430\u0449\u0435 \u043d\u0435 \u0432\u0438\u0434\u043d\u044b, \u0438 \u0444\u043e\u0440\u043c\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/83c\/fa5\/60b\/83cfa560b0cf7f015ed05aad411dfa76.png\"\/>  <\/li>\n<\/ul>\n<p>  \u041d\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e Designer, \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e (\u0438 \u0434\u0430\u0436\u0435 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e) \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434, \u043d\u043e \u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u0447\u0442\u043e \u0437\u0430 \u0434\u0432\u0430 \u0434\u043d\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0444\u0440\u043e\u043d\u0442\u0435 \u043d\u0435 \u0432\u0441\u0451 \u043b\u0430\u0434\u043d\u043e.<br \/>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043c\u0430\u0441\u0441\u0443.<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p>  <a href=\"https:\/\/docs.google.com\/file\/d\/0B2tCHBB0U68iM3REV1B0MEdIYjQ\/edit\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/a><\/p>\n<h5>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/h5>\n<p>  WPF Control Development \u2014 3 Ways to build an ImageButton<br \/>  <a href=\"http:\/\/blogs.msdn.com\/b\/knom\/archive\/2007\/10\/31\/wpf-control-development-3-ways-to-build-an-imagebutton.aspx\">blogs.msdn.com\/b\/knom\/archive\/2007\/10\/31\/wpf-control-development-3-ways-to-build-an-imagebutton.aspx<\/a><br \/>  Using Attached Properties to Create a WPF Image Button<br \/>  <a href=\"http:\/\/www.hardcodet.net\/2009\/01\/create-wpf-image-button-through-attached-properties\">www.hardcodet.net\/2009\/01\/create-wpf-image-button-through-attached-properties<\/a><br \/>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<br \/>  <a href=\"http:\/\/msdn.microsoft.com\/ru-ru\/library\/ms753358.aspx\">msdn.microsoft.com\/ru-ru\/library\/ms753358.aspx<\/a><br \/>  SyncFusion Metro Studio 2<br \/>  <a href=\"http:\/\/www.syncfusion.com\/downloads\/metrostudio\">www.syncfusion.com\/downloads\/metrostudio<\/a> \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/157337\/\"> http:\/\/habrahabr.ru\/post\/157337\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u042f \u0434\u0443\u043c\u0430\u044e \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 (\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439), \u0438\u0437 \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 WPF \u0438\u0437 WinForms, \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0442\u0435\u0440\u044f\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432. <br \/>  \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u2013 \u0432\u043e\u0442 \u043e\u043d \u2014 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b. <br \/>  \u041e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u0438\u0437 WinForms. \u0414\u0430\u0436\u0435 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442, \u043b\u0438\u0431\u043e \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e (\u043d\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e Enabled \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0443 Is). \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u044f\u0431\u0438\u0442 \u0432 \u0433\u043b\u0430\u0437\u0430\u0445. <br \/>  \u041d\u043e \u043f\u0440\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0441\u043d\u043e\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043d\u0430\u0442\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0442\u0430 \u0441\u0430\u043c\u0430\u044f \u0440\u0430\u0441\u0442\u0435\u0440\u044f\u043d\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u0442\u0430\u043a? \u041d\u0443 \u043d\u0435\u0443\u0436\u0435\u043b\u0438 \u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 Image? \u0412\u044b \u0432\u0435\u0434\u044c \u0448\u0443\u0442\u0438\u0442\u0435, \u043f\u0440\u0430\u0432\u0434\u0430?  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-157337","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/157337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157337"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/157337\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}