Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions RadialActions/Pie/PieVisualBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,23 @@ public static void AddSurfaceRing(
SnapsToDevicePixels = true,
};

UIElement surfaceElement = surfacePath;

if (!isHighContrast && ambientShadowEffect != null)
{
surfacePath.Effect = ambientShadowEffect.CloneCurrentValue();

// Wrap in a cached container so the expensive shadow blur is baked into a bitmap once instead of being re-evaluated on every animation frame.
surfaceElement = new Border
{
Child = surfacePath,
IsHitTestVisible = false,
CacheMode = new BitmapCache(VisualTreeHelper.GetDpi(canvas).PixelsPerDip),
};
}

Panel.SetZIndex(surfacePath, 0);
canvas.Children.Add(surfacePath);
Panel.SetZIndex(surfaceElement, 0);
canvas.Children.Add(surfaceElement);
}

public static CenterElements CreateCenterElements(
Expand Down