Hello!
I would like to achieve this result as show in the picture (attachment).
Should I use RadGridView control? Or maybe there is some way to use ListBox instead of GridView?
I have my object's class:
And ViewModel:
Any ideas or/and tips for me?
I thought that with ListBox I could use panel with specify width and each cell has also specify width. In this way I can wrap items to the next row by calculating width.
After that I would like to create an event on cell's click, which return me the Area value. But with this I think I wouldn't have a problem.
I would like to achieve this result as show in the picture (attachment).
Should I use RadGridView control? Or maybe there is some way to use ListBox instead of GridView?
I have my object's class:
public class Reinforcement { private string fi; private bool spacingMode; private int amount; private double spacing; private bool combine = false; private double area; public Reinforcement() { } public Reinforcement(string fi, bool spacingMode, int amount, double spacing, bool combine) { Fi = fi; SpacingMode = spacingMode; Amount = amount; Spacing = spacing; Combine = combine; } public string Fi { get { return this.fi; } set { this.fi = value; } }
// (...)
}And ViewModel:
public class ReinforcementViewModel { private static ObservableCollection<Reinforcement> reinforcementsByAmount; private static ObservableCollection<Reinforcement> reinforcementsBySpacing; public static ObservableCollection<Reinforcement> ReinforcementByAmount { get { if (reinforcementsByAmount == null) { reinforcementsByAmount = new ObservableCollection<Reinforcement>(); for (int i = 1; i <= 10; i++) { reinforcementsByAmount.Add(new Reinforcement("10", false, i, 1, false)); reinforcementsByAmount.Add(new Reinforcement("12", false, i, 1, false));
(...) } } return reinforcementsByAmount; } }Any ideas or/and tips for me?
I thought that with ListBox I could use panel with specify width and each cell has also specify width. In this way I can wrap items to the next row by calculating width.
After that I would like to create an event on cell's click, which return me the Area value. But with this I think I wouldn't have a problem.