window.xaml

来自「工作流相关资料及源码,包含NETBPM,非常具有参考价值.」· XAML 代码 · 共 37 行

XAML
37
字号
<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Shared.xaml" />
    <ResourceDictionary Source="ResizeGrip.xaml" />
  </ResourceDictionary.MergedDictionaries>

<!--<SnippetWindow>-->
  <Style x:Key="{x:Type Window}" TargetType="{x:Type Window}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Window}">
          <Grid Background="{StaticResource WindowBackgroundBrush}">
            <AdornerDecorator>
              <ContentPresenter/>
            </AdornerDecorator>
            <ResizeGrip x:Name="WindowResizeGrip"
              HorizontalAlignment="Right"
              VerticalAlignment="Bottom"
              Visibility="Collapsed" 
              IsTabStop="false"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
              <Setter TargetName="WindowResizeGrip" Property="Visibility" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
<!--</SnippetWindow>-->
</ResourceDictionary>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?