private void SelectFromLoadCarrier() { bool foundLoadCarrier = false; if (DataContext != null) { foreach (PackStationOverviewViewResult item in ((IList <PackStationOverviewViewResult>)DataContext)) { if (item.LoadCarrierId.Trim() == FromLoadCarrier.Text.Trim()) { if (item.Selected.Value) { CurrentItem = item; CurrentItem.Selected = true; foundLoadCarrier = true; break; } } } } if (!foundLoadCarrier) { presenter.SelectFromLoadCarrier(FromLoadCarrier.Text); } FromLoadCarrier.SelectAll(); FromLoadCarrier.Focus(); }
private void FromLoadCarrier_ItemSelected(object sender, SelectionChangedEventArgs e) { e.Handled = true; FromLoadCarrier.IsDialogOpen = false; FromLoadCarrier.Focus(); FromLoadCarrier.Text = ((FindLoadCarrierForPackStationFindViewResult)e.AddedItems[0]).LoadCarrierId; SelectFromLoadCarrier(); }
private void SetFocus(bool force) { if (EANFocus) { EAN_code.Focus(); //EANFocus = false; } else { if (!FromLoadCarrier.IsEnabled || !ToLoadCarrier.IsEnabled) { EAN_code.Focus(); } else { FromLoadCarrier.Focus(); } } }