34 changed files with 620 additions and 267 deletions
@ -0,0 +1,14 @@ |
|||
<TreeViewItem x:Class="Samples.Modules.BusyIndicator.NavigationItems.BusyIndicatorNavItem" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:navItems="clr-namespace:Samples.Modules.BusyIndicator.NavigationItems" |
|||
xmlns:views="clr-namespace:Samples.Modules.BusyIndicator.Views" |
|||
Header="BusyIndicator" Tag="{x:Type views:BusyIndicatorView}"> |
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="navItems:BusyIndicatorNavItem" BasedOn="{StaticResource {x:Type TreeViewItem}}" /> |
|||
</TreeViewItem.Resources> |
|||
|
|||
<TreeViewItem Header="Custom Content" Tag="{x:Type views:BusyIndicatorCustomContentView}" /> |
|||
<TreeViewItem Header="Custom Content Template" Tag="{x:Type views:BusyIndicatorCustomContentTemplateView}" /> |
|||
|
|||
</TreeViewItem> |
|||
@ -0,0 +1,16 @@ |
|||
using System; |
|||
using System.Windows.Controls; |
|||
|
|||
namespace Samples.Modules.BusyIndicator.NavigationItems |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for BusyIndicatorNavItem.xaml
|
|||
/// </summary>
|
|||
public partial class BusyIndicatorNavItem : TreeViewItem |
|||
{ |
|||
public BusyIndicatorNavItem() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"> |
|||
|
|||
<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> |
|||
|
|||
</ResourceDictionary> |
|||
@ -0,0 +1,63 @@ |
|||
<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> |
|||
|
|||
@ -0,0 +1,18 @@ |
|||
using System; |
|||
using Samples.Infrastructure.Controls; |
|||
using Microsoft.Practices.Prism.Regions; |
|||
|
|||
namespace Samples.Modules.BusyIndicator.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for BusyIndicatorCustomContentTemplateView.xaml
|
|||
/// </summary>
|
|||
[RegionMemberLifetime(KeepAlive=false)] |
|||
public partial class BusyIndicatorCustomContentTemplateView : DemoView |
|||
{ |
|||
public BusyIndicatorCustomContentTemplateView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
<infControls:DemoView x:Class="Samples.Modules.BusyIndicator.Views.BusyIndicatorCustomContentView" |
|||
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 define your own custom content. This is done by setting the BusyContent property." |
|||
TextWrapping="Wrap" /> |
|||
|
|||
<StackPanel Grid.Row="1" Margin="10"> |
|||
<TextBlock Text="Custom Content:" Style="{StaticResource Header}" /> |
|||
<extToolkit:BusyIndicator IsBusy="True"> |
|||
<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> |
|||
</StackPanel> |
|||
</Grid> |
|||
</infControls:DemoView> |
|||
@ -0,0 +1,18 @@ |
|||
using System; |
|||
using Samples.Infrastructure.Controls; |
|||
using Microsoft.Practices.Prism.Regions; |
|||
|
|||
namespace Samples.Modules.BusyIndicator.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for BusyIndicatorCustomContentView.xaml
|
|||
/// </summary>
|
|||
[RegionMemberLifetime(KeepAlive=false)] |
|||
public partial class BusyIndicatorCustomContentView : DemoView |
|||
{ |
|||
public BusyIndicatorCustomContentView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,59 @@ |
|||
<infControls:DemoView x:Class="Samples.Modules.BusyIndicator.Views.BusyIndicatorView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:Samples.Modules.BusyIndicator.Views" |
|||
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> |
|||
<local:IntegerToTimespanConverter x:Key="TimeSpanConverter" /> |
|||
</ResourceDictionary> |
|||
</infControls:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
|
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
|
|||
<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" /> |
|||
|
|||
<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="Usage:" Style="{StaticResource Header}" /> |
|||
<extToolkit:BusyIndicator IsBusy="{Binding IsChecked, ElementName=_isBusy}" DisplayAfter="{Binding Value, ElementName=_displayAfter, Converter={StaticResource TimeSpanConverter}}" > |
|||
<ContentControl ContentTemplate="{StaticResource SampleContent}" /> |
|||
</extToolkit:BusyIndicator> |
|||
</StackPanel> |
|||
</Grid> |
|||
</infControls:DemoView> |
|||
@ -1,142 +0,0 @@ |
|||
<infControls:DemoView x:Class="Samples.Modules.BusyIndicator.HomeView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
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:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" |
|||
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.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
|
|||
<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" /> |
|||
|
|||
<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> |
|||
</infControls:DemoView> |
|||
@ -1,12 +0,0 @@ |
|||
<TreeViewItem x:Class="Samples.Modules.BusyIndicator.NavigationView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:views="clr-namespace:Samples.Modules.BusyIndicator" |
|||
Header="BusyIndicator" |
|||
Tag="{x:Type views:HomeView}"> |
|||
|
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="views:NavigationView" BasedOn="{StaticResource {x:Type TreeViewItem}}" /> |
|||
</TreeViewItem.Resources> |
|||
|
|||
</TreeViewItem> |
|||
@ -1,27 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Navigation; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace Samples.Modules.BusyIndicator |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for NavigationView.xaml
|
|||
/// </summary>
|
|||
public partial class NavigationView : TreeViewItem |
|||
{ |
|||
public NavigationView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
<TreeViewItem x:Class="Samples.Modules.Button.NavigationItems.ButtonSpinnerNavItem" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:navItems="clr-namespace:Samples.Modules.Button.NavigationItems" |
|||
xmlns:views="clr-namespace:Samples.Modules.Button.Views" |
|||
Header="ButtonSpinner" Tag="{x:Type views:ButtonSpinnerView}" > |
|||
|
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="navItems:ButtonSpinnerNavItem" BasedOn="{StaticResource {x:Type TreeViewItem}}" /> |
|||
</TreeViewItem.Resources> |
|||
|
|||
</TreeViewItem> |
|||
@ -0,0 +1,16 @@ |
|||
using System; |
|||
using System.Windows.Controls; |
|||
|
|||
namespace Samples.Modules.Button.NavigationItems |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for ButtonSpinnerNavItem.xaml
|
|||
/// </summary>
|
|||
public partial class ButtonSpinnerNavItem : TreeViewItem |
|||
{ |
|||
public ButtonSpinnerNavItem() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
<TreeViewItem x:Class="Samples.Modules.Button.NavigationItems.DropDownButtonNavItem" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:navItems="clr-namespace:Samples.Modules.Button.NavigationItems" |
|||
xmlns:views="clr-namespace:Samples.Modules.Button.Views" |
|||
Header="DropDownButton" Tag="{x:Type views:DropDownButtonView}"> |
|||
|
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="navItems:DropDownButtonNavItem" BasedOn="{StaticResource {x:Type TreeViewItem}}" /> |
|||
</TreeViewItem.Resources> |
|||
|
|||
</TreeViewItem> |
|||
@ -0,0 +1,16 @@ |
|||
using System; |
|||
using System.Windows.Controls; |
|||
|
|||
namespace Samples.Modules.Button.NavigationItems |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for DropDownButtonNavItem.xaml
|
|||
/// </summary>
|
|||
public partial class DropDownButtonNavItem : TreeViewItem |
|||
{ |
|||
public DropDownButtonNavItem() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
<TreeViewItem x:Class="Samples.Modules.Button.NavigationItems.SplitButtonNavItem" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:navItems="clr-namespace:Samples.Modules.Button.NavigationItems" |
|||
xmlns:views="clr-namespace:Samples.Modules.Button.Views" |
|||
Header="SplitButton" Tag="{x:Type views:SplitButtonView}"> |
|||
|
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="navItems:SplitButtonNavItem" BasedOn="{StaticResource {x:Type TreeViewItem}}" /> |
|||
</TreeViewItem.Resources> |
|||
|
|||
</TreeViewItem> |
|||
@ -0,0 +1,16 @@ |
|||
using System; |
|||
using System.Windows.Controls; |
|||
|
|||
namespace Samples.Modules.Button.NavigationItems |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for SplitButtonNavItem.xaml
|
|||
/// </summary>
|
|||
public partial class SplitButtonNavItem : TreeViewItem |
|||
{ |
|||
public SplitButtonNavItem() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,9 +1,49 @@ |
|||
<infControls:DemoView x:Class="Samples.Modules.Button.Views.ButtonSpinnerView" |
|||
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="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="ButtonSpinner"> |
|||
<Grid> |
|||
<TextBlock Text="ButtonSpinner View" /> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element. The Spin event lets the developer know which direction the buttons are spinning; SpinDirection.Increase indicates an increment, SpinDirection.Decrease indicates a decrement." |
|||
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="AllowSpin:" VerticalAlignment="Center" /> |
|||
<CheckBox x:Name="_allowSpin" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="When true allows the ButtonSpinner to perform increment/decrement operations."/> |
|||
|
|||
<TextBlock Text="ShowButtonSpinner:" VerticalAlignment="Center" Grid.Row="1" /> |
|||
<CheckBox x:Name="_showButtonSpinner" Grid.Row="1" Grid.Column="1" IsChecked="True" VerticalAlignment="Center" Margin="5" ToolTip="Gets/Sets the visibility of the button spinners."/> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="2" Margin="10"> |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}" /> |
|||
<TextBlock Text="You can wrap any element by placing it inside the content area of the ButtonSpinner control. As an example, lets create our own simple numeric up/down control" |
|||
TextWrapping="Wrap"/> |
|||
|
|||
<extToolkit:ButtonSpinner Margin="10" Width="150" HorizontalAlignment="Left" |
|||
AllowSpin="{Binding IsChecked, ElementName=_allowSpin}" |
|||
ShowButtonSpinner="{Binding IsChecked, ElementName=_showButtonSpinner}" |
|||
Spin="ButtonSpinner_Spin" > |
|||
<TextBox Text="0" HorizontalContentAlignment="Right" /> |
|||
</extToolkit:ButtonSpinner> |
|||
</StackPanel> |
|||
</Grid> |
|||
</infControls:DemoView> |
|||
|
|||
@ -0,0 +1,51 @@ |
|||
<infControls:DemoView x:Class="Samples.Modules.Button.Views.DropDownButtonView" |
|||
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:infConverters="clr-namespace:Microsoft.Windows.Controls.Core.Converters;assembly=WPFToolkit.Extended" |
|||
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" |
|||
Title="DropDownButton" > |
|||
<infControls:DemoView.Resources> |
|||
<infConverters:InverseBoolConverter x:Key="InverseBoolConverter" /> |
|||
</infControls:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="The DropDownButton control is a button that when clicked displays a drop down in which you can place any custom content within." |
|||
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="IsOpen: " VerticalAlignment="Center" /> |
|||
<CheckBox x:Name="_isOpen" Grid.Column="1" IsChecked="False" VerticalAlignment="Center" Margin="5" ClickMode="Press" ToolTip="Get/Sets a value indicating whether or not the drop down is open." /> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<StackPanel Grid.Row="2" Margin="10"> |
|||
<TextBlock Text="Usage:" Style="{StaticResource Header}" /> |
|||
<extToolkit:DropDownButton x:Name="_dropDownButton" Margin="10" Width="150" HorizontalAlignment="Left" Content="Click Me" IsOpen="{Binding IsChecked, ElementName=_isOpen, Mode=TwoWay}" |
|||
Click="DropDownButton_Click"> |
|||
<extToolkit:DropDownButton.DropDownContent> |
|||
<StackPanel> |
|||
<extToolkit:ColorCanvas /> |
|||
<Button Click="Button_Click" Margin="10">OK</Button> |
|||
</StackPanel> |
|||
</extToolkit:DropDownButton.DropDownContent> |
|||
</extToolkit:DropDownButton> |
|||
</StackPanel> |
|||
</Grid> |
|||
</infControls:DemoView> |
|||
@ -0,0 +1,28 @@ |
|||
using System; |
|||
using Samples.Infrastructure.Controls; |
|||
using Microsoft.Practices.Prism.Regions; |
|||
|
|||
namespace Samples.Modules.Button.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for DropDownButtonView.xaml
|
|||
/// </summary>
|
|||
[RegionMemberLifetime(KeepAlive = false)] |
|||
public partial class DropDownButtonView : DemoView |
|||
{ |
|||
public DropDownButtonView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void DropDownButton_Click(object sender, System.Windows.RoutedEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void Button_Click(object sender, System.Windows.RoutedEventArgs e) |
|||
{ |
|||
_dropDownButton.IsOpen = false; |
|||
} |
|||
} |
|||
} |
|||
@ -1,9 +0,0 @@ |
|||
<infControls:DemoView x:Class="Samples.Modules.Button.Views.HomeView" |
|||
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" |
|||
Title="Button Controls"> |
|||
<Grid> |
|||
|
|||
</Grid> |
|||
</infControls:DemoView> |
|||
@ -1,18 +0,0 @@ |
|||
using System; |
|||
using Samples.Infrastructure.Controls; |
|||
using Microsoft.Practices.Prism.Regions; |
|||
|
|||
namespace Samples.Modules.Button.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for HomeView.xaml
|
|||
/// </summary>
|
|||
[RegionMemberLifetime(KeepAlive = false)] |
|||
public partial class HomeView : DemoView |
|||
{ |
|||
public HomeView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
<TreeViewItem x:Class="Samples.Modules.Button.Views.NavigationView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:views="clr-namespace:Samples.Modules.Button.Views" |
|||
Header="Button Controls" Tag="{x:Type views:HomeView}"> |
|||
|
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="views:NavigationView" BasedOn="{StaticResource {x:Type TreeViewItem}}" /> |
|||
</TreeViewItem.Resources> |
|||
|
|||
<TreeViewItem Header="ButtonSpinner" Tag="{x:Type views:ButtonSpinnerView}"/> |
|||
<TreeViewItem Header="DropDownButton" /> |
|||
<TreeViewItem Header="SplitButton" Tag="{x:Type views:SplitButtonView}"/> |
|||
|
|||
</TreeViewItem> |
|||
@ -1,16 +0,0 @@ |
|||
using System; |
|||
using System.Windows.Controls; |
|||
|
|||
namespace Samples.Modules.Button.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for NavigationView.xaml
|
|||
/// </summary>
|
|||
public partial class NavigationView : TreeViewItem |
|||
{ |
|||
public NavigationView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue