I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last month or so, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:
这个问题特别有趣的是,它似乎是由环境设置或条件触发的。
正如本中所演示的video(2:07),alt 键装饰适用于 AvalonDock 内的控件。但是,如果我现在使用与该视频中使用的完全相同的可执行文件,则 alt 键装饰不起作用。
我目前使用的是 build 2.0.1746,但我也尝试了 build 2.0.2000(使用 Xceed 命名空间)并发现了同样的问题。我也尝试了附带的版本Xceed 扩展 WPF 工具包,发现问题依然存在。
我还构建了一个非常简单的测试应用程序,它加载几个类型的文档Item
, where Item
是一个简单的类Name
财产:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
Even with this simple application, the Alt key adornments show up for the Test
button outside of AvalonDock, but not for the ClickMe
buttons for the controls within AvalonDock.
我也发布了这个问题here在 AvalonDock codeplex 站点上,但响应活动似乎很少。我也发布了这个问题here在扩展工具包 codeplex 网站上。
关于如何纠正或解决此问题有什么想法吗?