Using the decorator

1. Add the xmlns declaration
<Window x:Class="WPFBackgroundProgressIndicatorSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:heid="http://schemas.heidesoft.com/components">


2. Wrap the content with the BusyDecorator

<heid:BusyDecorator x:Name="busy">
    <Grid>
    </Grid>
</heid:BusyDecorator>


3. Set the IsBusy property to true when a long running operation is occurring

busy.IsBusyIndicatorShowing = true;
// do work
busy.IsBusyIndicatorShowing = false; 

Last edited Oct 3, 2011 at 2:50 AM by aheidebrecht, version 2

Comments

No comments yet.