wenxiangchao
3 天以前 b544d5cccd76735e034c8055918a50927b437474
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:local="clr-namespace:HMI.Base"
                    xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI">
    <Style TargetType="local:SimpleMaskControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:SimpleMaskControl">
                    <Grid Background="{TemplateBinding Background}">
                        <ContentPresenter Content="{TemplateBinding Content}"/>
 
                        <ui:MaskControl x:Name="mask"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
 
    <Style TargetType="local:PluginMaskControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:PluginMaskControl">
                    <Grid>
                        <ContentPresenter Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"/>
                        <ui:MaskControl x:Name="mask"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>