Telerik Forums
UI for Xamarin Forum
0 answers
69 views

I using Light and Dark themes in my app.

In each theme I set Styles for BorderStyle and RadEntry.

<telerikInput:BorderStyle x:Key="EntryBorderStyle"
                          CornerRadius="5"
                          BorderColor="{DynamicResource PrimaryColor}"
                          BorderThickness="1"/>

<Style TargetType="{x:Type telerikInput:RadEntry}">
    <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
    <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}" />
    <Setter Property="BorderStyle" Value="{DynamicResource EntryBorderStyle}" />
    <Style.Triggers>
        <Trigger TargetType="telerikInput:RadEntry" Property="IsEnabled" Value="False">
            <Setter Property = "TextColor" Value="{DynamicResource DisabledTextColor}"/>
        </Trigger>
    </Style.Triggers>
</Style>

but when I use RadEntry on ContentPage, styles are not attached properly, BorderColor not work after app start.

The only way to properly working Style is to add styles to ContentPage.Resources, remove entry and add again and HotReload page.

I also check solution with adding StaticResource in App.xaml:

<Application.Resources>
    <ResourceDictionary>
        <telerikInput:BorderStyle x:Key="EntryBorderStyle"
                                CornerRadius="5"
                                BorderColor="{DynamicResource PrimaryColor}"
                                BorderThickness="1"/>

        <telerikInput:BorderStyle x:Key="EntryErrorBorderStyle"
                                CornerRadius="5"
                                BorderColor="{DynamicResource ErrorColor}"
                                BorderThickness="1" />

        <Style TargetType="telerikInput:RadEntry">
            <Setter Property="BorderStyle" Value="{StaticResource EntryBorderStyle}" />
            <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
            <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}" />
            <Style.Triggers>
                <Trigger TargetType="telerikInput:RadEntry" Property="IsEnabled" Value="False">
                    <Setter Property = "TextColor" Value="{DynamicResource DisabledTextColor}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
and it alos doesn't work.

 

n/a
Top achievements
Rank 1
Iron
 updated question on 21 Sep 2023
2 answers
501 views

Hi Team,

I am using RadTabView, which contains 2 tabs.

1st Tab has RadEntry and 2nd tab has custom grid (not telerik).

When I click on 2tab and without the 2nd tab being appeared properly when I click on 1st tab, the app is getting crashed saying System.ObjectDisposedException: 'Cannot access a disposed object. Object name: 'Telerik.XamarinForms.InputRenderer.Android.BorderEditText'.'

 

Using following version:

Xamarin Forms:- 5.0.0.2515

Telerik UI For Xamarin:- 2022.3.914.1

 

Kindly help me out with this.

 

Thanks & Best Regards,

Mohammed Rameez Raza.

Jiri
Top achievements
Rank 1
Iron
 answered on 10 Mar 2023
0 answers
68 views
Excuse me, telerik has controls that can be implemented. Does lable's text scroll in the same direction all the time!
zhe
Top achievements
Rank 1
Iron
Iron
 asked on 15 Aug 2022
1 answer
120 views

我的问题是:我需要点击多次才能返回上一页。结果 page1 跳转 page2 跳转 page3 跳转 page2 。我想要的是点击返回并直接进入 page1。但实际上是:点击多次返回,page2 ->page3->page2->page1

页面跳转为:Navigation.PushAsync

上面是导航栏

Didi
Telerik team
 answered on 09 May 2022
1 answer
119 views

When I use telerikinput: radentry, using the cursorposition attribute has no effect, but it takes effect when the cursorposition attribute is used in xamarin's native entry

<telerikInput:RadEntry x:Name="AAAAA"/>
<Entry x:Name="BBBB" />

 AAAAA.CursorPosition = 0;
BBBB.CursorPosition = 0;

Yana
Telerik team
 answered on 11 Apr 2022
1 answer
467 views
I'm trying to remove Xamarin Entry bottom border,
Please give me a solution

Code


                <Entry 
                        Grid.Row="0"
                        Grid.Column="1"  
                        BackgroundColor="#3379a5" 
                        FontSize="15"  
                        VerticalTextAlignment="Center"
                        HeightRequest="45"    
                        IsPassword="True"
                        Placeholder="Password"
                        PlaceholderColor="#fff"                            
                        TextColor="#fff"
                        Visual="Material" />
Lance | Manager Technical Support
Telerik team
 answered on 27 Jul 2021
1 answer
89 views

Hi, 

I'm trying to change the color of telerikInput:RadAutoCompleteView close icon, default it's dark,

I need to assign a color to it, can anyone help me

 

0 answers
72 views
I have a project that has multiple NumericInputs and RadEntries on multiple rows on a RadList. This has been fine but I have now found on iOS devices the _Unfocused event is being fired for no reason, I have tried debugging and I believe that it is happening because another found field is updating but this field is not bound to the controls so I don't see how that is possible. Is there a better way to debug this?
Simon
Top achievements
Rank 1
Veteran
 asked on 05 Jul 2021
1 answer
438 views

Want to change RadEntry Border Color on focus without code behind file. To achieve this Focus event converted to Command and IsSelectedFocused Command is firing on focus. After this VisualElement is converted to RadEntry & BorderSyle.Color changed to Brown does not have any impact.

Secondly, RadEntry Trigger IsFocused also does not have any impact. Please advise, in this regards.

<input:RadEntry Style="{StaticResource ProductLabelStyle}"
                WatermarkText="Product Name">
    <input:RadEntry.Behaviors>
        <common:RadEventToCommandBehavior EventName="Focused"
                                          Command="{Binding IsSelectedFocused}"/>
    </input:RadEntry.Behaviors>
    <input:RadEntry.Triggers>
        <Trigger Property="common:FocusElementHelper.IsFocused"
                 Value="True"
                 TargetType="input:RadEntry">
            <Setter Property="input:RadEntry.BorderStyle"
                    Value="{StaticResource ProductEntryFocusBorderStyle}"/>
        </Trigger>
    </input:RadEntry.Triggers>
</input:RadEntry>

 

private IAsyncCommand<object> _isSelectedFocused;
 
public IAsyncCommand<object> IsSelectedFocused => _isSelectedFocused ??= new AsyncCommand<object>(onSelectedFocus, canSelectedFocus);
 
private Task onSelectedFocus(object arg)
{
    if(!(arg is FocusEventArgs focusEventArgs))
    {
        return Task.CompletedTask;
    }
 
    if(focusEventArgs.VisualElement is RadEntry radEntry)
    {
        radEntry.BorderStyle.BorderColor = Color.Brown;
    }
    return Task.CompletedTask;
}

 

Mak
Top achievements
Rank 1
 answered on 21 Mar 2021
7 answers
451 views

Hi everyone,

I'm trying to create a global style so that all RadEntry controls in my application have the same look and feel.

I'd like the CornerRadius of the entry controls to be 0 and to specify a border color.

I'm having issues figuring out how to specify the BorderStyle values in my global style.

This is what I've tried so far and none of my border style values were applied:

<OnPlatform x:Key="EntryPadding" x:TypeArguments="Thickness">
    <On Platform="iOS" Value="10,10,0,20" />
    <On Platform="Android,UWP" Value="10,10,0,10" />
</OnPlatform>
 
<Style x:Key="EntryBorderStyle" TargetType="telerikInput:BorderStyle">
    <Setter Property="CornerRadius" Value="0" />
    <Setter Property="BorderColor" Value="#808080" />
    <Setter Property="BorderThickness" Value="5" />
</Style>
 
<Style TargetType="telerikInput:RadEntry">
    <Setter Property="Padding" Value="{StaticResource EntryPadding}" />
    <Setter Property="BorderStyle" Value="{StaticResource EntryBorderStyle}"/>
</Style>

 

Anyone have any ideas where I might be going wrong?

Thanks,

Greg

Larry
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 10 Feb 2021
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?