void element_Reset(object sender, EventArgs e) { this.code = string.Empty; this.labelCode.Dispatcher.BeginInvoke(new Action(() => { this.labelCode.Content = this.code; this.labelAccess.Content = string.Empty; })); }