IFrameworkViewSource IFrameworkViewSource IFrameworkViewSource Interface

Defines a factory for view provider objects.

Syntax

Declaration

public interface IFrameworkViewSourcepublic interface IFrameworkViewSourcePublic Interface IFrameworkViewSource

Remarks

Instances of objects that implement this class are provided to the app object's Run(Windows.ApplicationModel.Core.IFrameworkViewSource) 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 summary

Returns a view provider object.

Methods

  • CreateView()
    CreateView()
    CreateView()
    CreateView()

    Returns a view provider object.

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

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.GuidAttribute

Details

Assembly

Windows.ApplicationModel.Core.dll