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
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 x:Class="XpsDropShadowCore.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:XpsDropShadowCore" mc:Ignorable="d" Title="MainWindow" Height="340" Width="600" MouseDoubleClick="MainWindow_OnMouseDoubleClick"> <Canvas Name="Canv"> <Viewbox StretchDirection="DownOnly" Width="580" Height="300" > <TextBlock FontSize="400" Foreground="BlueViolet" Text="Hello" > <TextBlock.Effect> <DropShadowEffect ShadowDepth="30"></DropShadowEffect> </TextBlock.Effect> </TextBlock> </Viewbox> </Canvas> </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(); } }
The text was updated successfully, but these errors were encountered:
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 x:Class="XpsDropShadowCore.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:XpsDropShadowCore" mc:Ignorable="d" Title="MainWindow" Height="340" Width="600" MouseDoubleClick="MainWindow_OnMouseDoubleClick"> <Canvas Name="Canv"> <Viewbox StretchDirection="DownOnly" Width="580" Height="300" > <TextBlock FontSize="400" Foreground="BlueViolet" Text="Hello" > <TextBlock.Effect> <DropShadowEffect ShadowDepth="30"></DropShadowEffect> </TextBlock.Effect> </TextBlock> </Viewbox> </Canvas> </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(); } }
The text was updated successfully, but these errors were encountered: