WrapPanel with horizontal and vertical orientation

微信扫一扫,分享到朋友圈

WrapPanel with horizontal and vertical orientation

I have a ListBox which holds three different sized types of items. The items’ heights are the following:

  • 178x100px
  • 100x100px
  • 100x178px

I want the layout of the items with no padding or margin between them.

But I’m getting this result:

There is a margin between items with different height/width.

What I want to do is to remove this margin between these items and have them right next to each other, but I do not know what panel to use, or what to style.

Here is the XAML for the ListBox. The items are part of a viewmodel with an enum representing the aspect ratio (16:9, 1:1, 9:16)

    
        
            
        
    

    
        
            

            
        
    
    
        
            
        
    

Tokfrans,

You need to remove the border on the ListViewItems.

  1. Create a ListViewItemStyle resource ( you can right click on the Listbox/Edit Additional templates/Edit Copy)

  1. The created XAML follows with hand modification of the BorderThickness :

EDIT : ** ** Sorry the XAML solution not visible !

    
        
        
    

And the style is assigned to the ListBox :


Regards

微信扫一扫,分享到朋友圈

WrapPanel with horizontal and vertical orientation

Fluent Design Style Progress Bar For Java, JavaFX

上一篇

Storing a binary hash value in a Django model field

下一篇

你也可能喜欢

WrapPanel with horizontal and vertical orientation

长按储存图像,分享给朋友