I​Framework​View​Source I​Framework​View​Source I​Framework​View​Source Interface

Definition

Defines a factory for view provider objects.

public interface IFrameworkViewSourcepublic interface IFrameworkViewSourcePublic 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()

Returns a view provider object.

public IFrameworkView CreateView()public IFrameworkView CreateView()Public Function CreateView() As IFrameworkView
Returns

An object that implements a view provider.

Attributes

See Also