alexandersharykin / hexgrid Goto Github PK
View Code? Open in Web Editor NEWWPF HexGrid Panel
License: MIT License
WPF HexGrid Panel
License: MIT License
On CodeProject, this is licensed under the CPOL which is incompatible with the license of the project I'd like to incorporate this into. Would you consider relicensing to something that's, IMO, better, such as MIT?
First, thank you for making your project available. I appreciate you taking the time to do that.
Secondly, I need to have a 25 x 25 hex list with horizontal orientation. I have spent significant time with the code to figure out how I might create much larger hexagons, but with no luck. I'm not great at WPF and I'm still learning, so any suggestions you could offer would be helpful.
The image shows what I am getting, which is far too compacted for me.
Thank you,
David.
Is there any way? I directly regard this as a text input box. I can only input hexadecimal numbers, and the display effect is the same as you are now. I can insert, delete and append at will
Hello, I'm attempting to use this project to make a hex based board game. I'm not sure if you're still active or not, but if you have the time to answer my question it would be greatly appreciated.
I currently have a custom control called MapGridView.xaml and is as shown below:
<Grid>
<hx:HexList Grid.Row="0" Grid.Column="0" Name="Board"
Margin="5"
RowCount="6" ColumnCount="8"
Orientation="Vertical" ItemsSource="{Binding Tiles}">
<hx:HexList.ItemContainerStyle>
<Style TargetType="{x:Type hx:HexItem}">
<Setter Property="Grid.Row" Value="{Binding Path=X}"/>
<Setter Property="Grid.Column" Value="{Binding Path=Y}"/>
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Background" Value="White"/>
</Style>
</hx:HexList.ItemContainerStyle>
</hx:HexList>
</Grid>
Which has a datacontext of the following viewmodel:
`public class MapGridViewModel : ViewModelBase
{
#region Fields
private ObservableCollection<Coordinate2D> _tileCoordinates;
#endregion
#region Ctor
public MapGridViewModel(HexGrid hexGrid)
{
Tiles = new ObservableCollection<Coordinate2D>(hexGrid.Hexes);
}
#endregion
#region Properties
public ObservableCollection<Coordinate2D> Tiles
{
get { return _tileCoordinates; }
set
{
if (_tileCoordinates == value) return;
_tileCoordinates = value;
OnPropertyChanged(nameof(Tiles));
}
}
#endregion
}`
When I run the application all I get is a single hex on the screen. I've checked to ensure that my Tiles are indeed populated with many coordinates, so I'm not sure why each row/column in the control is not populating. I checked your demo to see how you did your board and saw you setup the itemssource in the codebehind and just bound it too a list which was just a struct you made, similar to my Coordinate2D object. I tried that and it worked fine. So I'm not sure why the bindings to the X and Y property on my Coordinate2D object is not working.
I couldn't get some of the code to format properly in github, sorry about that.
This is exactly what I'm searching. Would be cool If I could consume it as a nuget package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.