{"id":163711,"date":"2012-12-24T13:10:02","date_gmt":"2012-12-24T09:10:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=163711"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=163711","title":{"rendered":"<span class=\"post_title\">\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 Windows 8 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 XAML\/\u0421#, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 RSS Reader. \u0427.1<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/168\/542\/667\/168542667c983c147fe8218be9926067.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0430 <a href=\"http:\/\/habrahabr.ru\/company\/microsoft\/blog\/163443\/\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 WinRT-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 HTML\/JavaScript. \u041e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/a> \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c RSS \u0447\u0438\u0442\u0430\u043b\u043a\u0443 \u043f\u043e\u0434 Windows 8 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c HTML \u0438 JavaScript. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c XAML\/C#. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043d\u043e \u043c\u044b \u0443\u0436\u0435 \u0432 \u043d\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u043e!<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/h2>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Grid \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0440\u0430\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043d\u0430 XAML\/C#<br \/>  \u0412 \u043c\u0435\u043d\u044e <strong>File <\/strong>\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <strong>New Project,<\/strong> \u0434\u0430\u043b\u0435\u0435 <strong>Visual C#<\/strong>, \u0437\u0430\u0442\u0435\u043c \u2014 <strong>Windows Store<\/strong>, \u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043a\u043d\u0430 <strong>New Project<\/strong> \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <strong>Grid<\/strong><strong> App (XAML)<\/strong>. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432 \u043f\u043e\u043b\u0435 <strong>Name<\/strong> \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, MyReader, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0432 \u043f\u043e\u043b\u0435 <strong>Location<\/strong> \u043f\u0430\u043f\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 <strong>OK<\/strong>.<br \/>  <img decoding=\"async\" title=\"habr-templ-xaml-1\" alt=\"habr-templ-xaml-1\" src=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-01-44-58-metablogapi\/1452.habr_2D00_templ_2D00_xaml_2D00_1_5F00_thumb_5F00_6DE8EBBF.png\"\/><br \/>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u0436\u0430\u0432 <b>F5<\/b>, \u0437\u0435\u043b\u0435\u043d\u0443\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0443 \u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0432 <b>Debug<\/b> -&gt; <b>Start Debugging<\/b><br \/>  <img decoding=\"async\" title=\"habr-templ-xaml-2\" alt=\"habr-templ-xaml-2\" src=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-01-44-58-metablogapi\/0385.habr_2D00_templ_2D00_xaml_2D00_2_5F00_thumb_5F00_0A362DE0.png\"\/><br \/>  \u041c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0443\u0436\u0435\u00a0 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:  <\/p>\n<ul>\n<li>\u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043b\u044e\u0431\u0443\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0440\u0443\u044e \u043f\u043b\u0438\u0442\u043a\u0443 \u0438\u043b\u0438 \u043d\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0433\u0440\u0443\u043f\u043f\u044b;<\/li>\n<li>\u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043a\u043d\u043e\u043f\u043a\u043e\u0439 <strong>\u043d\u0430\u0437\u0430\u0434<\/strong> \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f; <\/li>\n<li>\u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 Snapped-\u0440\u0435\u0436\u0438\u043c.<\/li>\n<\/ul>\n<p>  \u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u0432 Visual Studio \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (<b>Shift+F5<\/b>, \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a \u0438\u043b\u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432 \u043c\u0435\u043d\u044e <b>Debug<\/b> -&gt; <b>Stop Debugging<\/b>).<br \/>  \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f:  <\/p>\n<ul>\n<li><strong>*.xaml<\/strong> \u2014 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 XAML.<\/li>\n<li><strong>*.xaml.cs<\/strong> \u2014 \u044d\u0442\u043e code-behind \u0444\u0430\u0439\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C# \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. <\/li>\n<li><strong>App.xaml<\/strong> \u2014 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 Windows Store-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 XAML, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/li>\n<li><strong>App.xaml.cs<\/strong> \u2014 \u044d\u0442\u043e code-behind \u0444\u0430\u0439\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C# \u0434\u043b\u044f App.xaml. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a, \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0438 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 App.xaml.cs \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438.<\/li>\n<li>\u043f\u0430\u043f\u043a\u0430<strong> Common, <\/strong>\u0444\u0430\u0439\u043b <strong>StandardStyles.xaml<\/strong> \u2014 \u0444\u0430\u0439\u043b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0442\u0438\u043b\u0435\u0439 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f,\u00a0 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 App.xaml \u0438 \u0435\u0433\u043e \u0441\u0442\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/li>\n<li><strong>Package.appxmanifest<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, XML-\u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u0449\u0435\u043b\u0447\u043a\u043e\u043c \u043c\u044b\u0448\u044c\u044e \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430 Package.appxmanifest \u0432 \u043e\u043a\u043d\u0435 Solution Explorer.<\/li>\n<li><strong>AssemblyInfo.cs<\/strong> \u2014\u00a0 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 <i>\u0441\u0431\u043e\u0440\u043a\u0438<\/i> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li><strong>MyReader_TemporaryKey.pfx<\/strong> \u2014 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/li>\n<li>\u043f\u0430\u043f\u043a\u0430 <strong>Asset<\/strong>, \u0444\u0430\u0439\u043b\u044b<strong> Logo.png, SmallLogo.png, StoreLogo.png<\/strong> \u2014 \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u044b \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u043c\u0430\u043b\u043e\u0439 \u043f\u043b\u0438\u0442\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u043a\u043e\u043d\u043a\u0430 \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. <\/li>\n<li><strong>SplashScreen.png<\/strong> \u2014 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u0437\u0430\u0441\u0442\u0430\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/li>\n<\/ul>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 Common, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u043e\u0431\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0432 \u043f\u0430\u043f\u043a\u0435 DataModel \u043d\u0430\u0445\u0434\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 <strong>SampleDataSource.cs<\/strong>.<\/p>\n<h2>\u041c\u0435\u043d\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0432 \u043d\u0451\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u043e\u043c\u0435\u0440 \u043e\u0434\u0438\u043d \u2013 \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u044b\u0445 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430 SampleDataSource, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<pre><code class=\"cs\">public SampleDataSource()<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 Visual Studio \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0435\u043c SampleDataSource \u0432 RSSDataSource, SampleDataGroup \u0432 RSSDataGroup, SampleDataItem \u0432 RSSDataItem \u0438 SampleDataCommon \u0432 RSSDataCommon.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/3c1\/209\/06b\/3c120906b4c2b281209031ad9074c86c.png\"\/><br \/>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u043c\u0438\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0444\u0430\u0439\u043b SampleDataSource.cs \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0432 RSSDataSource.cs.<\/p>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043c \u0435\u0433\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043b\u0430\u0441\u0441\u0430 RSSDataSource<\/p>\n<pre><code class=\"cs\">private static RSSDataSource _sampleDataSource = new RSSDataSource();  private ObservableCollection&lt;RSSDataGroup&gt; _allGroups = new ObservableCollection&lt;RSSDataGroup&gt;(); public ObservableCollection&lt;RSSDataGroup&gt; AllGroups {      get { return this._allGroups; } } <\/code><\/pre>\n<p>  \u041d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u043a\u043e\u0434, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0443\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430.  <\/p>\n<pre><code class=\"cs\">public static readonly ObservableCollection&lt;RSSDataGroup&gt; AllGroups = new ObservableCollection&lt;RSSDataGroup&gt;(); <\/code><\/pre>\n<p>  \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e _sampleDataSource \u0438\u0437 \u043a\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438\u0441\u044c \u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0414\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 RSS \u0438\u043b\u0438 ATOM \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"cs\"> public static async Task&lt;bool&gt; AddGroupForFeedAsync(string feedUrl) {     string clearedContent = String.Empty;      if (RSSDataSource.GetGroup(feedUrl) != null) return false;      var feed = await new SyndicationClient().RetrieveFeedAsync(new Uri(feedUrl));      var feedGroup = new RSSDataGroup(         uniqueId: feedUrl,         title: feed.Title != null ? feed.Title.Text : null,         subtitle: feed.Subtitle != null ? feed.Subtitle.Text : null,         imagePath: feed.ImageUri != null ? feed.ImageUri.ToString() : null,         description: null);      foreach (var i in feed.Items)     {         string imagePath = null;          if (i.Summary != null)             clearedContent = Windows.Data.Html.HtmlUtilities.ConvertToText(i.Summary.Text);         else             if (i.Content != null)                 clearedContent = Windows.Data.Html.HtmlUtilities.ConvertToText(i.Content.Text);          f (imagePath != null && feedGroup.Image == null)             feedGroup.SetImage(imagePath);          if (imagePath == null) imagePath = &quot;ms-appx:\/\/\/Assets\/DarkGray.png&quot;;          feedGroup.Items.Add(new RSSDataItem(             uniqueId: i.Id, title: i.Title.Text, subtitle: null, imagePath: imagePath,             description: null, content: clearedContent, @group: feedGroup));     }      AllGroups.Add(feedGroup);     return true; }<\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f SyndicationClient, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 RSS\/ATOM, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0451 \u0437\u0430\u043f\u0438\u0441\u0438. \u041f\u043e\u043f\u0443\u0442\u043d\u043e, \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0442 HTML \u0442\u0435\u0433\u043e\u0432, \u043f\u0440\u043e\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043b\u0443\u0447\u0448\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0447\u0435\u043c \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f \u043f\u043e\u0437\u0436\u0435. <\/p>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u043b\u043e\u043a using \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b:<\/p>\n<pre><code class=\"cs\">using Windows.Web.Syndication; using System.Threading.Tasks;<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u0449\u0435\u043b\u0447\u043a\u043e\u043c \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b GroupedItemsPage.xaml.cs \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443 LoadState, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 sampleDataGroups \u043d\u0430 RSSDataSource.AllGroups, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u0430\u043b\u0438\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u0443\u044e \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e sampleDataGroups. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0434 LoadState \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code class=\"cs\">protected override void LoadState(Object navigationParameter, Dictionary&lt;String, Object&gt; pageState) {     this.DefaultViewModel[&quot;Groups&quot;] = RSSDataSource.AllGroups; } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c RSS. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u0432\u0435\u0436\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 AddGroupForFeedAsync \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e LoadState:  <\/p>\n<pre><code class=\"cs\">RSSDataSource.AddGroupForFeedAsync(&quot;http:\/\/blogs.msdn.com\/b\/stasus\/rss.aspx&quot;); RSSDataSource.AddGroupForFeedAsync(&quot;http:\/\/www.spugachev.com\/feed&quot;); <\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/182\/3a8\/c96\/1823a8c960237c0132432e2d9bec9ef7.png\"\/><br \/>  \u0423\u0440\u0430 \u2014 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! <\/p>\n<p>  \u041d\u043e \u043a\u0430\u043a-\u0442\u043e \u0432\u0441\u0451 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u2026 \u041d\u0443 \u0447\u0442\u043e \u0436\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u043e!<\/p>\n<h2>\u0414\u0435\u043b\u0430\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u043e<\/h2>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0434\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u043f\u043e\u0441\u0442\u044b \u0438 \u043d\u0430 \u043f\u043b\u0438\u0442\u043a\u0438 \u0432 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438.<br \/>  \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 RSSDataSource.cs \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u0434\u043e\u0431\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 RSS \u043f\u043e\u0441\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cs\">private static string GetImageFromPostContents(SyndicationItem item) {     string text2search = &quot;&quot;;      if (item.Content != null) text2search += item.Content.Text;     if (item.Summary != null) text2search += item.Summary.Text;      return Regex.Matches(text2search,             @&quot;(?&lt;=&lt;img\\s+[^&gt;]*?src=(?&lt;q&gt;['&quot;&quot;]))(?&lt;url&gt;.+?)(?=\\k&lt;q&gt;)&quot;,             RegexOptions.IgnoreCase)         .Cast&lt;Match&gt;()         .Where(m =&gt;         {             Uri url;             if (Uri.TryCreate(m.Groups[0].Value, UriKind.Absolute, out url))             {                 string ext = Path.GetExtension(url.AbsolutePath).ToLower();                 if (ext == &quot;.png&quot; || ext == &quot;.jpg&quot; || ext == &quot;.bmp&quot;) return true;             }             return false;         })         .Select(m =&gt; m.Groups[0].Value)         .FirstOrDefault(); } <\/code><\/pre>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435, \u043c\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 (\u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 png, jpg \u0438 bmp) \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u043e\u0441\u0442\u0430 \u0438\u043b\u0438 \u0435\u0433\u043e summary.<br \/>  \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u043b\u043e\u043a using \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b:<\/p>\n<pre><code class=\"cs\">using System.Text.RegularExpressions; using System.IO;<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u044b \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 AddGroupForFeedAsync \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443. \u041c\u0435\u043d\u044f\u0435\u043c <\/p>\n<pre><code class=\"cs\">string imagePath = null;<\/code><\/pre>\n<p> \u043d\u0430 <\/p>\n<pre><code class=\"cs\">string imagePath = GetImageFromPostContents(i);<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/bd9\/7b0\/558\/bd97b0558e6d8abd55d4edc0c288d151.png\"\/><br \/>  \u0412\u0441\u0451 \u0441\u0442\u0430\u043b\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u0441\u0435 \u0442\u043e\u043f\u0438\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043f\u043b\u0438\u0442\u043a\u0430\u043c\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430? \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043a\u0430\u043a \u0432 Windows Store!<\/p>\n<p>  \u042d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0447\u0435\u043c \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435. \u041d\u043e \u043c\u044b \u043d\u0435 \u0441\u0434\u0430\u0451\u043c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438!<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a GridView. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c: VariableSizeGridView.cs. \u0412 \u043d\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0431\u043b\u043e\u043a using \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443:<\/p>\n<pre><code class=\"cs\">using Windows.UI.Xaml.Controls;<\/code><\/pre>\n<p>, \u0443\u043a\u0430\u0436\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 GridView \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u0432 \u043d\u0451\u043c \u043c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430: PrepareContainerForItemOverride. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code class=\"cs\">using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.UI.Xaml.Controls;  namespace MyReader {     class VariableSizeGridView: GridView      {         protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)         {             base.PrepareContainerForItemOverride(element, item);         }     } }<\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u043e\u0434 PrepareContainerForItemOverride \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043b\u0438\u0442\u043a\u0438 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b\u0435 GroupedItemsPage.xaml.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c GridView \u043d\u0430 \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \u2014 local:VariableSizeGridView. \u0414\u0430\u043b\u0435\u0435 \u0432 ItemPanelTemplate \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 VariableSizedWrapGrid \u0443\u043a\u0430\u0437\u0430\u0432 \u0440\u0430\u0437\u043c\u0435\u0440 Item-\u0430 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0440\u043e\u043a \u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"xml\">&lt;VariableSizedWrapGrid Orientation=&quot;Vertical&quot; Margin=&quot;0,0,80,0&quot; ItemWidth=&quot;200&quot; ItemHeight=&quot;125&quot; MaximumRowsOrColumns=&quot;9&quot; \/&gt;<\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d Item \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b:<\/p>\n<pre><code class=\"xml\">&lt;DataTemplate x:Key=&quot;CustomItemTemplate&quot;&gt;             &lt;Grid HorizontalAlignment=&quot;Left&quot;&gt;                 &lt;Border Background=&quot;{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}&quot;&gt;                     &lt;Image Source=&quot;{Binding Image}&quot; Stretch=&quot;UniformToFill&quot; AutomationProperties.Name=&quot;{Binding Title}&quot;\/&gt;                 &lt;\/Border&gt;                 &lt;StackPanel Background=&quot;{StaticResource ListViewItemOverlayBackgroundThemeBrush}&quot; VerticalAlignment=&quot;Bottom&quot;&gt;                     &lt;TextBlock Text=&quot;{Binding Title}&quot; Foreground=&quot;{StaticResource ListViewItemOverlayForegroundThemeBrush}&quot;  Height=&quot;90&quot; Margin=&quot;15,0,15,0&quot; FontSize=&quot;30&quot; \/&gt;                 &lt;\/StackPanel&gt;             &lt;\/Grid&gt;         &lt;\/DataTemplate&gt;<\/code><\/pre>\n<p>  \u0418 \u0443\u043a\u0430\u0436\u0435\u043c \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Item, \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432 local:VariableSizeGridView::<\/p>\n<pre><code class=\"xml\">&lt;local:VariableSizeGridView             x:Name=&quot;itemGridView&quot;             AutomationProperties.AutomationId=&quot;ItemGridView&quot;             AutomationProperties.Name=&quot;Grouped Items&quot;             Grid.RowSpan=&quot;2&quot;             Padding=&quot;116,137,40,46&quot;             ItemsSource=&quot;{Binding Source={StaticResource groupedItemsViewSource}}&quot;             ItemTemplate=&quot;{StaticResource CustomItemTemplate}&quot;             SelectionMode=&quot;None&quot;             IsSwipeEnabled=&quot;false&quot;             IsItemClickEnabled=&quot;True&quot;             ItemClick=&quot;ItemView_ItemClick&quot;&gt;<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/afe\/9ff\/963\/afe9ff9631830d496705d00851f08d7e.png\"\/><br \/>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u041d\u043e \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u0434 \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u0432 PrepareContainerForItemOverride.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cs\">class VariableSizeGridView: GridView  {     private int rowVal;     private int colVal;              protected override void PrepareContainerForItemOverride(Windows.UI.Xaml.DependencyObject element, object item)     {         RSSDataItem dataItem = item as RSSDataItem;         int index = -1;          if (dataItem != null)         {             index = dataItem.Group.Items.IndexOf(dataItem);          }          if (index == 1)         {             colVal = 2;             rowVal = 4;         }         else         {             colVal = 2;             rowVal = 2;         }          if (index == 2)         {             colVal = 2;             rowVal = 4;         }          if (index == 5)         {             colVal = 4;             rowVal = 4;         }          VariableSizedWrapGrid.SetRowSpan(element as UIElement, rowVal);         VariableSizedWrapGrid.SetColumnSpan(element as UIElement, colVal);          base.PrepareContainerForItemOverride(element, item);     }<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u043a\u0443\u044e \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043f\u043b\u0438\u0442\u043a\u0443, \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c.<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0449\u0451 \u0440\u0430\u0437.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/367\/e8b\/ffb\/367e8bffb4bf3a01d6e17ccbd847501c.png\"\/><br \/>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f Item \u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b PrepareContainerForItemOverride \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 GridView.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044f, \u043f\u043e\u0436\u0430\u043b\u0443\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e: \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0436\u0438\u0432\u044b\u0435 \u043f\u043b\u0438\u0442\u043a\u0438, \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 share, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 RSS \u0444\u0438\u0434\u044b \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0435\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 SkyDrive (\u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430): <a href=\"http:\/\/sdrv.ms\/V5q9IG\">sdrv.ms\/V5q9IG<\/a><\/p>\n<p>  \u0421 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u043c \u041d\u043e\u0432\u044b\u043c \u0413\u043e\u0434\u043e\u043c!    \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\/company\/microsoft\/blog\/163711\/\"> http:\/\/habrahabr.ru\/company\/microsoft\/blog\/163711\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/168\/542\/667\/168542667c983c147fe8218be9926067.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0430 <a href=\"http:\/\/habrahabr.ru\/company\/microsoft\/blog\/163443\/\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 WinRT-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 HTML\/JavaScript. \u041e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/a> \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c RSS \u0447\u0438\u0442\u0430\u043b\u043a\u0443 \u043f\u043e\u0434 Windows 8 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c HTML \u0438 JavaScript. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c XAML\/C#. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043d\u043e \u043c\u044b \u0443\u0436\u0435 \u0432 \u043d\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u043e!  <\/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-163711","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/163711","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=163711"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/163711\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=163711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=163711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}