Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complex itemspanel issue #88

Closed
KimDaeWook opened this issue Feb 20, 2014 · 0 comments
Closed

complex itemspanel issue #88

KimDaeWook opened this issue Feb 20, 2014 · 0 comments

Comments

@KimDaeWook
Copy link

when i created complex itemspanel on treeview control,
DropInfo.VisualTargetOrientation has something wrong.

Root TreeViewItem ItemsPanel : stackpanel vertical
Child TreeViewItem ItemsPanel : wrappanel horizontal

when i drag child Item, drop adorner appears on top.

Below is a sample code.

<TreeView Grid.Column="0" Grid.Row="1" ItemsSource="{Binding TreeCollection}" dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True">
    <TreeView.ItemContainerStyle>
        <Style TargetType="TreeViewItem">
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <WrapPanel Orientation="Horizontal" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"/>
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </TreeView.ItemContainerStyle>
    <TreeView.ItemTemplate>
    <HierarchicalDataTemplate ItemsSource="{Binding Children}">
        <TextBlock Text="{Binding Caption}" />
    </HierarchicalDataTemplate>
    </TreeView.ItemTemplate>
</TreeView>
@punker76 punker76 added this to the v1.0.0 milestone Aug 4, 2016
punker76 added a commit that referenced this issue Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants