I making an app, where I like writte some bytes into textbox. I like to validate if real HEX code is written into textbox or not and remind user if not.
I never made this in MVVM and XAML. How to do it? I find several tutorial on web, but problem is that I like to write 64 bytes. I have 64 textboxes pull together in one array.
One of the textbox:
<TextBox Text="{Binding TB[4], UpdateSourceTrigger=PropertyChanged}" Grid.Column="0" Grid.Row="0" Style="{StaticResource byteTextBoxStyle}"/>
and array variable:
private string[] _tb = new string[64];
public string[] TB
{
get
{ return _tb; }
set
{
_tb = value;
NotifyPropertyChanged("TB");
}
}
Goal is that red textblock is under of all textboxes and write a red (Something like that).
I can do it later when button is pressed - pull together array in to one string and check with regex is something is not OK. But I want this in real time, when user put-in text and right away recognite if is OK or not.
Please for help, because I am new in MVVM and WPF thing. If any question please ask. Thanks!