ToolPane.GetShowToolPaneEvent method (WebPart, ToolPane.ToolPaneView)
NOTE: This API is now obsolete.
Retorna uma cadeia de caracteres de ECMAScript (como JavaScript) que, se executado no cliente, faz com que um painel de ferramentas abrir no modo de exibição especificado para a Web Part especificada.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaração
<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
Type: Microsoft.SharePoint.WebPartPages.WebPartA Web Part para o qual deseja exibir o painel de ferramentas de propriedades. Pode ser null para modos de exibição que não requerem uma web part, como o painel de navegação.
view
Type: Microsoft.SharePoint.WebPartPages.ToolPane.ToolPaneViewUm dos valores ToolPane.ToolPaneView que especifica o modo de exibição para abrir.
Valor retornado
Type: System.String
Uma seqüência de ECMAScript (como JavaScript) que, se executado no cliente, faz com que um painel de ferramentas abrir no modo de exibição especificado para a Web Part especificada.
Examples
O seguinte método substituído RenderWebPart de uma Web Part de exemplo demonstra o uso do método GetShowToolPaneEvent para criar uma lista de links na Web Part, com cada valor da enumeração ToolPane.ToolPaneView , disponível para permitir que o usuário chamar várias exibições de painel de ferramenta disponível na Web Part.
No exemplo a seguir, "navegadores de nível inferior" refere-se ao Internet Explorer versão 5.0 e versões anterior e para os navegadores não-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>");
}