I'm developing a program on Microsoft Surface.
And I didn't succeed to ma开发者_运维技巧ke disable completely the shadow. Here is my problem :
http://i61.servimg.com/u/f61/11/31/25/01/sans_t10.png
Heres is the XAML code :
<s:ScatterViewItem Height="130" x:Name="jetons1" Width="180" CanScale="False"
BorderThickness="0" ShowsActivationEffects="False" StaysActive="True"
SnapsToDevicePixels="True" Foreground="{x:Null}" Background="{x:Null}"
BorderBrush="{x:Null}" />
Assuming that item is your ScatterViewItem:
item.ApplyTemplate();
item.Background = new SolidColorBrush(Colors.Transparent);
item.ShowsActivationEffects = false;
Microsoft.Surface.Presentation.Generic.SurfaceShadowChrome ssc;
ssc = item.Template.FindName("shadow", item) as Microsoft.Surface.Presentation.Generic.SurfaceShadowChrome;
ssc.Visibility = Visibility.Hidden;
You can do it. Use Expression Blend to extract template and remove the control named x:name="Shadow". You could do this as well in code-behind. As a Microsoft Surface developer you have access to the community (I think now it's free for all), both solutions were posted.
精彩评论