How can I make something like this? (Tiles inside the app) Windows phone

后端 未结 1 1181
误落风尘
误落风尘 2020-12-13 10:27

I\'m sorry if the question title wasnt clear, but I\'m trying to make something like this, I dunno if they are tiles or images inside a WrapControl:

1条回答
  •  庸人自扰
    2020-12-13 11:02

    You are on the right track. WrapPanel is the way to go :)

    To make each block more interesting, you can take a look at the HubTile control from the latest windows phone toolkit. Whatever controls/panels you are using, just remember the size should be 173*173.

    Use a ListBox

    In one of my projects I created a ListBox that does all this. The reason that I use a ListBox is because ListBox has a SelectedItem propery which tells me which tile is tapped by the user. Also another reason is ListBoxItems can receive the nice tilt effect.

    Baiscally you just need to create a tile-like ListBoxItem style and apply it to the ListBox's ItemContainerStyle, also you need to set the ListBox's ItemsPanel to be a WrapPanel.

    How it looks

    enter image description here

    The ListBoxItem Style

    
    

    The ListBox

            
            
                
                    
                    
                        
                    
                
                
                    
                        
                        
                            
                            
                        
                    
                
                
                
                
                
            
    

    You can see the last item is actually a HubTile.

    Hope ths helps! :)

    0 讨论(0)
提交回复
热议问题