5 changed files with 154 additions and 3 deletions
|
After Width: | Height: | Size: 3.2 KiB |
@ -1,14 +1,142 @@ |
|||||
<infControls:DemoView x:Class="Samples.Modules.BusyIndicator.HomeView" |
<infControls:DemoView x:Class="Samples.Modules.BusyIndicator.HomeView" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
xmlns:local="clr-namespace:Samples.Modules.BusyIndicator" |
||||
xmlns:infControls="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure" |
xmlns:infControls="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure" |
||||
|
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" |
||||
Title="BusyIndicator"> |
Title="BusyIndicator"> |
||||
|
|
||||
|
<infControls:DemoView.Resources> |
||||
|
<local:IntegerToTimespanConverter x:Key="TimeSpanConverter" /> |
||||
|
<DataTemplate x:Key="SampleContent" > |
||||
|
<Grid Margin="10" > |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="Auto" /> |
||||
|
<RowDefinition Height="Auto"/> |
||||
|
<RowDefinition Height="Auto"/> |
||||
|
<RowDefinition Height="Auto"/> |
||||
|
<RowDefinition Height="Auto"/> |
||||
|
<RowDefinition Height="Auto"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="Auto"/> |
||||
|
<ColumnDefinition Width="*"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
|
||||
|
<TextBlock Grid.Row="0" Text="First Name:" Margin="2" VerticalAlignment="Center" /> |
||||
|
<extToolkit:WatermarkTextBox Grid.Row="0" Grid.Column="1" Margin="2" VerticalAlignment="Center" Watermark="Enter First Name" /> |
||||
|
|
||||
|
<TextBlock Grid.Row="1" Text="Last Name:" Margin="2" VerticalAlignment="Center" /> |
||||
|
<extToolkit:WatermarkTextBox Grid.Row="1" Grid.Column="1" Margin="2" VerticalAlignment="Center" Watermark="Enter Last Name" /> |
||||
|
|
||||
|
<TextBlock Grid.Row="2" Text="Date of Birth:" Margin="2" VerticalAlignment="Center" /> |
||||
|
<extToolkit:DateTimeUpDown Grid.Row="2" Grid.Column="1" Format="ShortDate" Margin="2" VerticalAlignment="Center" Watermark="Enter Date of Birth" /> |
||||
|
|
||||
|
<TextBlock Grid.Row="3" Text="Salary:" Margin="2" VerticalAlignment="Center" /> |
||||
|
<extToolkit:IntegerUpDown Grid.Row="3" Grid.Column="1" FormatString="C2" Margin="2" VerticalAlignment="Center" Watermark="Enter Salary" /> |
||||
|
|
||||
|
<TextBlock Grid.Row="4" Text="Favorite Color:" Margin="2" VerticalAlignment="Center" /> |
||||
|
<extToolkit:ColorPicker Grid.Row="4" Grid.Column="1" Margin="2" VerticalAlignment="Center" /> |
||||
|
|
||||
|
<StackPanel Grid.Row="5" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0"> |
||||
|
<Button Width="65" Margin="2">OK</Button> |
||||
|
<Button Width="65" Margin="2">Cancel</Button> |
||||
|
</StackPanel> |
||||
|
</Grid> |
||||
|
</DataTemplate> |
||||
|
</infControls:DemoView.Resources> |
||||
|
|
||||
<Grid> |
<Grid> |
||||
|
|
||||
<Grid.RowDefinitions> |
<Grid.RowDefinitions> |
||||
<RowDefinition Height="Auto" /> |
<RowDefinition Height="Auto" /> |
||||
<RowDefinition Height="*" /> |
<RowDefinition Height="Auto" /> |
||||
|
<RowDefinition Height="*"/> |
||||
</Grid.RowDefinitions> |
</Grid.RowDefinitions> |
||||
<TextBlock Grid.Row="1" Margin="10" Text="BusyIndicator makes it easy to let the user know when an application is busy. Simply wrap the relevant content in an instance of the BusyIndicator control and toggle its IsBusy property to True during any long-running process." |
|
||||
|
|
||||
|
<TextBlock Text="BusyIndicator makes it easy to let the user know when an application is busy. Simply wrap the relevant content in an instance of the BusyIndicator control and toggle its IsBusy property to True during any long-running process." |
||||
TextWrapping="Wrap" /> |
TextWrapping="Wrap" /> |
||||
|
|
||||
|
<GroupBox Header="Features" Grid.Row="1" Margin="5" > |
||||
|
<Grid Margin="5"> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="Auto" /> |
||||
|
<RowDefinition Height="Auto" /> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="Auto" /> |
||||
|
<ColumnDefinition Width="*" /> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
|
||||
|
<TextBlock Text="IsBusy:" VerticalAlignment="Center" Margin="2"/> |
||||
|
<CheckBox x:Name="_isBusy" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="When true shows the BusyIndicator" /> |
||||
|
|
||||
|
<TextBlock Text="DisplayAfter:" Grid.Row="1" VerticalAlignment="Center" Margin="2"/> |
||||
|
<StackPanel Grid.Row="1" Grid.Column="1" Margin="5" HorizontalAlignment="Left" Orientation="Horizontal"> |
||||
|
<extToolkit:IntegerUpDown x:Name="_displayAfter" Width="65" VerticalAlignment="Center" Minimum="0" Increment="100" Value="0" ToolTip="Sets the TimeSpan to wait until the BusyIndicator is displayed." /> |
||||
|
<TextBlock Text="milliseconds" Margin="5,0" VerticalAlignment="Center"/> |
||||
|
</StackPanel> |
||||
|
</Grid> |
||||
|
</GroupBox> |
||||
|
|
||||
|
<StackPanel Grid.Row="2" Margin="10"> |
||||
|
<TextBlock Text="Default:" Style="{StaticResource Header}" /> |
||||
|
<extToolkit:BusyIndicator IsBusy="{Binding IsChecked, ElementName=_isBusy}" DisplayAfter="{Binding Value, ElementName=_displayAfter, Converter={StaticResource TimeSpanConverter}}" > |
||||
|
<ContentControl ContentTemplate="{StaticResource SampleContent}" /> |
||||
|
</extToolkit:BusyIndicator> |
||||
|
|
||||
|
|
||||
|
<TextBlock Text="Custom Content:" Style="{StaticResource Header}" /> |
||||
|
<extToolkit:BusyIndicator IsBusy="{Binding IsChecked, ElementName=_isBusy}" DisplayAfter="{Binding Value, ElementName=_displayAfter, Converter={StaticResource TimeSpanConverter}}"> |
||||
|
<extToolkit:BusyIndicator.BusyContent> |
||||
|
<StackPanel Orientation="Horizontal" > |
||||
|
<Image Source="/Samples.Modules.BusyIndicator;component/Images/CdBurning32.png" /> |
||||
|
<StackPanel Margin="5,0"> |
||||
|
<TextBlock Text="Burning CD..." VerticalAlignment="Center" /> |
||||
|
<TextBlock Text="Madonna - Like a Virgin" VerticalAlignment="Center" Margin="8,0" /> |
||||
|
</StackPanel> |
||||
|
</StackPanel> |
||||
|
</extToolkit:BusyIndicator.BusyContent> |
||||
|
<ContentControl ContentTemplate="{StaticResource SampleContent}" /> |
||||
|
</extToolkit:BusyIndicator> |
||||
|
|
||||
|
|
||||
|
<TextBlock Grid.Row="2" Text="Custom Template:" Style="{StaticResource Header}" /> |
||||
|
<extToolkit:BusyIndicator IsBusy="{Binding IsChecked, ElementName=_isBusy}" DisplayAfter="{Binding Value, ElementName=_displayAfter, Converter={StaticResource TimeSpanConverter}}" > |
||||
|
<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> |
</Grid> |
||||
</infControls:DemoView> |
</infControls:DemoView> |
||||
|
|||||
Loading…
Reference in new issue