Telerik Forums
UI for Xamarin Forum
1 answer
51 views

I using styling validation on form by DataTrigger.
When Validator.IsValid == false then DataTrigger changes specified feature.

In case of standard RadEntry control, I could specify BorderColor.

But how to work with RadNumericinput when such control not exposes any input element property?

<telerikInput:RadNumericInput x:Name="numericInput" 
                                          IsEnabled="{Binding IsEnabled}"
                                          Value="{Binding Value,Mode=TwoWay}"
                                          VerticalOptions="Center" 
                                          HorizontalOptions="FillAndExpand">
                <telerikInput:RadNumericInput.Triggers>
                    <DataTrigger TargetType="telerikInput:RadNumericInput"
                                 Binding="{Binding Validator.IsValid}"
                                 Value="False">
                        <Setter Property="BorderStyle">
                            <telerikInput:BorderStyle BorderColor="{DynamicResource ErrorColor}" />
                        </Setter>
                    </DataTrigger>
                </telerikInput:RadNumericInput.Triggers>
            </telerikInput:RadNumericInput>


Didi
Telerik team
 updated answer on 28 Dec 2022
1 answer
115 views

I using LightTheme and DarkTheme in app.
But I have a problem with +/- buttons CornerRadius and Entry border styling.
They are not react to specified style.

How to style buttons and entry to custom apperance without override whole control template?

Documentation is too poor in this context.

Here is my xaml:

<telerikInput:RadNumericInput x:Name="numericInput" 
                              IsEnabled="{Binding IsEnabled}"
                              Value="{Binding Value,Mode=TwoWay}"
                              VerticalOptions="Center" 
                              HorizontalOptions="FillAndExpand">
            </telerikInput:RadNumericInput>

And syles:

<Style TargetType="{x:Type telerikInput:RadNumericInput}">
        <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
    </Style>

    <Style TargetType="{x:Type telerikNumericInput:NumericInputButton}">
        <Setter Property="BorderRadius" Value="5" />
        <Setter Property="BorderColor" Value="{DynamicResource PrimaryColor}"/>
        <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}"/>
        <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0,0,0,0"/>
    </Style>
    
    <Style TargetType="{x:Type telerikNumericInput:NumericInputEntry}">
        <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}"/>
        <Setter Property="Padding" Value="0,0,0,0"/>
        <Setter Property="Keyboard" Value="Numeric"/>
        <Setter Property="BorderStyle">
            <Setter.Value>
                <telerikInput:BorderStyle>
                    <telerikInput:BorderStyle.BorderThickness>
                        <OnPlatform x:TypeArguments="Thickness" Default="1">
                            <On Platform="Android" Value="1"/>
                            <On Platform="iOS" Value="1"/>
                            <On Platform="UWP" Value="1"/>
                        </OnPlatform>
                    </telerikInput:BorderStyle.BorderThickness>
                </telerikInput:BorderStyle>
            </Setter.Value>
        </Setter>
    </Style>


 

Didi
Telerik team
 answered on 28 Dec 2022
1 answer
156 views

I have an integer property in the source of a DataForm, and I'm looking for an easy way to apply string formatting in the UI. I would like this to be applied regardless of DataForms readonly status. So a number like 10005 will show as 10,005 or 10.005. I'm fine with the formatting to be disabled during editing.

I've explored a bit with iPropertyConverters, or adding a string property that uses the integer properties values, but I haven't had any success with seeing the formatted values in both readonly statuses and using the NumberPickerEditor.

Any help would be greatly appreciated.

Lance | Manager Technical Support
Telerik team
 answered on 02 Mar 2022
1 answer
58 views

Hello,

Preface this with I am new with Xamarin/Telerik (purchased this month).

I have a RadNumericInput in a collection view bound to a Qty.  It appears to be working just fine.

When I decided to Group my collection view, the grouping works as expected, but the basic binding is failing, displaying incorrect values.

I then added a <label> bound to the Qty also to see if that bind was incorrect, but it looks good.

Weird thing, the RadNumericInput bind seems to bind 'correctly' in the first group.  However, in the next group (Qty all ZERO), after about the 7 item, the binding values 'repeat' themselves against random items.  Even weirder, when I increment the value with the controls' button, it updates the control correctly, but in BOTH groupings.

I incremented/decremented a whole bunch of times, where it eventually seems to lose its place in the group, along with the both group values not matching anymore.

This is basically my first test with the RadNumericInput.  Here is the XAML for the RadNumericInput and the label.  They are right next to each other in the stacklayout.  Again, the label values are correct, the RadNumericInput displays the incorrect value.

                <Label Text="{Binding QUANTITY}" FontSize="15" FontAttributes="Bold"
                    Grid.Row="1"/>

                <telerikInput:RadNumericInput x:Name="numericInput" Margin="0,-10,0,0"
                    Grid.Row="1"
                    Step="1" HeightRequest="30"
                    Minimum="0" Maximum="60"
                    Value="{Binding QUANTITY}" 
                    BackgroundColor="Transparent"
                    IncreaseButtonText="+" DecreaseButtonText="-"
                />

 

I did a quick search, trying to work my around the website(s), but didn't see anything similar to this.

Thanks.

Adam
Top achievements
Rank 1
Iron
 answered on 12 Feb 2022
2 answers
162 views

Hi Support,

I have a UWP application with a a listview and inside the listview, I have a viewcell, then a grid with 3 columns. The 1st column is a RadNumericInput, 2nd is a string, 3rd is a comboBox. When I click on the + or - button in the RadNumericInput for a row, the value of the NumericInput updates correctly but the row I am working on is NOT selected in the listview as selectedItem. However if I click on the value box of NumericInput, the row is set as the selecteditem in the listview. Is there a way to add code to trigger the listview to select the row when the +/- button is clicked?

I tried the comboBox and the row is selected properly when I select a value inside the comboBox.

Please advise.

Vivian

 

Vivian
Top achievements
Rank 1
Iron
 answered on 20 Jan 2022
1 answer
129 views

Hi, I'm trying to apply theme changes to telerikInput:RadDateTimePicker, place holder & text colour change from ThemeDark.xaml & ThemeLight.xaml

by using

DisplayLabelStyle="{AppThemeBinding Dark={StaticResource TextColorDark},
                                                            Light={StaticResource PrimaryTextColorLight}}"   

and

PlaceholderLabelStyle="{AppThemeBinding Dark={StaticResource TextColorDark},
                                                            Light={StaticResource PrimaryTextColorLight}}"            
                                    SelectionHighlightStyle="{StaticResource selectionHighlightStyle}"

 

but this AppThemeBinding doesn't work, If there is any working solution, please share with me.

Thanks

1 answer
68 views

Is it possible to hide the numeric text entry box so that we just have plus/minus buttons?

If so, how do we do that.

 

Thanks,

Kevin

Lance | Manager Technical Support
Telerik team
 answered on 21 Jan 2020
1 answer
70 views

Hallo,

im new with Xamarin Forms. With my Samsung Galaxy Tab S2 (Model SM-T813) I must hit 2 times . or , to make the input.

Is there a easyer way to fix this, then write a renderer for android to handle the key event?

Pavel R. Pavlov
Telerik team
 answered on 12 Apr 2019
1 answer
166 views

In Xamarin Forms, I have seen issues when you place this RadNumericInput input element inside of a ListView's ViewCell with other input elements, such as a Entry field.  Only the first element added will honor the input listeners and respond accordingly.  When pressing the second, in this case the numeric input, the keyboard pops up but cannot maintain it's focus inputs, vacillating between opening and closing the keyboard uncontrollably.  

"finishComposingText on inactive InputConnection" is called and processed continually.

 

Could you offer any solutions to this issue?

 

Thank you

 

Jason

Didi
Telerik team
 answered on 09 Apr 2019
3 answers
1.3K+ views

Hi, how I can hide the overlay keyboard from appearing after set the focus oin the NumericInput.

For now I try with Depedency on cross platform without success

RadNumericInput ntb = Qte as RadNumericInput;
if (ntb != null)
{
    ntb.Focus();
    var key = Xamarin.Forms.DependencyService.Get<IForceKeyboardDismissalService>();
    key.DismissKeyboard();
}

 

then on droid:

[assembly: Xamarin.Forms.Dependency(typeof(AndroidForceKeyboardDismissalService))]
namespace KelvinMobile.Droid
{
    public class AndroidForceKeyboardDismissalService : IForceKeyboardDismissalService
    {
        public void DismissKeyboard()
        {
            InputMethodManager imm = InputMethodManager.FromContext(CrossCurrentActivity.Current.Activity.ApplicationContext);
 
            imm.HideSoftInputFromWindow(CrossCurrentActivity.Current.Activity.Window.DecorView.WindowToken, HideSoftInputFlags.NotAlways);
        }
    }
}

 

The call work, but the keyboard still there...

 

Yana
Telerik team
 answered on 28 Mar 2019
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?