aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml
blob: 9cc398753521f7b8dee13a67f9adddde5cde25bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
    xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
    xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls">

    <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />

    <Style TargetType="{x:Type local:LoadingPanel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:LoadingPanel}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">

                        <Grid>
                            <ContentPresenter Content="{TemplateBinding Content}" />

                            <Grid Background="#60FFFFFF" Visibility="{TemplateBinding IsLoading,Converter={StaticResource BooleanToVisibilityConverter}}">
                                <mahApps:ProgressRing IsActive="{TemplateBinding IsLoading}" />
                            </Grid>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>