WPF C# Serial EOF Check
  String RF_text;
        private void SetText(string text)
        {
            if (RF_ID.Dispatcher.CheckAccess())
            {
                RF_text = RF_text + text;
                byte[] StrByte = Encoding.UTF8.GetBytes(text);
                for (int i = 0; i < StrByte.Length; i++)
                {
                    if (StrByte[i] == 0x03) //0x1A
                    {
                        RF_ID.Text = RF_text;
                        SendSerial(true);
                        RF_text = String.Empty;
                        break;
                    }
                }
            }
            else
            {
                SetTextCallBack d = new SetTextCallBack(SetText);
                RF_ID.Dispatcher.Invoke(d, new object[] { text });
            }
    }