Map display using WPF

I am new to WPF and relatively new to GUI coding, so bear with me if this seems obvious to some.

I am trying to display a randomly generated map using WPF / C # to simulate the behavior of a propagating radio signal. Each map coordinate can have zero or more elements in it - it can be buildings, vehicles, fauna or geographical data (none indicates flat grassy fields). I would like to display this in a window or page for the user. But I dont know how.

My initial thought was a canvas with a predefined method for drawing elements. But the map will be massive, and I only want to display a small part of the map to the user at any given time.

So, I want to know if I can create a canvas, draw what I want on it, and then display only a small part of this for the user? If not, or if it's not easy, is there a better way to do this? I don’t necessarily need a specific answer: a more general solution would be better (that is, tell me that I need to use Blah with Blah Blah, it would be better than writing all the code - I like to learn about these things as much as possible more, not copy and paste).

Thank.

David

+3
source share
1 answer

Here are some ideas:

You can try to draw your objects directly through the GraphicsContext. Here you will find an overview.

CompositionTarget.Rendering, ( ).

, , XNA-framework.

+2

All Articles