Beispiel #1
0
        public FastDialogDetailsView()
        {
            InitializeComponent();
            //LayoutRoot.Opacity = 0.0;

            var appBar            = new ApplicationBar();
            var appBarDefaultSize = appBar.DefaultSize;

            AppBarPlaceholder.Height = appBarDefaultSize;

            Loaded += (sender, args) =>
            {
                //_isForwardInAnimation = true;

                var elapsed = _stopwatch.Elapsed;
                _logs.Add("Elapsed=" + elapsed + " Count=" + ViewModel.FistSliceCount);

                Logs.Text = string.Join(Environment.NewLine, _logs);
                //MessageBox.Show(string.Join(Environment.NewLine, _logs));


                _parentPage = VisualTreeExtensions.FindParentOfType <PhoneApplicationPage>(this);
                if (_parentPage != null)
                {
                    _previousAppBar = _parentPage.ApplicationBar;

                    BuildLocalizedAppBar();
                    _parentPage.ApplicationBar = ApplicationBar;
                }
                //RunAnimation();
                ViewModel.OnLoaded();
            };

            Unloaded += (sender, args) =>
            {
                //_isBackwardOutAnimation = true;

                if (_parentPage != null)
                {
                    _parentPage.ApplicationBar = _previousAppBar;
                }
            };
        }