Pergunta

I'm trying to make a coordinate system with some features in C#. I never worked with C# but think it should be similar to other languages.

I'm not sure which element is suitable for that (Panel,PictureBox,....).

The requirements are:

  • I want zoom in and out
  • move the left/right/down/up there
  • I get values from a microcontroller and want paint them in real time

I'm using Visual Studio 2012. I dont want use other dll/libraries or programms from other people.

Thx

PS:Maybe a simple tutorial would be also great.

Foi útil?

Solução

I did the same thing using a simple Canvas in WPF. So I suggest you change your platform to WPF. Zoom in/out behavior can be done using a ScaleTransform and move left/right/... can be done using a TranslateTransform. No need to any library, you can use geometric types int wpf such as Path. And set the RenderTransform property of every path to these transform functions.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top