Last active
August 29, 2015 14:17
-
-
Save kennykerr/b4afb536fdc88dde087b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pch.h" | |
using namespace Modern; | |
using namespace Windows::ApplicationModel::Activation; | |
using namespace Windows::UI; | |
using namespace Windows::UI::Xaml; | |
using namespace Windows::UI::Xaml::Controls; | |
using namespace Windows::UI::Xaml::Media; | |
struct App : ApplicationT<App> | |
{ | |
public: | |
void OnLaunched(LaunchActivatedEventArgs const &) | |
{ | |
TextBlock text; | |
text.Text(L"Modern C++\nfor the\nWindows Runtime"); | |
text.FontFamily(FontFamily(L"Segoe UI Semibold")); | |
text.FontSize(48.0); | |
text.Foreground(SolidColorBrush(Colors::LightGreen())); | |
text.VerticalAlignment(VerticalAlignment::Center); | |
text.TextAlignment(TextAlignment::Center); | |
Window window = Window::Current(); | |
window.Content(text); | |
window.Activate(); | |
} | |
}; | |
int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) | |
{ | |
Application::Start([](auto const &) | |
{ | |
make<App>(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment