-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blur offset when using SizeToContent="WidthAndHeight" in AcrylicWindow #56
Comments
Hi @BeautyRazor @Barina Thanks for the feedback. But it is little a bit difficult to fix. |
This is famous bug in WPF. <Window x:Class="WpfApp1.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"
mc:Ignorable="d"
SizeToContent="WidthAndHeight"
Title="MainWindow">
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="-1"/>
</WindowChrome.WindowChrome>
<Grid Background="Beige" Width="300" Height="200">
<TextBlock Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Text="TextBlock"
TextWrapping="Wrap" />
</Grid>
</Window> But I found a workaround for it. protected override void OnContentRendered(EventArgs e)
{
base.OnContentRendered(e);
if (this.SizeToContent != SizeToContent.Manual)
{
this.InvalidateMeasure();
}
} In addition, it can be emmbeded in AcrylicWindow's implement. |
The text was updated successfully, but these errors were encountered: