Skip to content

Instantly share code, notes, and snippets.

@kennykerr
Last active August 29, 2015 14:17
Show Gist options
  • Save kennykerr/b4afb536fdc88dde087b to your computer and use it in GitHub Desktop.
Save kennykerr/b4afb536fdc88dde087b to your computer and use it in GitHub Desktop.
#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