How to implement Chrome Metro mode?

0

I want implement like Chrome Metro mode in my desktop app. Please help me.

class WRLAppViewSource : public mswr::RuntimeClass<winapp::Core::IFrameworkViewSource> {
...
};

mswrw::RoInitializeWrapper roinit(RO_INIT_MULTITHREADED);
HRESULT hr;

mswr::ComPtr<winapp::Core::ICoreApplication> core_app;
hr = CreateActivationFactory(
      RuntimeClass_Windows_ApplicationModel_Core_CoreApplication,
      core_app.GetAddressOf());
HSTRING id;
hr = core_app->get_Id(&id);

auto viewSource = mswr::Make<WRLAppViewSource>();
hr = core_app->Run(viewSource.Get());

"hr = core_app->Run(viewSource.Get()); " return "hr = 0x80004015 : The class is configured to run as a security id different from the caller".

google-chrome
windows-8
windows-runtime
microsoft-metro
asked on Stack Overflow Apr 6, 2015 by Felix • edited Apr 6, 2015 by rfornal

1 Answer

0

The "Metro mode" environment (typically used by Windows Store apps) that Chrome, IE, and FireFox use is not available to general purpose desktop apps.

Chrome can do this because it is a "New experience enabled desktop browser" and is selected by the user as the default browser. If you change your default browser to IE then Chrome will lose this ability and IE will gain it.

If you are writing a browser then take a look at the Developing a new experience enabled Desktop Browser white paper.

If you are not writing a browser and are trying to add a Windows Store UI to an existing desktop enterprise app then take a look at Brokered Windows Runtime Components (BWRC). BWRCs allow a side-loaded .Net Windows Store app to interop with a desktop component so the Windows Store app can provide a modern UI which connects to an existing back-end.

answered on Stack Overflow Apr 8, 2015 by Rob Caplan - MSFT

User contributions licensed under CC BY-SA 3.0