Search code examples
c#wpfruntimedesigner

Solution for runtime view designer in WPF wanted


My challenge is to create a WPF application which allows the user to add / place a set of controls (gauges, charts, etc.) dynamically on a canvas at runtime and save the view (control coordinates etc.) they have designed. Those controls will display real time information from connected machines. I'd like to know if there are any commercial or open source solutions available for this scenario. I am also grateful for any hints on where to start.


Solution

  • This is pretty simple stuff. If you use a Canvas and bind it to a list of items (x, y, rotation, z order, data source etc), then use ItemTemplates to style the individual control styles, then serialize the whole lot for saving/loading.

    Edit: this post might give you some pointers Is it possible to bind a Canvas's Children property in XAML?