I am trying to build a panel that works like the Properties panel but have been running into a ComboBoxCell problem. In looking though the forum I believe this has been brought up but I wanted to make sure my implementation was correct before I give up.
If this is a bug and you have a suggestion how I can create a container that allows the user to slid the columns and has rows with TextBox, CheckBox and ComboBox’s in it please let me know.
Best;
Steve
Here is the code I have put together so far:
class ComboButtDrop
{
public string Label { get; set; }
public string Text { get; set; }
public bool Check { get; set; }
public string Drop { get; set; }
}
public class EtoHelloForm : Eto.Forms.Form
{
public EtoHelloForm()
{
var collection = new ObservableCollection<ComboButtDrop>();
collection.Add(new ComboButtDrop {Label = "Label 01", Text = "Row 1", Check = true, Drop = "Drop 1" });
collection.Add(new ComboButtDrop {Label = "Label 02", Text = "Row 2", Check = false,Drop = "Drop 2" });
var grid = new GridView { DataStore = collection };
grid.Columns.Add(new GridColumn {
DataCell = new TextBoxCell { Binding = Binding.Property<ComboButtDrop, string>(r => r.Label) },
HeaderText = "Label",
Editable = false,
Resizable = false
});
grid.Columns.Add(new GridColumn {
DataCell = new TextBoxCell { Binding = Binding.Property<ComboButtDrop, string>(r => r.Text) },
HeaderText = "Text",
Editable = true,
Resizable = true
});
grid.Columns.Add(new GridColumn {
DataCell = new CheckBoxCell { Binding = Binding.Property<ComboButtDrop, bool?>(r => r.Check) },
HeaderText = "Check",
Editable = true
});
grid.Columns.Add(new GridColumn {
DataCell = new ComboBoxCell("Drop") {DataStore = new List<string>{"Drop 1","Drop 2"}},
HeaderText = "Butt",
Editable = true
});
Content = grid;
}
}