Skip to content

WaterfallPanel 请问支持ItemSourc 绑定吗? #1018

Answered by Yopler
heartacker asked this question in Q&A
Discussion options

You must be logged in to vote

I don't read chinese, I suppose it is corresponding as an issue that you open at the same time.
Here my answer :

There is no ItemSource Property in WaterfallPanel.

WaterFallPanel inherited from Panel (see WaterFallPanel.cs). See it as a StackPanel or a WrapPanel.

If you really want to use an ItemSource property, you can try this idea :

<ListBox ItemSource="{Binding YourBind}">
     <ListBox.ItemsPanel>
           <ItemPanelTemplate>
                 <hc:WaterFallPanel Groups="2"/>
          </ItemPanelTemplate>
    </ListBox.ItemsPanel>
    <ListBox.ItemTemplate>
         <DataTemplate>
            ...
         </DataTemplate>
   </ListBox.ItemTemplate>
</ListBox>

I never try this with…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@heartacker
Comment options

@heartacker
Comment options

Answer selected by NaBian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants