Example #1
0
        /// <summary>
        /// Change the displayed content in the <see cref="FlipView"/>.
        /// </summary>
        private void RefreshDisposition()
        {
            if (!EnsureTemplateParts())
            {
                return;
            }

            Canvas.SetLeft(PreviousContent, -ActualWidth);
            Canvas.SetLeft(NextContent, ActualWidth);
            ContentGrid.RenderTransform = new TranslateTransform();

            PreviousContent.Content = GetItem(SelectedIndex - 1);
            CurrentContent.Content  = GetItem(SelectedIndex);
            NextContent.Content     = GetItem(SelectedIndex + 1);
            CommandManager.InvalidateRequerySuggested();

            VisualHelper.InitializeFocus(CurrentContent.Content as UIElement);
        }