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)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public bool IsLoaded { get; }
/** @property */
public boolean get_IsLoaded ()

public function get IsLoaded () : boolean

You cannot use this property in XAML.

Property Value

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();
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft