PanelStyle.Wrap Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of de inhoud binnen het deelvenster wordt verpakt.

public:
 virtual property bool Wrap { bool get(); void set(bool value); };
public virtual bool Wrap { get; set; }
member this.Wrap : bool with get, set
Public Overridable Property Wrap As Boolean

Waarde van eigenschap

true als de inhoud binnen het deelvenster wordt verpakt; anders, false. De standaardwaarde is true.

Voorbeelden

In het volgende codevoorbeeld wordt de Wrap eigenschap false ingesteld op voor twee besturingselementen van het deelvenster, Panel1 en Panel2. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de PanelStyle klasse.

public partial class PanelStylecs_aspx : Page
{
    void Page_Load(object sender, EventArgs e)
    {
        StateBag panelState = new StateBag();
        PanelStyle myPanelStyle = new PanelStyle(panelState);
        
        // Set the properties of the PanelStyle class.
        myPanelStyle.HorizontalAlign = HorizontalAlign.Center;
        myPanelStyle.ScrollBars = ScrollBars.Both;
        myPanelStyle.Wrap = false;
        myPanelStyle.Direction = ContentDirection.LeftToRight;
        myPanelStyle.BackImageUrl = @"~\images\picture.jpg";

        // Use the ApplyStyle method of the Panel control to apply
        // the settings from the myPanelStyle object.
        Panel1.ApplyStyle(myPanelStyle);
        Panel2.ApplyStyle(myPanelStyle); 
    }
}
Partial Class PanelStylevb_aspx
    Inherits Page

    Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

        Dim panelState As StateBag = New StateBag()
        Dim myPanelStyle As PanelStyle = New PanelStyle(panelState)

        ' Set the properties of the PanelStyle class.
        myPanelStyle.HorizontalAlign = HorizontalAlign.Center
        myPanelStyle.ScrollBars = ScrollBars.Both
        myPanelStyle.Wrap = False
        myPanelStyle.Direction = ContentDirection.LeftToRight
        myPanelStyle.BackImageUrl = "~\images\picture.jpg"

        ' Use the ApplyStyle method of the Panel control to apply
        ' the settings from the myPanelStyle object.
        Panel1.ApplyStyle(myPanelStyle)
        Panel2.ApplyStyle(myPanelStyle)
        
    End Sub

End Class

Opmerkingen

De Wrap eigenschap geeft aan of de inhoud binnen het deelvenster wordt verpakt. Wanneer de Wrap eigenschap is ingesteld false op en de ScrollBars eigenschap is ingesteld op Auto, als de inhoud van het deelvenster langer is dan wat in het deelvenster past, wordt de inhoud van het deelvenster weergegeven op één regel met een horizontale schuifbalk. Wanneer de Wrap eigenschap is ingesteld false op en de ScrollBars eigenschap is ingesteld op None, wordt het deelvenster uitgebreid en zo nodig heeft de webpagina een horizontale schuifbalk.

Van toepassing op