You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I am deprecating the old DropShadowPanel in favor of the the AttachedDropShadow Effect.
Only, I am doing it in C# code, not XAML, as my users can place shapes on a canvas arbitrarily. So I do not have a pre-designed XAML element to attach the DropShadow to...
Running this code does not produce a shadow.:
public static void InitShadow(FrameworkElement e, float blurRadius, float opacity, Vector3 offset, Windows.UI.Color color)
{
if (e != null)
{
AttachedDropShadow shadow = new AttachedDropShadow()
{
Opacity = opacity,
BlurRadius = blurRadius,
Offset = offset.ToString(),
Color = color,
IsMasked = true
};
e.SetValue(Effects.ShadowProperty, shadow);
}
}
The shapes can be irregular (e.g. a partially transparent bitmap) so that DropShadow needs to be able to deal with that...
When this code is run, the shape is already attached to and positioned on a Canvas.
Any way you could expand the XAML-only documentation for us struggling C# folks?
The text was updated successfully, but these errors were encountered:
So I am deprecating the old DropShadowPanel in favor of the the AttachedDropShadow Effect.
Only, I am doing it in C# code, not XAML, as my users can place shapes on a canvas arbitrarily. So I do not have a pre-designed XAML element to attach the DropShadow to...
Running this code does not produce a shadow.:
The shapes can be irregular (e.g. a partially transparent bitmap) so that DropShadow needs to be able to deal with that...
When this code is run, the shape is already attached to and positioned on a Canvas.
Any way you could expand the XAML-only documentation for us struggling C# folks?
The text was updated successfully, but these errors were encountered: