MultiSelectTreeView icon indicating copy to clipboard operation
MultiSelectTreeView copied to clipboard

Multiselecttreeview inside popup

Open madhankumar-g opened this issue 9 years ago • 1 comments

When I try to use this MultiSelectTreeView inside a popup, the popup closes on clicking on any item inside the MultSelectTreeViewItem. This behavior is not observed with WPF treeview, is there any quick fix for this?

Sample code to repro:

<StackPanel>
    <ToggleButton x:Name="toggleButton" Content="Open/Close Popup" 
                  Width="50" VerticalAlignment="Center"
                  HorizontalAlignment="Center"/>
    <Popup IsOpen="{Binding IsChecked, ElementName=toggleButton}"
           StaysOpen="False" PlacementTarget="{Binding ElementName=toggleButton}"
           Placement="Right">
        <mstv:MultiSelectTreeView>
            <mstv:MultiSelectTreeViewItem Header="1">
                <mstv:MultiSelectTreeViewItem Header="a" />
                <mstv:MultiSelectTreeViewItem Header="b" />
                <mstv:MultiSelectTreeViewItem Header="c" />
            </mstv:MultiSelectTreeViewItem>
            <mstv:MultiSelectTreeViewItem Header="2"/>
        </mstv:MultiSelectTreeView>
    </Popup>
</StackPanel>

madhankumar-g avatar Sep 17 '16 17:09 madhankumar-g

I have read and understood your report but didn't get to try and reproduce it yet. I'm not working that much with popups so I can't provide any solution without trying it. I'm sorry it can still take a while until I can take a look at this.

In the meantime you might want to take a look at SharpTreeView which supports more features than MultiSelectTreeView.

ygoe avatar Sep 28 '16 11:09 ygoe