5 Answers, 1 is accepted
0
Hi Richard,
The property you're looking for is InputValue. Here's a simple example to demonstrate:
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
The property you're looking for is InputValue. Here's a simple example to demonstrate:
<
ContentPage
>
<
StackLayout
>
<
Label
x:Name
=
"OutputLabel"
VerticalOptions
=
"Center"
/>
<
telerikInput:RadMaskedInput
x:Name
=
"maskedInput"
WatermarkText
=
"Enter Email Address"
Mask
=
".+@[a-zA-Z]+\.[a-zA-Z]+"
MaskType
=
"Regex"
/>
<
Button
Text
=
"Get Value"
Clicked
=
"Button_OnClicked"
/>
</
StackLayout
>
</
ContentPage
>
public
partial
class
StartPage : ContentPage
{
public
StartPage()
{
InitializeComponent();
}
private
void
Button_OnClicked(
object
sender, EventArgs e)
{
OutputLabel.Text = maskedInput.InputValue;
}
}
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0

Jeff
Top achievements
Rank 1
answered on 30 Oct 2018, 09:15 PM
Does InputValue support Binding ? Nothing in the examples folder shows it...
0
Hello Jeff,
Yes, it supports data binding. for example:
Although, this isn't an ideal case for a masked control as the backing value bound to InputValue will be updated regardless of validation.
If you have any trouble implementing the data binding with MaskedInput, please open a support ticket here and share the view mode property and the XAML so that the development team can assist directly.
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Yes, it supports data binding. for example:
<
input:RadMaskedInput
InputValue
=
"{Binding MyInputValue, Mode=TwoWay}"
/>
Although, this isn't an ideal case for a masked control as the backing value bound to InputValue will be updated regardless of validation.
If you have any trouble implementing the data binding with MaskedInput, please open a support ticket here and share the view mode property and the XAML so that the development team can assist directly.
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Alberto
Top achievements
Rank 1
answered on 12 Feb 2019, 08:12 PM
Is there a way to have the border get read in case of failed validation instead of the message on the bottom?
0
Hi Alberto,
This is not yet possible through a built-in but can be easily achieved by hooking into the ApplyMaskFinished and making changes to the UI based on the value of IsInputAccepted
As a mock example, change the BorderStyle:
Ultimately, you can take whichever approach works for you the best, the main takeaway is that you can change the style depending on IsInputAccepted, and set the InvalidInputErrorText to an empty string.
Regards,
Lance | Technical Support Engineer, Principal
Progress Telerik
This is not yet possible through a built-in but can be easily achieved by hooking into the ApplyMaskFinished and making changes to the UI based on the value of IsInputAccepted
As a mock example, change the BorderStyle:
<
input:RadMaskedInput
ApplyMaskFinished
=
"RadMaskedInput_OnApplyMaskFinished"
InvalidInputErrorText
=
""
/>
private
BorderStyle goodBorderStyle =
new
BorderStyle { BorderColor = Color.Gray, BorderThickness =
new
Thickness(0,0,0,4)};
private
BorderStyle badBorderStyle =
new
BorderStyle { BorderColor = Color.Red, BorderThickness =
new
Thickness(0, 0, 0, 4) };
private
void
RadMaskedInput_OnApplyMaskFinished(
object
sender, ApplyMaskFinishedEventArgs e)
{
var maskedInput = sender
as
RadMaskedInput;
maskedInput.BorderStyle = maskedInput.IsInputAccepted ? goodBorderStyle : badBorderStyle;
}
Ultimately, you can take whichever approach works for you the best, the main takeaway is that you can change the style depending on IsInputAccepted, and set the InvalidInputErrorText to an empty string.
Regards,
Lance | Technical Support Engineer, Principal
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items