Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
empty Contextmenu on Nodes shows smal box
posted

Hi,

maybe someone can help me... I have a XamDataTree with an custom NodeLayout.ItemTemplate, including StackPanel with TextBlock and a Contextmenu on the Stackpanel. The Contextmenu is bind to an ObservableCollection in my View. Sometimes it can happen that the collection is empty, for this reason i included an style:

<ContextMenu.Style>
    <Style TargetType="{x:Type ContextMenu}">
        <Style.Triggers>
            <Trigger Property="HasItems" Value="False">
                <Setter Property="Visibility" Value="Collapsed" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ContextMenu.Style>

Works fine!

But after collapse and expand one of the parent nodes, some empty white boxes appears.

On the left side its a normal TreeView, with the same style => no problems

On the right side the XamDataTree, after right clicking some nodes and the collapse and expand.

I'm using Infragistics WPF 2015.1

Sample Application is attached.

DataTreeContextMenu.zip