<telerikPrimitives:RadPopup.Popup>
<telerikPrimitives:RadPopup x:Name="popuptwo" IsModal="True" Placement="Center">
<telerikPrimitives:RadBorder WidthRequest="250" Margin="0,0,0,20" HeightRequest="42" HorizontalOptions="Center" VerticalOptions="Center" CornerRadius="8" BackgroundColor="White">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="42"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*"></ColumnDefinition>
<ColumnDefinition Width="50*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.ColumnSpan="2">
<telerikInput:RadButton ContentLayout="Left,4" x:Name="images" HorizontalOptions="Start"
BorderColor="#c9c9c9" BackgroundColor="#4295F4" TextColor="White" BorderWidth="1" CornerRadius="8" WidthRequest="400" VerticalOptions="Center"/>
</Grid>
</Grid>
</telerikPrimitives:RadBorder>
</telerikPrimitives:RadPopup>
</telerikPrimitives:RadPopup.Popup>
popuptwo.IsOpen = true;
images.ImageSource = success;
images.Text = "成功";
Device.StartTimer(TimeSpan.FromMilliseconds(2000),
() =>
{
popuptwo.IsOpen = false;
return false;
});
Hi.I want to listen for the back button event on the navigation bar and Change background color. What should I do
Is there any built-in ability to wrap the text in a RadButton for Xamarin Forms?
Specifically, I am trying to enable text wrapping on iOS. I am aware that you can create a Custom Renderer to achieve this by setting the underlying iOS `LineBreakMode = UILineBreakMode.WordWrap`, but I was hoping RadButton would handle this without the need for additional customizations.
Please let me know if I've missed anything. Or if not, it would be great to know if this has been considered for future releases. Thanks!
Hi,
recently I received crash with describe Unable to activate instance of type Telerik.XamarinForms.InputRenderer.Android.Button.ExtendedAndroidButton.
Below stack trace pasted.
Is it known issue, or ho to find out where this exception was happen?
I got this crash first time after update XF and Telerik.UI.
XF:4.3.0.947036
Telerik:2019.3.1023.1
Sory, but code formatter doesn't work for me here.
Xamarin Exception Stack: System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.InputRenderer.Android.Button.ExtendedAndroidButton from native handle 0xbef5af20 (key_handle 0x7b876d1). at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00182] in <20c7915d69a7451ba5dddbb52e8ee0c2>:0 at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000c1] in <20c7915d69a7451ba5dddbb52e8ee0c2>:0 at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <20c7915d69a7451ba5dddbb52e8ee0c2>:0 at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <20c7915d69a7451ba5dddbb52e8ee0c2>:0 at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x00009] in <20c7915d69a7451ba5dddbb52e8ee0c2>:0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.44(intptr,intptr,intptr) --- End of inner exception stack trace --- System.MissingMethodException: No constructor found for Telerik.XamarinForms.InputRenderer.Android.Button.ExtendedAndroidButton::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <20c7915d69a7451ba5dddbb52e8ee0c2>:0 at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <20c7915d69a7451ba5dddbb52e8ee0c2>:0 --- End of inner exception stack trace --- Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown. at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown. at java.lang.Error: Java callstack: at md51558244f76c53b6aeda52c8a337f2c37.ButtonRenderer_ButtonClickListener.n_onClick(Native Method) at md51558244f76c53b6aeda52c8a337f2c37.ButtonRenderer_ButtonClickListener.onClick(ButtonRenderer_ButtonClickListener.java:30) at android.view.View.performClick(View.java:6300) at android.view.View$PerformClick.run(View.java:24941) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6639) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:583) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
I need to change the color of a RadButton highlight when it's pressed. It's currently a Grey and I need it to be white. I understand theming, but can't find any documentation on what Color x:key values can be set for the RadButton.
Any help will be greatly appreciated.
I just upgraded from Windows 10 version 1803 to version 1809 on my development machine, because my Xamarin app was crashing on machines with 1809. Sure enough, after upgrading, Visual Studio would build the app but crash immediately with a XAML Uncaught Exception error and give me no information to go on.
After isolating various bits of code, I found the culprit to be any ContentView with a RadButton in it. If I comment out all of the RadButtons, the code works fine as it did in version 1803 (minus any buttons :-/ ).
Does anybody have any ideas about why this would be happening and/or a workaround other than replacing all my RadButtons?
Hello
Currently I am using the Telerik for Xamarin Radbutton in my app. The buttons should be presented within a grid with rounded corners, an image and text. When I define the grid rows with dynamic height, the Radbuttons scale accordingly. However the icons within the button do not. Now I have to define the icons with specific width and height so that they fit nicely. Is it possible to let the icon scale?
Also a lot of attributes don't work like HeightRequest, WidthRequest, Padding...Any idea how I can make this work?
This is the code I use:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
prism:ViewModelLocator.AutowireViewModel="True"
x:Class="PureToneModule.Views.SelectListeningDevice"
xmlns:trans="clr-namespace:PureToneModule.Localization"
xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
Title="{trans:Translate SelectListeningDevice_Title}" ControlTemplate="{StaticResource PageTemplate1}" NavigationPage.BackButtonTitle="">
<Grid Margin="15,0,15,0">
<Grid.RowDefinitions>
<RowDefinition Height="70" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="70" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="{trans:Translate SelectListeningDevice_Top}" Style="{StaticResource LabelHeaderStyle}" />
<Label Grid.Row="1" Text="{trans:Translate SelectListeningDevice_Text}" LineBreakMode="WordWrap"
HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Style="{StaticResource LabelDescriptionStyle}" />
<telerikInput:RadButton Grid.Row="2" Text="{trans:Translate SelectListeningDevice_HeadPhone}" Command="{Binding SelectHeadPhoneCommand}"
Image="headphone.png" Style="{StaticResource RoundButtonStyle}" />
<telerikInput:RadButton Grid.Row="3" Text="{trans:Translate SelectListeningDevice_EarBuds}" Command="{Binding SelectEarBudsCommand}"
Image="earbuds.png" Style="{StaticResource RoundButtonStyle}" />
<Label Grid.Row="4" Text="{trans:Translate SelectListeningDevice_Explanation}" Style="{StaticResource LabelExplanationStyle}" />
</Grid>
</ContentPage>
The button style is:
<Style x:Key="RoundButtonStyle" TargetType="telerikInput:RadButton">
<Setter Property="BackgroundColor" Value="#CCFFFFFF" />
<Setter Property="CornerRadius" Value="10" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="TextColor" Value="{StaticResource OrangeColor}" />
</Style>
Kind regards
Luc