❔ WPF Use of multiple item controls
Hello! I am trying to display a bunch of planets on the canvas with itemscontrol. This has been a success but now I have to add lines between some planets because they are neighbours. I can't seem to get two item controls working (I don't really know how to implement the second list). And secondly I can't seem to add a second tag for the ellipse (planet)
18 Replies
Here is my view
I added the
X1="{Binding GameViewModel.GetPlanet(neighbour).X}" X2="..."></Line>
as a place holder but it should give a rough idea for what I am trying to doI also want to add the elipse in the itemscontrol but I don't know where because it only accepts one child.
If anyone knows anything that will help me don't forget to tell me!
Thanks :)
What is it you want the end result here to look like? I am confused just looking at your xaml what you want to achieve.
Currently looks like that
But there should be lines between some planets
This seemed to work
But now I ran into another problem cause I can't bind to the planet now that i bind to an array of items inside the planet object
🥳
I also figured out how to make it work, but its probably fairly different to how you solved it I would guess. https://github.com/AlexLexicon/Discord.Example.Planets
GitHub
GitHub - AlexLexicon/Discord.Example.Planets
Contribute to AlexLexicon/Discord.Example.Planets development by creating an account on GitHub.
Actually pretty close to what I did
ah, thats funny
Thanks anyway!
WPF is a bit different compared to what I am used to 😆
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.