Home Forums WPF controls Xceed Toolkit Plus for WPF Alt key adornments don’t work in AvalonDock

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #41712 |

    I’m trying to use AvalonDock, and for even simple samples, I’m not able to get alt key adornments to work. 

    For example, I built a very simple test application which loads a couple of documents of type Item, where Itemis a simple class with a Name property:

    <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.

    Is this a bug, and if so is there a workaround?  Thanks! 

    Imported from legacy forums. Posted by David (had 1350 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi David,

    This bug will be fixed in v2.3.

    In the meantime, you can go in the file representing the style you are using for AvalonDock.

      Go in File “Xceed.Wpf.AvalonDock.Themes/generic.xaml”
      In the Style targeting “avalonDockControls:LayoutDocumentControl”

      Replace the ContentPresenter as follows:

      <ContentPresenter Content=”{Binding LayoutItem.View.Content,
                                                  RelativeSource={RelativeSource TemplatedParent}}”
                                  ContentTemplate=”{Binding LayoutItem.View.ContentTemplate,
                                                               RelativeSource={RelativeSource TemplatedParent}}”
                                  ContentTemplateSelector=”{Binding LayoutItem.View.ContentTemplateSelector,
                                                                           RelativeSource={RelativeSource TemplatedParent}}” />

    Imported from legacy forums. Posted by Diane [Xceed] (had 416 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi David,

    This is to inform you that this issue is now fixed in the latest version, which you can download in our Updates section here:
    http://xceed.com/updates

    “In AvalonDock, users can use the Alt key adornments inside the AvalonDock DockingManager. E.g., to set an underline under the first letter of the content of a button.”

    Imported from legacy forums. Posted by Diane [Xceed] (had 733 views)

    Anton Herzog
    Participant
    Post count: 1

    I’m having the same problem as the original poster.
    I’m currently working with version 3.4.17280.14430. The alt-key adornments do not work as expected when I recreate the example above. I looked into the generic.xaml and the ContentPresenter is configured as suggested.
    From my POV the issue is not fixed in the current version.
    This is an important feature for us. Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.