Hi,
I want to do the PadLeft within the MashedInput control and i do it as below. However i found out that the UI doesn't update and refresh itself whereas the private backup field has changed. When i create another control binding to the same property it will update when i inpute something into the MashedInput control.
In short the MashedInput control don't refresh itself when the databinding source change. Please help me there.
GUI
I want to do the PadLeft within the MashedInput control and i do it as below. However i found out that the UI doesn't update and refresh itself whereas the private backup field has changed. When i create another control binding to the same property it will update when i inpute something into the MashedInput control.
In short the MashedInput control don't refresh itself when the databinding source change. Please help me there.
GUI
<
telerik:RadMaskedTextInput
Value
=
"{Binding Number, Mode=TwoWay}"
Mask
=
"###"
UpdateValueEvent
=
"LostFocus"
HorizontalAlignment
=
"Left"
Margin
=
"12,12,0,0"
Name
=
"radMaskedTextInput1"
VerticalAlignment
=
"Top"
Width
=
"75"
/>
Codebehind
public
class
VM : ViewModelBase
{
private
string
_Number =
""
;
public
string
Number
{
get
{
return
this
._Number;
}
set
{
value = value.PadLeft(3,
'0'
);
if
(value !=
this
._Number)
{
this
._Number = value;
RaisePropertyChanged(
"Number"
);
}
}
}
}