1

假设我有一个没有 XAML 文件的“ContentPage”对象。是否可以在前台全屏或应用程序的网格列中显示它的内容?

我有一个有接口的插件

public interface IPlugin
{
    ContentPage GetPluginUI();
}

插件本身返回我的源 XAML 文件“BigView”的新实例

    public ContentPage GetPluginUI()
    {
        return new BigView();
    }

它源自“ContentPage”。

现在,当我在主机程序中加载插件时,我得到了 ContentPage 对象:

ContentPage pluginContentPage = plugin.GetPluginUI();

如何显示“pluginContentPage”进行测试?

4

0 回答 0