Drop shadow causes clipping when saved to XPS
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 3.0
* Windows version: Win 10 1903 (18362.239)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio: No
**Problem description:**
I have a textblock with the built-in drop shadow effect. If the textblock is within a viewbox and the width and height of the window is around the size of the viewbox then the text is clipped when you save to XPS
**Actual behavior:**
Clipped XPS document
**Expected behavior:**
XPS document which represents the WPF visual
**Minimal repro:**
Xaml Window
`
`
Window Code behind
`public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void MainWindow_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
var sfd = new SaveFileDialog { Filter = "XPS files (*.xps)|*.xps" };
if (sfd.ShowDialog() != true) return;
var c = Canv;
var doc = new XpsDocument(sfd.FileName, FileAccess.ReadWrite);
var writer = XpsDocument.CreateXpsDocumentWriter(doc);
writer.Write(c);
doc.Close();
}
}`
Contributor guide
Assessment
This issue has not been assessed yet.