如何从网格翻转Page

如何从网格翻转Page

本文介绍了如何从网格翻转Page.xaml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!如何将Page.xaml从网格中翻转?

这是项目 []

如何在相机应用程序Windows 8中获得结果。 []

Hello! How to Page.xaml flip from Grid?
this is project https://www.dropbox.com/s/a9gwadmabmvsypx/WpfApplication6.rar?dl=0[^]
how to get the result as in camera app Windows 8.https://www.dropbox.com/s/juia1oa86pdzv1z/Camera.png?dl=0[^]

//Swith page from MainWindow
 public static class Switcher
    {
        public static MainWindow pageSwitcher;

        public static void Switch(UserControl newPage)
        {
            pageSwitcher.Navigate(newPage);

        }
    }





MainWindow



MainWindow

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Switcher.pageSwitcher = this;
            Switcher.Switch(new Page1());

        }

       public void Navigate(UserControl nextPage)
        {

            if (GridMenu.Children.Count > 1)
            {
                GridMenu.Children.RemoveAt(1);
                Grid.SetRow(nextPage, 0);
                Grid.SetColumn(nextPage, 1);
                GridMenu.Children.Add(nextPage);
            }
            else
            {
                Grid.SetRow(nextPage, 0);
                Grid.SetColumn(nextPage, 1);
                GridMenu.Children.Add(nextPage);
            }
        }

    }

推荐答案

MainWindow.xaml
<controls:flipview x:name="img" grid.row="0" itemssource="{Binding Movies}" xmlns:x="#unknown" xmlns:controls="#unknown">
                           SelectedIndex="0">
            <controls:flipview.itemtemplate>
                <datatemplate>
                    <grid>
                        <Frame Source="{Binding Page}" NavigationUIVisibility="Hidden" JournalOwnership="OwnsJournal"/>

                    </grid>
                </datatemplate>
            </controls:flipview.itemtemplate>
        </controls:flipview>


这篇关于如何从网格翻转Page.xaml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 02:51