由于对于部分术语缺乏足够的认识,因此翻译可能不准确。
已完成的DWM
这个Build,跟Build 4088一样,包含了一个新实现方式的DWM(桌面窗口管理器),使用.NET托管代码重新编写。它可以在C:\build\filerepository\windowmanager_a2ea4897文件夹中被找到,文件名称是WindowManager.exe。放置在这个文件夹里意味着它可以使用cm工具安装进系统,但是这会失败,因为桌面窗口管理器服务的注册文件没有被包含。查看Windows Aero页面来了解开启方法。
如要启用DWM,请创建C:\build\filerepository\windowmanager_a2ea4897\DwmDsk.xaml,并写入以下内容:
<?Mapping XmlNamespace="mscorlib_System" ClrNamespace="System" Assembly="mscorlib" ?>
<?Mapping XmlNamespace="windowmanager.WindowLayouts" ClrNamespace="WindowLayouts" Assembly="WindowManager" ?>
<Canvas xmlns="http://schemas.microsoft.com/2003/xaml/" xmlns:wl="windowmanager.WindowLayouts" xmlns:System="mscorlib_System" xmlns:def="Definition" Width="800" Height="600" Background="#80FF0000">
<Canvas.Resources>
<Style def:Name="ItemsControlStyle">
<ItemsControl/>
<Style.VisualTree>
<FlowPanel Width="400" Height="600" ItemsControl.IsItemsHost="true" Background="#8000ff00"/>
</Style.VisualTree>
</Style>
<Style def:Name="ItemsControlStyle2">
<ItemsControl/>
<Style.VisualTree>
<wl:CascadePanel ID="myCascadePanel" ItemsControl.IsItemsHost="true"/>
</Style.VisualTree>
</Style>
</Canvas.Resources>
<wl:CascadeItemsControl ID="DesktopView" Background="#ccffffff" Style="{ItemsControlStyle2}">
<CollectionContainer Collection="*Bind()"/>
</wl:CascadeItemsControl>
<ItemsControl ID="TaskBarIconView" Width="400" Height="600" Background="#40334455">
<CollectionContainer Collection="*Bind()"/>
</ItemsControl>
</Canvas>
创建C:\build\filerepository\windowmanager_a2ea4897\DwmWin.xaml,并写入以下内容:
<?Mapping XmlNamespace="mscorlib_System" ClrNamespace="System" Assembly="mscorlib" ?>
<?Mapping XmlNamespace="windowmanager.WindowLayouts" ClrNamespace="WindowLayouts" Assembly="WindowManager" ?>
<?Mapping XmlNamespace="explorer" ClrNamespace="MS.Internal.Desktop" Assembly="System.Windows.Explorer" ?>
<FlowPanel xmlns="http://schemas.microsoft.com/2003/xaml/" xmlns:wl="windowmanager.WindowLayouts" xmlns:System="mscorlib_System" xmlns:def="Definition" Width="800" Height="600" Background="#80FF0000">
<FlowPanel.Resources>
<Style def:Name="NonClientAreaStyleNone">
<wl:UserWindowChrome Width="*Bind(Path=Width)" Height="*Bind(Path=Height)"/>
<Style.VisualTree>
<Canvas ID="Region_WindowTransform">
<Image ID="ClientArea" Source="*Bind(Path=ClientArea)"/>
</Canvas>
</Style.VisualTree>
</Style>
<Style def:Name="NonClientAreaStyleBorder">
<wl:UserWindowChrome Background="#800000ff" Width="*Bind(Path=Width)" Height="*Bind(Path=Height)"/>
<Style.VisualTree>
<Canvas ID="Region_WindowTransform" Background="#800000ff">
<Image ID="ClientArea" Source="*Bind(Path=ClientArea)"/>
<Text TextContent="*Bind(Path=Title)"/>
</Canvas>
</Style.VisualTree>
</Style>
<Style def:Name="NonClientAreaStyleFrame">
<wl:UserWindowChrome Background="#8000ffff" Width="*Bind(Path=Width)" Height="*Bind(Path=Height)"/>
<Style.VisualTree>
<DockPanel ID="Region_WindowTransform">
<DockPanel DockPanel.Dock="Top">
<Canvas DockPanel.Dock="Right">
<fullexp:HackImage xmlns:fullexp="explorer" Margin="0,0,0,0" fullexp:HackSource="theme://CompositedWindow,SDB_BACK,SDBTB_NORMAL" fullexp:HackNineGrid="9,105,150,9" Width="100%" Height="100%"/>
<Grid Width="100%" Margin="0,6,0,0">
<ColumnDefinition Width="8"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="8"/>
<DockPanel ID="Region_Resize" Grid.Column="1" Background="#00000000">
<fullexp:HackImage xmlns:fullexp="explorer" fullexp:HackSource="theme://CompositedWindow,SDB_CLOCKGLASS,SDBTB_NORMAL" Width="20" Height="17" Background="#FFFF0000" DockPanel.Dock="Left"/>
<Text TextContent="*Bind(Path=Title)" DockPanel.Dock="Left" Margin="3,3,0,0"/>
</DockPanel>
</Grid>
<DockPanel DockPanel.Dock="Bottom" Margin="0,26,0,0">
<DockPanel DockPanel.Dock="Left" Margin="8,0,8,8">
<Image ID="ClientArea" Source="*Bind(Path=ClientArea)" DockPanel.Dock="Right"/>
</DockPanel>
</DockPanel>
<DockPanel Width="100%">
<fullexp:HackImage xmlns:fullexp="explorer" ID="FakeCloseButton" fullexp:HackSource="theme://CompositedWindow,SDB_EXPANDO_CLOSED_HORIZ,SDBTB_NORMAL" Width="43" Height="14" DockPanel.Dock="Right" Margin="0,1,6,0" fullexp:HackNineGrid="0,0,14,0"/>
<fullexp:HackImage xmlns:fullexp="explorer" ID="FakeMaximizeButton" fullexp:HackSource="theme://CompositedWindow,SDB_STARTBUTTON,SDBTB_NORMAL" Width="25" Height="14" DockPanel.Dock="Right" Margin="0,1,0,0" fullexp:HackNineGrid="0,0,14,0"/>
<fullexp:HackImage xmlns:fullexp="explorer" ID="FakeMinimizeButton" fullexp:HackSource="theme://CompositedWindow,SDB_TASKBACK,SDBTB_NORMAL" Width="27" Height="14" DockPanel.Dock="Right" Margin="0,1,0,0" fullexp:HackNineGrid="0,0,14,0"/>
</DockPanel>
<DockPanel Width="100%">
<Canvas ID="CloseButton" Width="43" Height="14" DockPanel.Dock="Right" Margin="0,1,6,0" Background="#00112233"/>
<Canvas ID="MaximizeButton" Width="25" Height="14" DockPanel.Dock="Right" Margin="0,1,0,0" Background="#00112233"/>
<Canvas ID="MinimizeButton" Width="27" Height="14" DockPanel.Dock="Right" Margin="0,1,0,0" Background="#00112233"/>
</DockPanel>
</Canvas>
</DockPanel>
</DockPanel>
</Style.VisualTree>
</Style>
<Style def:Name="NonClientAreaStyleFrameNonAero">
<wl:UserWindowChrome Background="#80ffff00" Width="*Bind(Path=Width)" Height="*Bind(Path=Height)"/>
<Style.VisualTree>
<DockPanel ID="Region_WindowTransform" Background="#80ffff00">
<Canvas DockPanel.Dock="Top" ID="Region_Resize" Margin="6,6,6,0" Background="#00112233">
<DockPanel Width="100%">
<Canvas ID="CloseButton" Width="20" Height="20" Background="#FFFF0000" DockPanel.Dock="Right"/>
<Canvas ID="MaximizeButton" Width="20" Height="20" Background="#FF00FF00" DockPanel.Dock="Right"/>
<Canvas ID="MinimizeButton" Width="20" Height="20" Background="#FF0000FF" DockPanel.Dock="Right"/>
<Text TextContent="*Bind(Path=Title)" DockPanel.Dock="Left"/>
</DockPanel>
</Canvas>
<DockPanel DockPanel.Dock="Bottom" Margin="0,0,0,6">
<Canvas DockPanel.Dock="Right" Margin="6,0,6,0">
<Image ID="ClientArea" Source="*Bind(Path=ClientArea)"/>
</Canvas>
</DockPanel>
</DockPanel>
</Style.VisualTree>
</Style>
</FlowPanel.Resources>
</FlowPanel>
安装一个来自Build 4074的“Aero”主题(4093的Jade改成Aero是没有用的),然后启用,最后按下Win+R,输入C:\build\filerepository\windowmanager_a2ea4897\WindowManager.exe a
,即可启动4093的DWM。
此DWM还可以通过修补DWMWin.xaml来实现服务化运行。如果你不想使用4074的Aero主题,导入特定注册表,会有一个很简陋的新式窗框。如需更多信息请访问原链接:
原文:
Managed DWM
This build, like build 4088, includes a new implementation of the Desktop Window Manager, rewritten in .NET managed code. This can be found in the C:\build\filerepository\windowmanager_a2ea4897 folder, with the name WindowManager.exe. It is meant to be installed using the cm tool, but this will fail due to service registration not yet being implemented in the new managed DWM. See the Windows Aero page for instructions to enable.