amit kohan
amit kohan

Reputation: 1618

How to create/assign properties to graphical objects?

Currently, I'm writing a simple draw application where it draws lines, ellipse and etc on canvas. However, this is just the start and I need to allow end user to change properties of each graphical object. Let's say line have color attribute or coordination parameters that should change.

A few things to add:

  1. WPF Application
  2. C#
  3. XML to store information

I will appreciate it if experts give me some ideas and heads up on how to create/assign properties to objects.

Thanks in advance.

ak

Upvotes: 0

Views: 83

Answers (1)

Tim S.
Tim S.

Reputation: 56536

You can create instances of the Shape classes and use those objects' properties to set things like color. You'll need to create your interface allowing the user to do this. You can use the XamlWriter and XamlReader classes to serialize your info.

Upvotes: 1

Related Questions