I am new to Avalon Dock. I created a LayoutAnchorable in LayoutAnchorablePane, but found there is an unnamed imaged created next to title textblock. It is not visible and focusable, but could be found in Accessibility Insights.
I am guessing it is converted from IconSource of LayoutAnchorable. However, when I changed the IconSource, the image didn't change.
Could someone tell me how to remove or hide this image from UI Automation Tree please? Or at least how to set a border for it (Currently Accessibility Insights keeps saying the image should not have null BoundingRectangle property)?
UI Automation Tree: UI Automation Tree
How found: Selected from tree...
Name: ""
ControlType: UIA_ImageControlTypeId (0xC356)
LocalizedControlType: "image"
IsEnabled: true
IsOffscreen: false
IsKeyboardFocusable: false
HasKeyboardFocus: false
AcceleratorKey: ""
AccessKey: ""
ProcessId: 17588
RuntimeId: [7.44B4.1486734]
AutomationId: "icon"
FrameworkId: "WPF"
ClassName: "Image"
IsControlElement: true
IsContentElement: true
Related Code:
<adl:LayoutAnchorablePane DockHeight="300" DockWidth="500">
<adl:LayoutAnchorable Title="Experiments" ContentId="ExperimentsPane" AutoHideHeight="300" AutoHideWidth="1000" FloatingHeight="300" FloatingWidth="1000" Closing="Closing">
<acPanes:Experiments x:Name="_ctlExperimentsPane" />
</adl:LayoutAnchorable>
</adl:LayoutAnchorablePane
<ad:DockingManager.AnchorableTitleTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Title}" VerticalAlignment="Center" Foreground="{DynamicResource DefaultTextColor}" />
</DataTemplate>
</ad:DockingManager.AnchorableTitleTemplate>
Do you mind to show some screenshot picture of your anchorable header for better understanding? I copy your code and it works just fine on my side.
Other than that, maybe you can try to remove most of your data binding. Start from hardcoding the header's title and content, then add the databinding one by one (start to monitoring all the changes when you add the databinding one by one). I think the issue comes from your databinding.