PanelStyle.BackImageUrl Eigenschap

Definitie

Hiermee haalt u de URL van de achtergrondafbeelding voor het configuratiescherm op of stelt u deze in.

public:
 virtual property System::String ^ BackImageUrl { System::String ^ get(); void set(System::String ^ value); };
public virtual string BackImageUrl { get; set; }
member this.BackImageUrl : string with get, set
Public Overridable Property BackImageUrl As String

Waarde van eigenschap

De URL van de achtergrondafbeelding voor het configuratiescherm. De standaardwaarde is een lege tekenreeks ("").

Uitzonderingen

De eigenschap BackImageUrl is null.

Voorbeelden

In het volgende codevoorbeeld wordt dezelfde achtergrondafbeelding toegepast op twee paneelbesturingselementen en Panel1Panel2. Als dit voorbeeld correct werkt, moet u uw eigen afbeelding opgeven. 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 BackImageUrl eigenschap geeft de URL van de achtergrondafbeelding voor het configuratiescherm op. Deze eigenschap werkt alleen als er een afbeeldingsbestand op de opgegeven locatie bestaat. Als het opgegeven afbeeldingsbestand niet toegankelijk is, wordt het configuratiescherm weergegeven zonder een achtergrondafbeelding.

Van toepassing op