IFrameworkViewSource IFrameworkViewSource IFrameworkViewSource IFrameworkViewSource Interface

Definition

Defines a factory for view provider objects.

public : interface IFrameworkViewSource
struct winrt::Windows::ApplicationModel::Core::IFrameworkViewSource
public interface IFrameworkViewSource
Public Interface IFrameworkViewSource
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

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. View providers 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;
}

Methods

CreateView() CreateView() CreateView() CreateView()

Returns a view provider object.

See Also