Pavel Melnikov
Pavel Melnikov

Reputation: 105

The best practice to implement custom\user control in WPF

I have a list of custom controls that should look something like this enter image description here

Before I start to implement them through a custom or user control in WPF (via MVVM), I want to ask if I do everything right. I create a DataTemplate and binding properties I need (these are the numeric values (0.13) in columns) and ItemTemplat'ing it to listview or listbox. Also I'm having an observable collection of viewmodels for these templates and every viewmodel sends some specific numeric data through short intervals from slave device. Also I need this green element to be clicked (just to add a button to a template I guess) and having displayed an additonal window with real time plots. So my question is: Is this the right approach I'm talking about or do I have something wrong? I'm quite new to WPF, so please excuse me. I dont think that it is a great challenge to implement something like this.

Upvotes: 2

Views: 1480

Answers (1)

Ryan Terry
Ryan Terry

Reputation: 77

I'm rather new to this model as well, however one thing I have found that has helped me with managing multiple View Models has been an IOC Locator. An example can be found here:

http://dotnetpattern.com/mvvm-light-toolkit-example

Upvotes: 2

Related Questions