Jumping into the world of custom WPF controls and wondered what would be the best way to develop a HexGrid control? Think about your favorite board game; or, equally, your favorite video game that steals design from the proud history of board war games.
The model is based on one significant method as part of the map class:
Hex GetHex(int x, int y, int z)*;
Hex contains all the relevant data (at the moment, the Terrain enumeration, which maps 1: 1 to the background color, starting from small ...).
Appropriate restrictions are possible: The
card does not change in size and the Hex data changes in a very predictable time (always in direct response to user actions).
Ideally, a component will expand to fully fill its container and be declared directly in XAML.
What I'm looking for is a schematic diagram of what I need to do to build this, and not a finished component.
* I, although I am pretty smart with this addressing scheme, but apparently I was late for the party .
source
share