Note that there are some explanatory texts on larger screens.

plurals
  1. POWindow out of the screen when maximized using WPF shell integration library
    primarykey
    data
    text
    <p>I'm using the <a href="http://code.msdn.microsoft.com/WPFShell" rel="noreferrer">WPF Shell Integration Library</a> to create a custom chrome of my wpf app. All is good, but when maximizing the app, 6 or 7 pixels are out of the screen.</p> <p>This is the code I'm using:</p> <pre><code>&lt;Style TargetType="{x:Type local:MainWindow}"&gt; &lt;Setter Property="shell:WindowChrome.WindowChrome"&gt; &lt;Setter.Value&gt; &lt;shell:WindowChrome ResizeBorderThickness="6" CaptionHeight="10" CornerRadius="0" GlassFrameThickness="1"/&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type local:MainWindow}"&gt; &lt;Grid&gt; &lt;Border BorderThickness="1" BorderBrush="#389FD1" Background="#389FD1"&gt; &lt;ContentPresenter Margin="0,22,0,0" Content="{TemplateBinding Content}"/&gt; &lt;/Border&gt; &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" &gt; &lt;TextBlock Text="{Binding NombreUsuario}" Foreground="White" Margin="5,5,20,5" Opacity=".8" /&gt; &lt;Button Style="{StaticResource ImageButton}" Height="20" Width="20" Margin="0" Click="WindowMinimize" shell:WindowChrome.IsHitTestVisibleInChrome="True"&gt; &lt;Image Height="10" Width="10" Source="/Resources/Images/minimize.png" /&gt; &lt;/Button&gt; &lt;Button Style="{StaticResource ImageButton}" Height="20" Width="20" Margin="0" Click="WindowMaximizeRestore" shell:WindowChrome.IsHitTestVisibleInChrome="True" &gt; &lt;Image Height="10" Width="10" Source="/Resources/Images/maximize.png" /&gt; &lt;/Button&gt; &lt;Button Style="{StaticResource ImageButton}" Height="20" Width="20" Margin="0" Click="WindowClose" shell:WindowChrome.IsHitTestVisibleInChrome="True"&gt; &lt;Image Height="10" Width="10" Source="/Resources/Images/close.png" /&gt; &lt;/Button&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload