diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2018-06-15 23:18:51 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2018-06-15 23:18:51 +0300 |
| commit | f0bcdcdbfa78ba705b8fa44591fa594a425352a9 (patch) | |
| tree | d5476a7259fc5d6061d819ae5f1df5b78c904856 /Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml | |
| parent | 84700eb44cffe4b503a9ad22b1dfa8c703f356d2 (diff) | |
| download | Tango-f0bcdcdbfa78ba705b8fa44591fa594a425352a9.tar.gz Tango-f0bcdcdbfa78ba705b8fa44591fa594a425352a9.zip | |
Implemented TouchLoadingPanel
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml new file mode 100644 index 000000000..d4c0c3d80 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchLoadingPanel.xaml @@ -0,0 +1,59 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Touch.Controls"> + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="../Resources/Colors.xaml" /> + </ResourceDictionary.MergedDictionaries> + + <Style TargetType="{x:Type local:TouchLoadingPanel}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:TouchLoadingPanel}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + + <Grid> + <ContentPresenter Content="{TemplateBinding Content}" /> + + <Grid Background="#66FFFFFF"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="IsHitTestVisible" Value="False"></Setter> + <Setter Property="Opacity" Value="0"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=local:TouchLoadingPanel},Path=IsLoading}" Value="True"> + <Setter Property="IsHitTestVisible" Value="False"></Setter> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.2"></DoubleAnimation> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.1"></DoubleAnimation> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> + <local:TouchBusyIndicator Foreground="{TemplateBinding Foreground}" IsIndeterminate="True" Width="100" Height="100" HorizontalAlignment="Center" /> + <TextBlock Margin="20" Text="{TemplateBinding LoadingMessage}" HorizontalAlignment="Center" /> + </StackPanel> + </Grid> + </Grid> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file |
