1 //*********************************************************
3 // Copyright (c) Microsoft. All rights reserved.
4 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
5 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
6 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
7 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 //*********************************************************
13 // Declaration of the MainPage.xaml class.
19 #include "MainPage.g.h"
20 #include "Common\LayoutAwarePage.h" // Required by generated header
21 #include "Constants.h"
25 public enum class NotifyType
31 public ref class MainPageSizeChangedEventArgs sealed
34 property Windows::UI::ViewManagement::ApplicationViewState ViewState
36 Windows::UI::ViewManagement::ApplicationViewState get()
41 void set(Windows::UI::ViewManagement::ApplicationViewState value)
48 Windows::UI::ViewManagement::ApplicationViewState viewState;
51 public ref class MainPage sealed
57 virtual void LoadState(Platform::Object^ navigationParameter,
58 Windows::Foundation::Collections::IMap<Platform::String^, Platform::Object^>^ pageState) override;
59 virtual void SaveState(Windows::Foundation::Collections::IMap<Platform::String^, Platform::Object^>^ pageState) override;
62 property bool AutoSizeInputSectionWhenSnapped
66 return autoSizeInputSectionWhenSnapped;
71 autoSizeInputSectionWhenSnapped = value;
75 property Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ LaunchArgs
77 Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ get()
79 return safe_cast<App^>(App::Current)->LaunchArgs;
83 void NotifyUser(Platform::String^ strMessage, NotifyType type);
84 void LoadScenario(Platform::String^ scenarioName);
85 event Windows::Foundation::EventHandler<Platform::Object^>^ ScenarioLoaded;
86 event Windows::Foundation::EventHandler<MainPageSizeChangedEventArgs^>^ MainPageResized;
89 void PopulateScenarios();
90 void InvalidateSize();
91 void InvalidateViewState();
93 Platform::Collections::Vector<Object^>^ ScenarioList;
94 Windows::UI::Xaml::Controls::Frame^ HiddenFrame;
95 void Footer_Click(Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
96 bool autoSizeInputSectionWhenSnapped;
98 void MainPage_SizeChanged(Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e);
99 void Scenarios_SelectionChanged(Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e);
102 static MainPage^ Current;