Наследование: ViewModelBase
Пример #1
0
		public MainPage()
		{
			Debug.WriteLine("**MainPage Constructor Triggered**");
			InitializeComponent();

			HardwareButtons.CameraPressed += HardwareButtons_CameraPressed;
			DataContext = ViewModel = new MainViewModel();

			this.Loaded += delegate { App.UpdateSnapchatData(); };

			_cam = new CameraWrapped();
		}
Пример #2
0
        public MainPage()
        {
            DataContext = new MainViewModel();
            InitializeComponent();
            SizeChanged += (sender, e) =>
            {
                if (e.NewSize.Width <= (int) Resources["MinimalViewMaxWidth"])
                    VisualStateManager.GoToState(this, "MinimalLayout", true);
                else if (e.NewSize.Width < e.NewSize.Height)
                    VisualStateManager.GoToState(this, "PortraitLayout", true);
                else
                    VisualStateManager.GoToState(this, "DefaultLayout", true);
            };

            #if !DEBUG
            Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().IsScreenCaptureEnabled = false;
            #endif

            /*BottomAppBar.Closed += delegate
            {

            };*/
        }