Telerik Forums
UI for .NET MAUI Forum
1 answer
60 views

Hi,

Why plus and minus are so big?

 


   <telerikInput:RadNumericInput x:Name="numericInputRecursEvery" Value="{Binding SelectRecursEvery , Mode=TwoWay}" Minimum="0" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" WidthRequest="200" Margin="5"/>
                    

Yana
Telerik team
 answered on 01 May 2024
2 answers
74 views

This is a change in behavior from previous versions. Changing the value from Center to End, then back to Center in the debugger will change the alignment, but I haven't found a way to make it work in my app. At present the alignment appears to be Start.

Example code:

        <ControlTemplate x:Key="RotationRadNumericInputControlTemplate">
            <Grid>
                <telerik:RadBorder x:Name="PART_BorderVisual" BorderColor="Transparent">
                    <Grid ColumnSpacing="{StaticResource Spacing}" HeightRequest="50">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="50" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="50" />
                        </Grid.ColumnDefinitions>
                        <telerik:NumericInputButton
                            Grid.Column="0"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center"
                            BackgroundColor="Transparent"
                            BorderColor="DarkOrange"
                            BorderThickness="2"
                            Command="{TemplateBinding DecreaseCommand}"
                            CornerRadius="0"
                            FontSize="{StaticResource MediumFontSize}"
                            IsEnabled="{TemplateBinding IsEnabled}"
                            Text="-"
                            TextColor="DarkOrange" />
                        <telerik:NumericInputEntry
                            x:Name="PART_Entry"
                            Grid.Column="1"
                            BackgroundColor="Transparent"
                            BorderBrush="DarkOrange"
                            BorderThickness="1"
                            ClearButtonVisibility="Never"
                            CornerRadius="0"
                            FontSize="{StaticResource MediumFontSize}"
                            HeightRequest="50"
                            HorizontalTextAlignment="Center"
                            InputTransparent="{TemplateBinding IsReadOnly}"
                            IsReadOnly="True"
                            Text="{TemplateBinding Value}"
                            TextColor="DarkOrange"
                            VerticalTextAlignment="Center"
                            WidthRequest="100" />
                        <telerik:NumericInputButton
                            Grid.Column="2"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center"
                            BackgroundColor="Transparent"
                            BorderColor="DarkOrange"
                            BorderThickness="2"
                            Command="{TemplateBinding IncreaseCommand}"
                            CornerRadius="0"
                            FontSize="{StaticResource MediumFontSize}"
                            IsEnabled="{TemplateBinding IsEnabled}"
                            Text="+"
                            TextColor="DarkOrange" />
                    </Grid>
                </telerik:RadBorder>
                <telerik:RadBorder x:Name="PART_FocusBorderVisual" BorderColor="Transparent" />
            </Grid>
        </ControlTemplate>
Didi
Telerik team
 answered on 01 Aug 2023
1 answer
58 views

I am trying to change the font size in my data form by creating a style in the styles.xml file. I was able to set the font size in a DataFormDatePickerEditor and DataFormRadEntryEditor, but not for the DataFormRadNumericEntry. I've tried targeting a label, a RadNumericInput, RadNumericEntry, Entry, RadEntry, and DataFormRadNumericEntryEditor for my style, but to no success. I would also like to set the font size for the validation message from the data annotations. I have attached below screenshots to clarify. Am I targeting the wrong type? Or is there a workaround to change the font sizing?

Thanks, 

Nate

Maria
Telerik team
 answered on 20 Apr 2023
1 answer
815 views

Hello,

I have several controls I want to change the font size and text color for (RadNumericInput, RadTimePicker, and RadTimeSpanPicker). The pop-ups are fine out of the box but the control itself (before being tapped on) has fairly small font and the font is black which doesn't work in Dark Mode. I would like to make the font larger for each of these 3 controls and bind the Text Color to a Color in my Theme so the text color updates based on the theme being Dark vs Light. I'm assuming I would do these changes for all the controls in a similar way, but I am fairly new to Telerik UI. I just don't seem to find a TextColor or FontSize exposed as either an attribute, property, etc. for any of the Rad controls. I must be missing something simple, as every basic control has ability to change text color and size.  

I would appreciate any help somebody could provide. Thank you.

p.s. - Bonus points if you can tell me how to do it in C# rather than XAML, but OK if not. I can adapt it as needed. :)

Lance | Senior Manager Technical Support
Telerik team
 answered on 16 Nov 2022
1 answer
1.9K+ views

Hey

I try to measure the size of a control, when I prefill it with values.
Therefor, I tested with the Microsoft Edit Control, which gives me the correct value, when I do the following code snipset:
   

            Editor locEditor = new();
            locEditor.Text = "TEST";
            locEditor.FontFamily = this.FontFamily;
            locEditor.FontSize = this.FontSize;
            locEditor.ToNative(this.Handler.MauiContext);
            var locSize = locEditor.Handler.GetDesiredSize(double.PositiveInfinity, double.PositiveInfinity);
            locEditor = null;
Variable locSize has the height and width of the control

RadNumericMaskedEntry locEditor = new();
            locEditor.Value = "TEST";
            locEditor.Handler = this.Handler;
            // - Not working: var locSize = locEditor.Handler.GetDesiredSize(double.PositiveInfinity, double.PositiveInfinity);
            // - Not working: var locSize = locEditor.CrossPlatformMeasure(double.PositiveInfinity, double.PositiveInfinity);
            //- Not working:  var locSize = locEditor.Measure(double.PositiveInfinity, double.PositiveInfinity).Request;
            locEditor = null;
           

 

But when I try to use the RadNumeric, the size always returns 0


What could this be? 

THX a lot in advance



Antoan
Telerik team
 answered on 13 Jan 2022
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?