C# Class VLC_WINRT.Utility.Helpers.AwaitableUI.FrameworkElementExtensions

Contains extension methods to wait for FrameworkElement events.
Show file Open project: kusl/vlcwinrt

Public Methods

Method Description
WaitForImagesToLoad ( this frameworkElement, int millisecondsTimeout ) : System.Threading.Tasks.Task

Waits for all the image sources in the visual tree to complete loading (useful to call before a page transition).

Note that it does not take popups into account.

WaitForLayoutUpdateAsync ( this frameworkElement ) : System.Threading.Tasks.Task

Waits for the next layout update event.

WaitForLoadedAsync ( this frameworkElement ) : System.Threading.Tasks.Task

Waits for the element to load (construct and add to the main object tree).

WaitForNonZeroSizeAsync ( this frameworkElement ) : System.Threading.Tasks.Task

Waits for the size of the element to become non-zero.

WaitForUnloadedAsync ( this frameworkElement ) : System.Threading.Tasks.Task

Waits for the element to unload (disconnect from the main object tree).

Method Details

WaitForImagesToLoad() public static method

Waits for all the image sources in the visual tree to complete loading (useful to call before a page transition).
Note that it does not take popups into account.
public static WaitForImagesToLoad ( this frameworkElement, int millisecondsTimeout ) : System.Threading.Tasks.Task
frameworkElement this The framework element.
millisecondsTimeout int The timeout in milliseconds.
return System.Threading.Tasks.Task

WaitForLayoutUpdateAsync() public static method

Waits for the next layout update event.
public static WaitForLayoutUpdateAsync ( this frameworkElement ) : System.Threading.Tasks.Task
frameworkElement this The framework element.
return System.Threading.Tasks.Task

WaitForLoadedAsync() public static method

Waits for the element to load (construct and add to the main object tree).
public static WaitForLoadedAsync ( this frameworkElement ) : System.Threading.Tasks.Task
frameworkElement this
return System.Threading.Tasks.Task

WaitForNonZeroSizeAsync() public static method

Waits for the size of the element to become non-zero.
public static WaitForNonZeroSizeAsync ( this frameworkElement ) : System.Threading.Tasks.Task
frameworkElement this The framework element.
return System.Threading.Tasks.Task

WaitForUnloadedAsync() public static method

Waits for the element to unload (disconnect from the main object tree).
public static WaitForUnloadedAsync ( this frameworkElement ) : System.Threading.Tasks.Task
frameworkElement this
return System.Threading.Tasks.Task