APP.XAML 里定义Style,便与其他XAML文件共享引用。

<Application.Resources>

<DropShadowEffect x:Name="EffectStyle" BlurRadius="6" Color="Gray" Direction="-45" Opacity="0.6" ShadowDepth="6">
        </DropShadowEffect>

</Application.Resources>

 

在XAML中类似下面引用

<StackPanel Effect="{StaticResource EffectStyle}">

</StackPanel >

<Border Effect="{StaticResource EffectStyle}">

</Border>

<data:Data GridEffect="{StaticResource EffectStyle}">

</data:DataGrid>

posted on 2009-11-24 11:50  Go!17Enjoy8!  阅读(211)  评论(1)    收藏  举报