共用方式為


DefaultViewComponentFactory.CreateViewComponent(ViewComponentContext) 方法

定義

為指定的 context 建立新的控制器。

public:
 virtual System::Object ^ CreateViewComponent(Microsoft::AspNetCore::Mvc::ViewComponents::ViewComponentContext ^ context);
public object CreateViewComponent (Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context);
abstract member CreateViewComponent : Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext -> obj
override this.CreateViewComponent : Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext -> obj
Public Function CreateViewComponent (context As ViewComponentContext) As Object

參數

context
ViewComponentContext

ViewComponentContext 檢視元件。

傳回

檢視元件。

實作

適用於