You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
3.5 KiB
63 lines
3.5 KiB
<infControls:DemoView x:Class="Samples.Modules.BusyIndicator.Views.BusyIndicatorCustomContentTemplateView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:infControls="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
|
|
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
|
|
Title="BusyIndicator">
|
|
<infControls:DemoView.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="/Samples.Modules.Busyindicator;component/Resources/Common.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</infControls:DemoView.Resources>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="This example demonstrates how to create a custom content template by setting the BusyContentTemplate property to an instance of a custom DataTemplate. Take notice of how the default ProgressBar is being hidden by setting the PrgressBarStyle property. The default OverlayStyle is also being set to a custom style."
|
|
TextWrapping="Wrap" />
|
|
|
|
<StackPanel Grid.Row="1" Margin="10">
|
|
<TextBlock Grid.Row="2" Text="Custom Content Template:" Style="{StaticResource Header}" />
|
|
<extToolkit:BusyIndicator IsBusy="True">
|
|
<extToolkit:BusyIndicator.BusyContentTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Margin="4">
|
|
<TextBlock Text="Downloading Email" FontWeight="Bold" HorizontalAlignment="Center"/>
|
|
<StackPanel Margin="4">
|
|
<TextBlock Text="Downloading message 4/10..."/>
|
|
<ProgressBar Value="40" Height="15"/>
|
|
</StackPanel>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Grid.Column="0" Content="Pause" HorizontalAlignment="Right" Margin="0 0 2 0"/>
|
|
<Button Grid.Column="1" Content="Cancel" HorizontalAlignment="Left" Margin="2 0 0 0"/>
|
|
</Grid>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</extToolkit:BusyIndicator.BusyContentTemplate>
|
|
<extToolkit:BusyIndicator.OverlayStyle>
|
|
<Style TargetType="Rectangle">
|
|
<Setter Property="Fill" Value="#B1EB1D1D"/>
|
|
</Style>
|
|
</extToolkit:BusyIndicator.OverlayStyle>
|
|
<extToolkit:BusyIndicator.ProgressBarStyle>
|
|
<Style TargetType="ProgressBar">
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
</Style>
|
|
</extToolkit:BusyIndicator.ProgressBarStyle>
|
|
|
|
<ContentControl ContentTemplate="{StaticResource SampleContent}" />
|
|
</extToolkit:BusyIndicator>
|
|
</StackPanel>
|
|
</Grid>
|
|
</infControls:DemoView>
|
|
|
|
|