Creating grid of hexagons

后端 未结 2 1130
执笔经年
执笔经年 2021-02-13 14:45

I have to do a \"grid\" like this:

\"Harmonic Harmonic table

I\'m trying to create a ListView

2条回答
  •  梦毁少年i
    2021-02-13 15:25

    HexGrid: CodeProject article

    HexGrid: GitHub repository

    The key component of a possible solution is a WPF Panel which can arrange hexagonal elements (Standard Panels operate with rectangular child elements). Take a look my HexGrid project (too large to post here). The cental part of it is a HexGrid (WPF Panel which arranges child elements in a honeycomb pattern). Child elements are represented by HexItems (hexagon-shaped ContentControls). There is also HexList (selector ItemsControl which displays items in HexItem container on a HexGrid panel) which gives hex selection support out-of-box.

    example of usage:

    
        
        
        
        
        
        
        
    
    

提交回复
热议问题