(WebPart, ToolPane.ToolPaneView) del método ToolPane.GetShowToolPaneEvent
NOTA: esta API está ahora obsoleta.
Devuelve una cadena de ECMAScript (por ejemplo, JavaScript), si se ejecuta en el cliente, lo que hace que un panel de herramientas abrir en la vista especificada para el elemento Web especificado.
Espacio de nombres: Microsoft.SharePoint.WebPartPages
Ensamblado: Microsoft.SharePoint (en Microsoft.SharePoint.dll)
Sintaxis
'Declaración
<ObsoleteAttribute("This function is deprecated. Use GetShowToolPaneEvent(WebPart webPart, WebPartDisplayMode displayMode) instead.", _
False)> _
Public Shared Function GetShowToolPaneEvent ( _
webPart As WebPart, _
view As ToolPane.ToolPaneView _
) As String
'Uso
Dim webPart As WebPart
Dim view As ToolPane.ToolPaneView
Dim returnValue As String
returnValue = ToolPane.GetShowToolPaneEvent(webPart, _
view)
[ObsoleteAttribute("This function is deprecated. Use GetShowToolPaneEvent(WebPart webPart, WebPartDisplayMode displayMode) instead.",
false)]
public static string GetShowToolPaneEvent(
WebPart webPart,
ToolPane.ToolPaneView view
)
Parámetros
webPart
Tipo: Microsoft.SharePoint.WebPartPages.WebPartEl elemento Web para el que se va a mostrar el panel de herramientas de propiedades. Puede ser null para las vistas que no requieren un elemento web, como el panel de exploración.
view
Tipo: Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneViewUno de los valores de ToolPane.ToolPaneView que especifica la vista que se va a abrir.
Valor devuelto
Tipo: System.String
Una cadena de ECMAScript (por ejemplo, JavaScript), si se ejecuta en el cliente, lo que hace que un panel de herramientas abrir en la vista especificada para el elemento Web especificado.
Ejemplos
El siguiente método invalidado RenderWebPart desde un elemento Web de ejemplo muestra el uso del método GetShowToolPaneEvent para crear una lista de vínculos en el elemento Web, con cada valor de la enumeración ToolPane.ToolPaneView , disponible para permitir al usuario invocar las diversas vistas de panel de herramienta disponible desde el elemento Web.
En el siguiente ejemplo, "Explorador de nivel inferior" hace referencia a Internet Explorer versión 5.0 y versiones anterior y para los exploradores que no sean de Microsoft.
Protected Overrides Sub RenderWebPart(output As HtmlTextWriter)
Dim myToolPaneCall as String
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.GalleryBrowse)
output.Write("<a href=""" + myToolPaneCall + """>Browse Pane</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.GallerySearch)
output.Write("<a href=""" + myToolPaneCall + """>Search Pane</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Import)
output.Write("<a href=""" + myToolPaneCall + """>Import Pane</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Navigation)
output.Write("<a href=""" + myToolPaneCall + """>Settings Pane (Downlevel Browser)</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Error)
output.Write("<a href=""" + myToolPaneCall + """>Error Pane</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(this, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.ExtensibleView)
output.Write("<a href=""" + myToolPaneCall + """>Extensible Pane</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(this, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Properties)
output.Write("<a href==""" + myToolPaneCall + """>Properties Pane</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(this, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.WebPart)
output.Write("<a href=""" + myToolPaneCall + """>Chrome Menu Pane (Downlevel Browser)</a><br>")
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Closed)
output.Write("<a href=""" + myToolPaneCall + """>Close ToolPane</a><br>")
output.Write("<br>")
End Sub
protected override void RenderWebPart(HtmlTextWriter output)
{
string myToolPaneCall;
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.GalleryBrowse);
output.Write("<a href=\"" + myToolPaneCall + "\">Browse Pane</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.GallerySearch);
output.Write("<a href=\"" + myToolPaneCall + "\">Search Pane</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Import);
output.Write("<a href=\"" + myToolPaneCall + "\">Import Pane</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Navigation);
output.Write("<a href=\"" + myToolPaneCall + "\">Settings Pane (Downlevel Browser)</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Error);
output.Write("<a href=\"" + myToolPaneCall + "\">Error Pane</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(this, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.ExtensibleView);
output.Write("<a href=\"" + myToolPaneCall + "\">Extensible Pane</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(this, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Properties);
output.Write("<a href=\"" + myToolPaneCall + "\">Properties Pane</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(this, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.WebPart);
output.Write("<a href=\"" + myToolPaneCall + "\">Chrome Menu Pane (Downlevel Browser)</a><br>");
myToolPaneCall = Microsoft.SharePoint.WebPartPages.ToolPane.GetShowToolPaneEvent(null, Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneView.Closed);
output.Write("<a href=\"" + myToolPaneCall + "\">Close ToolPane</a><br>");
output.Write("<br>");
}