Where is your problem?
Hi Peter, big problem!
private void CmdExec(object obj)
{
switch (obj.ToString())
{
case "AddOrder":
//nt newOrderNumber = (this.ColOrders.Count > 0) ? this.ColOrders.Max((ord) => ord.OrderNumber) + 1 : 1;
var o = new Order() { OrderNumber = "TEST1" };
this.ColOrders.Add(o);
this.View1.MoveCurrentTo(o);
We have the TextBox Order. The operator insert this number now as string.
How can I access the UI controls directly from ViewModel?
And I need like a Init() function. How can I do that?
I want not to press first Load()
<TextBox Grid.Row="0" Grid.Column="0" Text="{Binding CurrentOrderNo}" HorizontalAlignment="Left"
Works not.
The goal:
var o = new Order() { OrderNumber = textBox der Usereingabe };
Can you help me again, please?
new ObservableCollection<Order>();
Init to create a new list.
How I can call a Init() function for ViewModel ?