Reputation: 11
I am developing an application on Microsoft Surface. I add programmatically many PNG images as ScatterViewItems. Even though I set the item to be transparent, it shows a shadow.
How do I remove the shadow in C#? (not in XAML).
Thank you in advance,
Upvotes: 1
Views: 896
Reputation: 1
using dll Microsoft.Surface.Presentation.Generic
svi.ApplyTemplate(); //must
svi.ShowsActivationEffects = false;
Microsoft.Surface.Presentation.Generic.SurfaceShadowChrome ssc
= svi.Template.FindName("shadow", svi) as
Microsoft.Surface.Presentation.Generic.SurfaceShadowChrome;
if(ssc!=null)
ssc.Visibility = Visibility.Collapsed;
Upvotes: 0
Reputation: 29083
svi.Background = null;
svi.BorderThickness = new Thickness(0);
svi.ShowsActivationEffects = false;
SurfaceShadowChrome ssc = svi.Template.FindName("shadow", svi) as SurfaceShadowChrome;
ssc.Visibility = Visibility.Collapsed;
Upvotes: 2