Export (0) Print
Expand All

FrameworkContentElement.IsLoaded Property

Gets a value indicating whether this element has been loaded for presentation.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool IsLoaded { get; }

Property Value

Type: System.Boolean
true if the current element is attached to an element tree and has been rendered; false if the element has never been attached to a loaded element tree.

From a newly constructed instance, this property starts off false, and remains true once it is set to true, even if subsequently removed by code.

The following example code uses IsLoaded as a conditional check to assure that a function displayData (not shown) will have valid elements loaded on the page to work against, as part of an on-demand handler. That same logic is run as an event handler for Loaded.

private void OnLoad(object sender, RoutedEventArgs e)
{
    displayData();
}
private void updateSummary(object sender, RoutedEventArgs e)
{
    if (myflowdocument.IsLoaded)
        displayData();
}

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft