Please help me
I have
public partial class OrderControl : UserControl
{
private OrderHeader orderHeader;
public Customer selectedCustomer { get; set; }
private Customer[] allCustomers;
public User selectedManager { get; set; }
private User[] allManagers;
public OrderControl()
{
InitializeComponent();
DataContext = this;
}
...
}
And I need one way binding to source:
<ComboBox Name="CustomerComboBox" SelectedItem="{Binding selectedCustomer}"/>
Is this best way to keep selectedCustomer Property in OrderControl.xaml.cs or I need to create some OrderViewModel class with ..,selectedCustomer,... Properties and keep an instance of OrderViewModel in OrderControl.xaml.cs?
thanks