Created
June 26, 2013 12:04
-
-
Save damianh/5866882 to your computer and use it in GitHub Desktop.
The XAML in http://msdn.microsoft.com/en-us/library/system.windows.shell.windowchrome.aspx is copied from the Microsoft.Windows.Shell project but hasn't been updated to reflect the new namespace in .net 4.5. This is the correct XAML.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Style TargetType="{x:Type local:MainWindow}"> | |
| <Setter Property="WindowChrome.WindowChrome"> | |
| <Setter.Value> | |
| <WindowChrome /> | |
| </Setter.Value> | |
| </Setter> | |
| <Setter Property="Template"> | |
| <Setter.Value> | |
| <ControlTemplate TargetType="{x:Type local:MainWindow}"> | |
| <Grid> | |
| <Border Background="White" | |
| Margin="{Binding Source={x:Static SystemParameters.WindowNonClientFrameThickness}}"> | |
| <ContentPresenter Content="{TemplateBinding Content}" /> | |
| </Border> | |
| <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" | |
| VerticalAlignment="Top" | |
| HorizontalAlignment="Left" | |
| Margin="36,8,0,0" /> | |
| <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Icon}" | |
| VerticalAlignment="Top" HorizontalAlignment="Left" | |
| Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(WindowChrome.WindowChrome).ResizeBorderThickness}" | |
| Width="{Binding Source={x:Static SystemParameters.SmallIconWidth }}" | |
| WindowChrome.IsHitTestVisibleInChrome="True" /> | |
| </Grid> | |
| </ControlTemplate> | |
| </Setter.Value> | |
| </Setter> | |
| </Style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment