Hi,
I'm using MVVM pattern in project which I'm working on now.
There is scenario where we are getting data from external device and it's come to Model --> view Model--> view.
There is condition like that value should be equal or graeter than 15 but less than 95. If value is beyond this range in view where I'm using textbox which should turn as Red. which Mean value is not in range.
Model:
public override ushort GetLLValue(int lIndex)
{
this.paramValObjects[Index].Limit = retValue;
}
ViewModel:
public UInt16 LL
{
get
{
return this.Obj.GetLLValue(this.Index);
}
}
View:
<TextBox Height="21" IsReadOnly="False" HorizontalAlignment="Left" Margin="151,59,0,0" Name="textBox2" Text="{Binding Path=LL, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}" VerticalAlignment="Top" Width="75">
vikas sharma AB