Defines a factory for view provider objects.
public interface class IFrameworkViewSource
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(3447129620, 26052, 17004, 148, 148, 52, 252, 67, 85, 72, 98)]
struct IFrameworkViewSource
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(3447129620, 26052, 17004, 148, 148, 52, 252, 67, 85, 72, 98)]
public interface IFrameworkViewSource
Public Interface IFrameworkViewSource
Windows 10 (introduced in 10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced in v1.0)
Instances of objects that implement this class are provided to the app object's CoreApplication.Run method when the app starts, which uses it to create the views used by the app.
struct App : implements<App, IFrameworkViewSource, IFrameworkView>
{
public:
IFrameworkView CreateView()
{
return *this;
}
};
...
int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
{
Windows::ApplicationModel::Core::CoreApplication::Run(App());
}
If you're using C++/CX, then a view provider must be attributed as MTAThread.
ref class MyFrameworkViewSource : IFrameworkViewSource
{
public:
virtual IFrameworkView^ CreateView()
{
return ref new MyFrameworkView(); // See IFrameworkView for implementation specifics.
}
};
// ...
[Platform::MTAThread]
int main(Platform::Array<Platform::String^>^)
{
auto frameworkViewSource = ref new MyFrameworkViewSource();
Windows::ApplicationModel::Core::CoreApplication::Run(frameworkViewSource);
return 0;
}
See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4