UXTextBox not clearing out

3 replies. Last post: October 8, 2013 2:19 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi

I am using MVVM. I have uxTextbox and a uxListbox.

Aim...

Users scan into the text box and this value is added to the uxListBox then the cursor returns to the uxtext and clearout the the value ready for the next input.

I am struggling to get this to work (and have tried serveral versions of the code below) - it adds to the list box ok, but does not clear out the uxtext box.

The cursor does remain in the Barcode control but does not clear out.

        public string BarCode
            {
            get
            {
                return _BarCode;
            }
            set
            {
                if (_BarCode != value)
                {
                    _BarCode = value;
                    OnPropertyChanged("BarCode");
                    if (!string.IsNullOrWhiteSpace(_BarCode))
                      AddBarCode(_BarCode);
                }
            }
        }
        private void AddBarCode(string barcode)
        {
            if (!string.IsNullOrWhiteSpace(barcode))
            {
                BarCodeList.Add(barcode);
                BarCode = string.Empty;
                SetFocusBarcode();
               // OnPropertyChanged("BarCodeCount");
            }
        }
        private void SetFocusBarcode()
        {
            ISFocusManager.SetFocus("EnterBarCode");
        }

Thanks

All times are GMT -5. The time now is 12:47 AM.
Previous Next