{"id":282676,"date":"2016-12-19T09:00:04","date_gmt":"2016-12-19T06:00:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=282676"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=282676","title":{"rendered":"WPF \u2014 Floppy Pages"},"content":{"rendered":"<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e Frame \u0432 \u0441\u0442\u0438\u043b\u0435 IOS<\/h2>\n<p>  \u0418\u043b\u0438 \u043f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u2014 Frame \u0432 \u0441\u0442\u0438\u043b\u0435 Modern UI.<\/p>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0434\u0440\u0435\u0439 \u0438 \u044f \u043e\u0447\u0435\u043d\u044c \u0443\u0441\u0442\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c VK \u043d\u0430 Windows 10. \u0415\u0433\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043c\u0435\u043d\u044f \u0443\u0442\u043e\u043c\u0438\u043b\u0430 \u0438 \u043a\u0430\u043a \u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d. \u0415\u0449\u0451 \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u043b\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u043f\u043b\u0430\u0432\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043a\u0430\u043a \u043d\u0430 iPhone. \u0414\u043b\u044f \u0447\u0435\u0433\u043e? \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 VK \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 WPF. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043a\u0430\u0436\u0443 \u043e\u0431\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/pp.vk.me\/c837324\/v837324066\/157ed\/RGvGccxoH8M.jpg\" alt=\"image\" \/><\/div>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u043c. DataContext \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0443 \u0441 namespace UFC.UI. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043d\u043e\u043f\u043e\u043a, \u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<pre><code class=\"java\">public delegate void FloppyPageNavigateEventHandler(IFloppyPage page, FloppyPageEventArgs e); public delegate void FloppyPageGoBackEventHandler(FloppyPageEventArgs e); public class FloppyPageEventArgs : EventArgs {     public FloppyPageEventArgs() { } }  public interface IFloppyPage {     event FloppyPageNavigateEventHandler Navigate;     event FloppyPageGoBackEventHandler GoBack;     IFloppyPages IFloppyPages { get; set; }     string Title { get; set; } } <\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/pp.vk.me\/c837324\/v837324066\/157f4\/mHhF7zzuc_w.jpg\" alt=\"image\" \/><\/div>\n<p>  \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"java\">    public partial class Page1 : Page, IFloppyPage     {         public event FloppyPageNavigateEventHandler Navigate;         public event FloppyPageGoBackEventHandler GoBack;         public IFloppyPages IFloppyPages { get; set; }         public Page1() : this(null) { }         public Page1(object dataContext)         {             InitializeComponent();             if (dataContext != null)                 this.DataContext = dataContext;             else                 this.DataContext = this;             Title = &quot;\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430&quot;;         }          private void NavigateTo_MainPage(object sender, RoutedEventArgs e)         {             if (Navigate != null)                 Navigate(new MainPage(DataContext), new FloppyPageEventArgs());         }          private void NavigateTo_Page2(object sender, RoutedEventArgs e)         {             if (Navigate != null)                 Navigate(new Page2(DataContext), new FloppyPageEventArgs());         }          private void NavigateTo_Page3(object sender, RoutedEventArgs e)         {             if (Navigate != null)                 Navigate(new Page3(DataContext), new FloppyPageEventArgs());         }          private void Button_GoBack(object sender, RoutedEventArgs e)         {             if (GoBack != null)                 GoBack(new FloppyPageEventArgs());         }     } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043b\u0430\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443. \u0417\u0434\u0435\u0441\u044c \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 IFloppyPages. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u0442\u044c, \u043d\u043e \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435. \u0415\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0438 \u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 DataContext. \u0422\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DataContext \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0435\u043b\u044f\u0445 (mvvm, binding, commands \u0438 \u0442.\u0434.)<br \/>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u043e\u0442 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<pre><code class=\"java\">public interface IFloppyPages {     IFloppyPage FirstPage { get; set; }     IFloppyPage CurrentPage { get; set; }     int JournalCount { get; set; }     void Navigate(IFloppyPage page);     bool GoBack();     bool CanGoBack { get; set; } } <\/code><\/pre>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 xaml \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"xml\">&lt;ResourceDictionary xmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;                     xmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;                     xmlns:local=&quot;clr-namespace:UFC.UI.Controls&quot;&gt;   &lt;Thickness x:Key=&quot;Dynamic.LongPage.MarginAnimation&quot;&gt;10, 0, -10, 0&lt;\/Thickness&gt;   &lt;Style TargetType=&quot;local:FloppyPages&quot;&gt;      &lt;Style.Setters&gt;          &lt;Setter Property=&quot;Template&quot;&gt;              &lt;Setter.Value&gt;                  &lt;ControlTemplate TargetType=&quot;local:FloppyPages&quot;&gt;                      &lt;Grid Name=&quot;mainGrid&quot;&gt;                          &lt;Grid Name=&quot;grid1&quot;&gt;                              &lt;Frame Name=&quot;frame1&quot; NavigationUIVisibility=&quot;Hidden&quot;\/&gt;                          &lt;\/Grid&gt;                          &lt;Grid Name=&quot;grid2&quot;&gt;                              &lt;Frame Name=&quot;frame2&quot; NavigationUIVisibility=&quot;Hidden&quot;\/&gt;                          &lt;\/Grid&gt;                          &lt;Grid.Resources&gt;                              &lt;BeginStoryboard x:Key=&quot;grid1Animation&quot;&gt;                                  &lt;Storyboard&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid1&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;{DynamicResource Dynamic.LongPage.MarginAnimation}&quot;                                         To=&quot;0&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                      &lt;\/ThicknessAnimation&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid2&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;0&quot;                                         To=&quot;-100, 20, 100, 20&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                      &lt;\/ThicknessAnimation&gt;                                  &lt;\/Storyboard&gt;                              &lt;\/BeginStoryboard&gt;                              &lt;BeginStoryboard x:Key=&quot;grid2Animation&quot;&gt;                                  &lt;Storyboard&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid2&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;{DynamicResource Dynamic.LongPage.MarginAnimation}&quot;                                         To=&quot;0&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                      &lt;\/ThicknessAnimation&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid1&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;0&quot;                                         To=&quot;-100, 20, 100, 20&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                      &lt;\/ThicknessAnimation&gt;                                  &lt;\/Storyboard&gt;                              &lt;\/BeginStoryboard&gt;                              &lt;BeginStoryboard x:Key=&quot;grid3Animation&quot;&gt;                                  &lt;Storyboard&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid1&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;0&quot;                                         To=&quot;{DynamicResource Dynamic.LongPage.MarginAnimation}&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                      &lt;\/ThicknessAnimation&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid2&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;-100, 20, 100, 20&quot;                                         To=&quot;0&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                      &lt;\/ThicknessAnimation&gt;                                  &lt;\/Storyboard&gt;                              &lt;\/BeginStoryboard&gt;                              &lt;BeginStoryboard x:Key=&quot;grid4Animation&quot;&gt;                                  &lt;Storyboard&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid2&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;0&quot;                                         To=&quot;{DynamicResource Dynamic.LongPage.MarginAnimation}&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                      &lt;\/ThicknessAnimation&gt;                                      &lt;ThicknessAnimation                                         Duration=&quot;0:0:0.8&quot;                                         Storyboard.TargetName=&quot;grid1&quot;                                         Storyboard.TargetProperty=&quot;Margin&quot;                                         From=&quot;-100, 20, 100, 20&quot;                                         To=&quot;0&quot;&gt;                                          &lt;ThicknessAnimation.EasingFunction&gt;                                              &lt;ElasticEase EasingMode=&quot;EaseOut&quot; Oscillations=&quot;1&quot;\/&gt;                                          &lt;\/ThicknessAnimation.EasingFunction&gt;                                       &lt;\/ThicknessAnimation&gt;                                  &lt;\/Storyboard&gt;                              &lt;\/BeginStoryboard&gt;                          &lt;\/Grid.Resources&gt;                      &lt;\/Grid&gt;                  &lt;\/ControlTemplate&gt;              &lt;\/Setter.Value&gt;          &lt;\/Setter&gt;      &lt;\/Style.Setters&gt;  &lt;\/Style&gt;      &lt;\/ResourceDictionary&gt; <\/code><\/pre>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u043c \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u043c\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0412\u0441\u0451 \u0441\u0430\u043c\u043e\u0435 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0434\u0430 \u0432\u043d\u0438\u0437\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"java\">using System; using System.Collections.Generic; using System.ComponentModel; using System.Windows; using System.Windows.Controls; using System.Windows.Media.Animation;  namespace UFC.UI {     \/\/\/ &lt;summary&gt;     \/\/\/ \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.     \/\/\/ &lt;\/summary&gt;     internal class DefaultPage : IFloppyPage     {         public event FloppyPageNavigateEventHandler Navigate;         public event FloppyPageGoBackEventHandler GoBack;         public IFloppyPages IFloppyPages { get; set; }         public string Title { get; set; }         public DefaultPage()         {             Title = &quot;\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e&quot;;         }     }      public delegate void FloppyPageNavigateEventHandler(IFloppyPage page, FloppyPageEventArgs e);     public delegate void FloppyPageGoBackEventHandler(FloppyPageEventArgs e);     public class FloppyPageEventArgs : EventArgs     {         public FloppyPageEventArgs() { }     }      public interface IFloppyPage     {         event FloppyPageNavigateEventHandler Navigate;         event FloppyPageGoBackEventHandler GoBack;         IFloppyPages IFloppyPages { get; set; }         string Title { get; set; }     }      public interface IFloppyPages     {         IFloppyPage FirstPage { get; set; }         IFloppyPage CurrentPage { get; set; }         int JournalCount { get; set; }         void Navigate(IFloppyPage page);         bool GoBack();         bool CanGoBack { get; set; }     } }  namespace UFC.UI.Controls {     public class FloppyPages : Control, IFloppyPages, INotifyPropertyChanged     {         #region Private Members          private bool GridNumber = false;         private bool IsDoneAnimation = true;         private List&lt;IFloppyPage&gt; journal = new List&lt;IFloppyPage&gt;();          private Frame frame1 = new Frame();         private Frame frame2 = new Frame();         private Grid mainGrid = new Grid();         private Grid grid1 = new Grid();         private Grid grid2 = new Grid();          private BeginStoryboard animation1 = new BeginStoryboard()         { Storyboard = new Storyboard() };         private BeginStoryboard animation2 = new BeginStoryboard()         { Storyboard = new Storyboard() };         private BeginStoryboard animation3 = new BeginStoryboard()         { Storyboard = new Storyboard() };         private BeginStoryboard animation4 = new BeginStoryboard()         { Storyboard = new Storyboard() };          #endregion          #region Constructors         static FloppyPages()         {             DefaultStyleKeyProperty.OverrideMetadata(typeof(FloppyPages),                 new FrameworkPropertyMetadata(typeof(FloppyPages)));              FloppyPages.NavigatedRoutedEvent =                 EventManager.RegisterRoutedEvent(&quot;Navigated&quot;, RoutingStrategy.Bubble,                 typeof(RoutedEventHandler), typeof(FloppyPages));             FloppyPages.WentBackRoutedEvent =                 EventManager.RegisterRoutedEvent(&quot;WentBack&quot;, RoutingStrategy.Bubble,                 typeof(RoutedEventHandler), typeof(FloppyPages));         }          public FloppyPages()         {             FirstPage = new DefaultPage();         }          #endregion          #region Public Dependency Properties                  public static readonly DependencyProperty FirstPageProperty =             DependencyProperty.RegisterAttached(&quot;FirstPage&quot;, typeof(IFloppyPage),                 typeof(FloppyPages));          #endregion          #region Public Properties         public IFloppyPage FirstPage         {             get { return (IFloppyPage)GetValue(FirstPageProperty); }             set             {                 SetValue(FirstPageProperty, value);                 OnFirstPage(FirstPage);                 OnPropertyChanged(&quot;FirstPage&quot;);             }         }          #endregion          #region Public RoutedEvents          public static readonly RoutedEvent NavigatedRoutedEvent;         public static readonly RoutedEvent WentBackRoutedEvent;          #endregion          #region Public Events          public event RoutedEventHandler Navigated         {             add { base.AddHandler(FloppyPages.NavigatedRoutedEvent, value); }             remove { base.RemoveHandler(FloppyPages.NavigatedRoutedEvent, value); }         }          public event RoutedEventHandler WentBack         {             add { base.AddHandler(FloppyPages.WentBackRoutedEvent, value); }             remove { base.RemoveHandler(FloppyPages.WentBackRoutedEvent, value); }         }          #endregion          #region Public Members         public IFloppyPage CurrentPage         {             get             {                 if (journal.Count &gt; 0)                     return journal[journal.Count - 1];                 else                     return null;             }             set { }         }          public int JournalCount         {             get             {                 return journal.Count;             }             set { }         }          public void Navigate(IFloppyPage page)         {             Start_Navigate(page);         }          public bool GoBack()         {             return Start_GoBack();         }          public bool CanGoBack         {             get             {                 if (journal.Count &gt; 1)                     return true;                 else                     return false;             }             set { }         }          #endregion          #region Private OnFirstPage         private void OnFirstPage(IFloppyPage page)         {             if (page != null && frame1 != null && frame2 != null)             {                 if (GridNumber)                     frame1.Navigate(page);                 else                     frame2.Navigate(page);                 page.Navigate += Page_Navigate;                 page.GoBack += Page_GoBack;                 journal.Clear();                 journal.Add(page);                                  OnPropertyChanged(&quot;JournalCount&quot;);                 OnPropertyChanged(&quot;CanGoBack&quot;);                 OnPropertyChanged(&quot;CurrentPage&quot;);             }         }          #endregion          #region Public OnApplyTemplate         public override void OnApplyTemplate()         {             base.OnApplyTemplate();              mainGrid = GetTemplateChild(&quot;mainGrid&quot;) as Grid;              grid1 = GetTemplateChild(&quot;grid1&quot;) as Grid;             if (grid1 != null)                 grid1.Margin = new Thickness(0);              grid2 = GetTemplateChild(&quot;grid2&quot;) as Grid;             if (grid2 != null)                 grid2.Margin = new Thickness(this.ActualWidth, 0, (-1 * this.ActualWidth), 0);              frame1 = GetTemplateChild(&quot;frame1&quot;) as Frame;             frame2 = GetTemplateChild(&quot;frame2&quot;) as Frame;              animation1 = mainGrid.Resources[&quot;grid1Animation&quot;] as BeginStoryboard;             animation2 = mainGrid.Resources[&quot;grid2Animation&quot;] as BeginStoryboard;             animation3 = mainGrid.Resources[&quot;grid3Animation&quot;] as BeginStoryboard;             animation4 = mainGrid.Resources[&quot;grid4Animation&quot;] as BeginStoryboard;              if (animation1 != null)                 if (animation1.Storyboard != null)                     animation1.Storyboard.Completed += NewGridMargin_Completed;             if (animation2 != null)                 if (animation2.Storyboard != null)                     animation2.Storyboard.Completed += NewGridMargin_Completed;             if (animation3 != null)                 if (animation3.Storyboard != null)                     animation3.Storyboard.Completed += OldGridMargin_Completed;             if (animation4 != null)                 if (animation4.Storyboard != null)                     animation4.Storyboard.Completed += OldGridMargin_Completed;              if (mainGrid != null)             {                 mainGrid.SizeChanged += (sender, e) =&gt;                 {                     Application.Current.Resources[&quot;Dynamic.LongPage.MarginAnimation&quot;] =                     new Thickness(this.ActualWidth, 0, -1 * this.ActualWidth, 0);                 };             }              OnFirstPage(FirstPage);         }          #endregion          #region Private Events         private void Page_Navigate(IFloppyPage page, FloppyPageEventArgs e)         {             Start_Navigate(page);         }          private void Page_GoBack(FloppyPageEventArgs e)         {             Start_GoBack();         }          private void NewGridMargin_Completed(object sender, EventArgs e)         {             Set_NewMargin();         }          private void OldGridMargin_Completed(object sender, EventArgs e)         {             Set_OldMargin();         }          #endregion          #region Private Navigate         private void Start_Navigate(IFloppyPage page)         {             if (page != null && IsDoneAnimation)             {                 IsDoneAnimation = false;                 GridNumber = !GridNumber;                 page.Navigate += Page_Navigate;                 page.GoBack += Page_GoBack;                  if (!GridNumber)                 {                     animation1.Storyboard.Stop();                     frame2.Navigate(page);                     Panel.SetZIndex(grid1, 0);                     Panel.SetZIndex(grid2, 1);                     grid2.Visibility = Visibility.Visible;                     animation2.Storyboard.Begin();                 }                 else                 {                     animation2.Storyboard.Stop();                     frame1.Navigate(page);                     Panel.SetZIndex(grid2, 0);                     Panel.SetZIndex(grid1, 1);                     grid1.Visibility = Visibility.Visible;                     animation1.Storyboard.Begin();                 }                 journal.Add(page);                  OnPropertyChanged(&quot;JournalCount&quot;);                 OnPropertyChanged(&quot;CurrentPage&quot;);                 OnPropertyChanged(&quot;CanGoBack&quot;);                  base.RaiseEvent(new RoutedEventArgs(FloppyPages.NavigatedRoutedEvent, this));             }         }         private void Set_NewMargin()         {             if (!GridNumber)             {                 grid2.Margin = new Thickness(0);                 grid1.Margin = new Thickness(this.ActualWidth, 0, (-1 * this.ActualWidth), 0);                 grid1.Visibility = Visibility.Hidden;             }             else             {                 grid1.Margin = new Thickness(0);                 grid2.Margin = new Thickness(this.ActualWidth, 0, (-1 * this.ActualWidth), 0);                 grid2.Visibility = Visibility.Hidden;             }             IsDoneAnimation = true;         }          #endregion          #region Private GoBack         private bool Start_GoBack()         {             if (journal.Count &gt; 1 && IsDoneAnimation)             {                 IsDoneAnimation = false;                 GridNumber = !GridNumber;                 grid1.Visibility = Visibility.Visible;                 grid2.Visibility = Visibility.Visible;                  if (!GridNumber)                 {                     animation4.Storyboard.Stop();                     grid2.Margin = new Thickness(0);                     frame2.Navigate(journal[journal.Count - 2]);                     animation3.Storyboard.Begin();                 }                 else                 {                     animation3.Storyboard.Stop();                     grid1.Margin = new Thickness(0);                     frame1.Navigate(journal[journal.Count - 2]);                     animation4.Storyboard.Begin();                 }                 journal.Remove(journal[journal.Count - 1]);                  OnPropertyChanged(&quot;JournalCount&quot;);                 OnPropertyChanged(&quot;CurrentPage&quot;);                 OnPropertyChanged(&quot;CanGoBack&quot;);                  base.RaiseEvent(new RoutedEventArgs(FloppyPages.WentBackRoutedEvent, this));                  return true;             }             else                 return false;         }         private void Set_OldMargin()         {             if (!GridNumber)             {                 Panel.SetZIndex(grid1, 0);                 Panel.SetZIndex(grid2, 1);                 grid1.Margin = new Thickness(this.ActualWidth, 0, (-1 * this.ActualWidth), 0);                 grid1.Visibility = Visibility.Hidden;             }             else             {                 Panel.SetZIndex(grid1, 1);                 Panel.SetZIndex(grid2, 0);                 grid2.Margin = new Thickness(this.ActualWidth, 0, (-1 * this.ActualWidth), 0);                 grid2.Visibility = Visibility.Hidden;             }             IsDoneAnimation = true;         }          #endregion          #region INotifyPropertyChanged Members          public event PropertyChangedEventHandler PropertyChanged;          private void OnPropertyChanged(string propertyName)         {             PropertyChangedEventHandler handler = PropertyChanged;              if (handler != null)                 handler(this, new PropertyChangedEventArgs(propertyName));         }          #endregion     } }  <\/code><\/pre>\n<p>  \u041d\u0430\u0447\u043d\u0443 \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0449\u0451 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0432 xaml \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 \u044d\u0442\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0440\u0435\u0441\u0443\u0440\u0441:<\/p>\n<p>  \u00abDynamic.LongPage.MarginAnimation\u00bb.<\/p>\n<p>  \u0418 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043c \u0441\u0442\u043e\u044f\u043b\u0438 \u0442\u0430\u043a\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b: 10,0,-10,0;<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 SizeChanged \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 mainGrid \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 OnApplyTemplate().<\/p>\n<pre><code class=\"java\">if (mainGrid != null) {     mainGrid.SizeChanged += (sender, e) =&gt;     {         Application.Current.Resources[&quot;Dynamic.LongPage.MarginAnimation&quot;] =             new Thickness(this.ActualWidth, 0, -1 * this.ActualWidth, 0);     }; } <\/code><\/pre>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0433\u0434\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0443\u043a\u0430\u0436\u0435\u043c, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430.<\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e \u043a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u0447\u0442\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 OnApplyTemplate() \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0441\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c GetTemplateChild(\u00abmainGrid\u00bb);<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0442\u0430\u043a\u0438\u043c: \u0432\u044b \u043a\u0430\u043a \u0431\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u043a\u0440\u0430\u044f \u0432\u044b\u043b\u0435\u0437\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0437\u0430\u0434\u043d\u0438\u0439 \u043f\u043b\u0430\u043d, \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u0440\u0430\u0439 \u0433\u0434\u0435 \u0431\u044b\u043b\u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0432\u0435 \u0447\u0435\u0440\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043d\u0435\u043b\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0435\u0436\u0430\u0442 frame1 \u0438 frame2. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 GridNumber \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 grid \u043c\u044b \u043f\u043e\u043f\u0430\u043b\u0438 \u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c frame \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0436\u0443\u0440\u043d\u0430\u043b, \u043d\u043e \u0432 \u043d\u0451\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0435\u0442. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 IFloppyPage \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u00ab\u041d\u0430\u0437\u0430\u0434\u00bb (GoBack).<\/p>\n<p>  \u0414\u0430 \u0438 \u0435\u0449\u0451. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u0436\u0438\u0437\u043d\u044c, \u0435\u043c\u0443 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e DefaultPage \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043b\u0438\u0431\u043e \u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u043a\u0430\u0436\u0435\u0442\u0435 \u0432\u044b. \u0417\u0430\u0442\u0435\u043c FloppyPages \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u0442 \u0432\u0430\u0448 IFloppyPage \u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044e Navigate \u0438 GoBack. \u0422\u0430\u043a \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 IFloppyPage \u0432\u044b \u0440\u0435\u0448\u0438\u0442\u0435\u0441\u044c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0436\u0443 \u043e\u043a\u043d\u043e, \u0433\u0434\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f FloppyPages, \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430.<\/p>\n<pre><code class=\"java\">using System.Windows; using UFC.Pages; namespace UFC {     public partial class Browser : Window     {         public Browser()         {             InitializeComponent();             floppyPages.FirstPage = new MainPage()             {                 IFloppyPages = floppyPages             };         }          private void Button_GoBack(object sender, RoutedEventArgs e)         {             floppyPages.GoBack();         }     } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;Window x:Class=&quot;UFC.Browser&quot;         xmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;         xmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;         xmlns:ufc=&quot;clr-namespace:UFC.UI.Controls;assembly=UFC.UI&quot;         Title=&quot;UFC&quot; Height=&quot;640&quot; Width=&quot;380&quot; &gt;     &lt;Grid Background=&quot;LightGray&quot;&gt;         &lt;Grid.RowDefinitions&gt;             &lt;RowDefinition Height=&quot;40&quot;\/&gt;             &lt;RowDefinition\/&gt;         &lt;\/Grid.RowDefinitions&gt;                  &lt;ufc:FloppyPages Grid.Row=&quot;1&quot; Name=&quot;floppyPages&quot; \/&gt;          &lt;Grid Grid.Row=&quot;0&quot; Background=&quot;LightGray&quot;&gt;             &lt;Grid.ColumnDefinitions&gt;                 &lt;ColumnDefinition Width=&quot;40&quot;\/&gt;                 &lt;ColumnDefinition Width=&quot;1*&quot;\/&gt;                 &lt;ColumnDefinition Width=&quot;40&quot;\/&gt;             &lt;\/Grid.ColumnDefinitions&gt;              &lt;TextBox                 Grid.Column=&quot;1&quot;                 VerticalContentAlignment=&quot;Center&quot;                 HorizontalContentAlignment=&quot;Center&quot;                 IsReadOnly=&quot;True&quot;                 Background=&quot;Transparent&quot;                 FontSize=&quot;20&quot;                 Text=&quot;{Binding ElementName=floppyPages,                            Path=CurrentPage.Title,                            UpdateSourceTrigger=PropertyChanged}&quot;\/&gt;             &lt;Button                 Name=&quot;MenuButton&quot;                 Grid.Column=&quot;0&quot;                 Visibility=&quot;Visible&quot;&gt;                 &lt;Path                     Margin=&quot;5&quot;                     Stretch=&quot;UniformToFill&quot;                     Fill=&quot;Black&quot;                     Data=&quot;F1 M 19,23L 27,23L 27,31L 19,31L 19,23 Z M 19,34L 27,34L 27,42L 19,42L 19,34 Z M 31,23L 57,23L 57,31L 31,31L 31,23 Z M 19,45L 27,45L 27,53L 19,53L 19,45 Z M 31,34L 57,34L 57,42L 31,42L 31,34 Z M 31,45L 57,45L 57,53L 31,53L 31,45 Z &quot;\/&gt;             &lt;\/Button&gt;              &lt;Button                 Name=&quot;BackButton&quot;                 Grid.Column=&quot;0&quot;                 Visibility=&quot;Hidden&quot;                 Click=&quot;Button_GoBack&quot;&gt;                 &lt;Path                     Margin=&quot;5,9&quot;                     Stretch=&quot;UniformToFill&quot;                     Fill=&quot;Black&quot;                     Data=&quot;F1 M 18.0147,41.5355C 16.0621,39.5829 16.0621,36.4171 18.0147,34.4645L 26.9646,25.5149C 28.0683,24.4113 29,24 31,24L 52,24C 54.7614,24 57,26.2386 57,29L 57,47C 57,49.7614 54.7614,52 52,52L 31,52C 29,52 28.0683,51.589 26.9646,50.4854L 18.0147,41.5355 Z M 47.5281,42.9497L 42.5784,37.9999L 47.5281,33.0502L 44.9497,30.4717L 40,35.4215L 35.0502,30.4717L 32.4718,33.0502L 37.4215,37.9999L 32.4718,42.9497L 35.0502,45.5281L 40,40.5783L 44.9497,45.5281L 47.5281,42.9497 Z &quot;\/&gt;             &lt;\/Button&gt;                          &lt;Button                 Grid.Column=&quot;2&quot;&gt;                 &lt;Path                     Margin=&quot;5,9&quot;                     Stretch=&quot;UniformToFill&quot;                     Fill=&quot;Black&quot;                     Data=&quot;F1 M 57.9853,41.5355L 49.0354,50.4854C 47.9317,51.589 47,52 45,52L 24,52C 21.2386,52 19,49.7614 19,47L 19,29C 19,26.2386 21.2386,24 24,24L 45,24C 47,24 47.9317,24.4113 49.0354,25.5149L 57.9853,34.4645C 59.9379,36.4171 59.9379,39.5829 57.9853,41.5355 Z M 28.4719,42.9497L 31.0503,45.5281L 36,40.5784L 40.9498,45.5281L 43.5282,42.9497L 38.5785,37.9999L 43.5282,33.0502L 40.9498,30.4718L 36,35.4215L 31.0503,30.4718L 28.4719,33.0502L 33.4216,37.9999L 28.4719,42.9497 Z &quot;\/&gt;             &lt;\/Button&gt;         &lt;\/Grid&gt;     &lt;\/Grid&gt; &lt;\/Window&gt; <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438 ViewModel, \u0438 Model \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 DataContext \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/317896\/\"> https:\/\/habrahabr.ru\/post\/317896\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e Frame \u0432 \u0441\u0442\u0438\u043b\u0435 IOS<\/h2>\n<p>  \u0418\u043b\u0438 \u043f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u2014 Frame \u0432 \u0441\u0442\u0438\u043b\u0435 Modern UI.<\/p>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435. \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0434\u0440\u0435\u0439 \u0438 \u044f \u043e\u0447\u0435\u043d\u044c \u0443\u0441\u0442\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c VK \u043d\u0430 Windows 10. \u0415\u0433\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043c\u0435\u043d\u044f \u0443\u0442\u043e\u043c\u0438\u043b\u0430 \u0438 \u043a\u0430\u043a \u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d. \u0415\u0449\u0451 \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0432\u043d\u043e \u0445\u043e\u0442\u0435\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u043b\u043e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u043f\u043b\u0430\u0432\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u043a\u0430\u043a \u043d\u0430 iPhone. \u0414\u043b\u044f \u0447\u0435\u0433\u043e? \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 VK \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 WPF. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043a\u0430\u0436\u0443 \u043e\u0431\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/pp.vk.me\/c837324\/v837324066\/157ed\/RGvGccxoH8M.jpg\" alt=\"image\" \/><\/div>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u043c. DataContext \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0443 \u0441 namespace UFC.UI. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043d\u043e\u043f\u043e\u043a, \u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:  <\/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-282676","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282676","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=282676"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282676\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}