Compartilhar via


SummaryLink.Style propriedade

Obtém ou define o estilo no qual processar este objeto SummaryLink .

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (em Microsoft.SharePoint.Publishing.dll)

Sintaxe

'Declaração
Public Property Style As String
    Get
    Set
'Uso
Dim instance As SummaryLink
Dim value As String

value = instance.Style

instance.Style = value
public string Style { get; set; }

Valor de propriedade

Tipo: System.String
O estilo no qual processar este objeto SummaryLink .

Comentários

Links de sumário é exibido através de objetos SummaryLinkWebPart e SummaryLinkFieldControl . Esses controles têm associados a folhas de estilo XSL que contém modelos XSL que são usados para processar os links. O modelo é aplicado para processar este link é o modelo com um nome correspondente a este nome de estilo. Esse valor está disponível no processamento XSL através do parâmetro @Style .

Exemplos

// Add Groups and links.
            // The link style set here must correspond to one of the template names in the XSL Item style
            // This is not verified by the OM, but an incorrect template name results in the
            // link not rendering.
            
            // GroupA

            summaryLink = summaryLinks.Add("GroupA");
            summaryLink.IsGroupHeader = true;

            summaryLink = summaryLinks.Add("Link1");
            summaryLink.Description = "Description1";
            summaryLink.Style = "Default";
            summaryLink.ImageUrl = "http://www.live.com/live/1.100.7.337/img/wl_jewel.gif";
            summaryLink.LinkUrl = "http://www.example.com/link1";

            summaryLink = summaryLinks.Add("Link2");
            summaryLink.Description = "Description2";
            summaryLink.Style = "Default";
            summaryLink.ImageUrl = "http://www.live.com/live/1.100.7.337/img/wl_jewel.gif";
            summaryLink.LinkUrl = "http://www.example.com/link2";

            // GroupB

            summaryLink = summaryLinks.Add("GroupB");
            summaryLink.IsGroupHeader = true;

            summaryLink = summaryLinks.Add("Link3");
            summaryLink.Description = "Description3";
            summaryLink.Style = "Default";
            summaryLink.ImageUrl = "http://www.live.com/live/1.100.7.337/img/wl_jewel.gif";
            summaryLink.LinkUrl = "http://www.example.com/link3";
            summaryLink.LinkToolTip = "Tooltip for link3";

            return summaryLinkValue;
' Add Groups and links.
' The link style set here must correspond to one of the template names in the XSL Item style
' This is not verified by the OM, but an incorrect template name results in the
' link not rendering.

' GroupA

summaryLink = summaryLinks.Add("GroupA")
summaryLink.IsGroupHeader = True

summaryLink = summaryLinks.Add("Link1")
summaryLink.Description = "Description1"
summaryLink.Style = "Default"
summaryLink.ImageUrl = "http://www.live.com/live/1.100.7.337/img/wl_jewel.gif"
summaryLink.LinkUrl = "http://www.example.com/link1"

summaryLink = summaryLinks.Add("Link2")
summaryLink.Description = "Description2"
summaryLink.Style = "Default"
summaryLink.ImageUrl = "http://www.live.com/live/1.100.7.337/img/wl_jewel.gif"
summaryLink.LinkUrl = "http://www.example.com/link2"

' GroupB

summaryLink = summaryLinks.Add("GroupB")
summaryLink.IsGroupHeader = True

summaryLink = summaryLinks.Add("Link3")
summaryLink.Description = "Description3"
summaryLink.Style = "Default"
summaryLink.ImageUrl = "http://www.live.com/live/1.100.7.337/img/wl_jewel.gif"
summaryLink.LinkUrl = "http://www.example.com/link3"
summaryLink.LinkToolTip = "Tooltip for link3"

Return summaryLinkValue

Dica

Este exemplo de código é parte de um exemplo maior de código no tópico SummaryLink .

Ver também

Referência

SummaryLink classe

SummaryLink membros

Microsoft.SharePoint.Publishing namespace