Telerik Forums
UI for Xamarin Forum
12 answers
118 views
The RadAutoCompleteView object does not contain an event handler for the keyboard return coming from the keyboard (i.e. base entry).
Didi
Telerik team
 answered on 21 Jan 2019
1 answer
470 views

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

Didi
Telerik team
 answered on 21 Jan 2019
2 answers
256 views
Is there a way to add text beside a checkbox, or do I have to use a separate label?
Richard
Top achievements
Rank 1
 answered on 17 Jan 2019
1 answer
139 views

This is a screenshot of my ListView:

https://www.dropbox.com/s/zlqfr3tociidfix/RadListViewSpacing.png?dl=0

This is using a ListViewLinearLayout with Orientation=Horizontal and HorizontalItemSpacing=6.  I am using Telerik.UI.for.Xamarin v2018.3.1122.3 and this is in UWP (I have not tested iOS or Android yet).

There are a few problems here:  

Firstly the spacing is double what it should be.  It's easiest to see on the central selected item.  Here there is 3 pixels of grey, then 6 pixels of white and the 3 more pixels of grey for 12 pixels of spacing.  Note that if I change HorizontalItemSpacing both the grey and white sections scale with it (if I set it to 0, there is no gap at all between the items).  There is also clearly spacing on the left of the leftmost item.  I guess the spacing is being applied on each side of each item.  This is different to how spacing works on any of the standard Xamarin.Forms controls (it applies between items only, not that the beginning and end) so is highly unintuitive.  It also means you cannot line anything up with the left of the ListView and having spacing between items which is highly annoying.

The second issue is the grey sections.  I assume this comes from ItemStyle.BackgroundColor but in this case you can see that the SelectedItemStyle.BackgroundColor (the blue bit) does not cover the same space.  These are the 2 styles I'm using for ItemStyle and SelectedItemStyle:

<listView:ListViewItemStyle x:Key="TileItemStyle"
    BorderLocation="Left"
    BorderWidth="2"
    BorderColor="{StaticResource AppIndigo}"
    BackgroundColor="{StaticResource AppGrey}"/>
<listView:ListViewItemStyle x:Key="SelectedTileItemStyle"
    BorderLocation="None"
    BorderWidth="0"
    BackgroundColor="{StaticResource AppBlue}"/>

(note the reason the left border is still present on the selected item in the screenshot is that it's present in the ItemTemplate too and I forgot to remove it!).

 

I'm really just trying to get a handle on what behaviour is intended,what, if anything, is a bug, and if there are any workarounds to these issues?

Didi
Telerik team
 answered on 17 Jan 2019
2 answers
137 views

I am trying to implement a form that has a textbox. The textbox needs to have multi-line enabled. Using an example I have found from another thread on here I have managed to get this working on iOS but am struggling to get it to work on Android.

 

In the shared project I have added the following code to the form.

 

this.viewModel = new ViewModel();
this.BindingContext = this.viewModel ;

dataForm.RegisterEditor("MessageToSend", EditorType.Custom);
dataForm.Source = this.viewModel.Model;

 

Then in the Android project I have added the following code to MainActivity.cs

 

[assembly: ExportRenderer(typeof(RadDataForm), typeof(CustomDataFormRenderer))]
namespace Droid

{

  public class CustomDataFormRenderer : DataFormRenderer
    {
        public CustomDataFormRenderer(Context context) : base(context)
        {
        }

        protected override EntityPropertyEditor GetCustomEditorForProperty(RadDataForm form,
            IEntityProperty nativeProperty, Telerik.XamarinForms.Input.DataForm.IEntityProperty property)
        {
            if (property.PropertyName == "MessageToSend")
            {
                return  new DataFormMultilineTextEditor(form, nativeProperty);
            }
            return base.GetCustomEditorForProperty(form, nativeProperty, property);
        }
     }

}

 

If I place a breakpoint in the method GetCustomEditorForProperty() it never gets executed whch would seem to suggest that the custom editor is not configured correctly. But then it works perfectly on iOS, so it must be configured. 

 

 

 

 

Dominic
Top achievements
Rank 1
 answered on 16 Jan 2019
2 answers
129 views
Button clicked event  property doesn't work inside Slideview.
Nethra
Top achievements
Rank 1
 answered on 15 Jan 2019
9 answers
177 views

How do I change which timespan the day view is showing when it is opened?

I would like it to scroll to the current time when opened, instead of staying at the minimum time for that day.

Also, has anyone implemented a line showing the current time?

Yana
Telerik team
 answered on 15 Jan 2019
2 answers
93 views

Bug?

See attached gif video

Newst Xamarin, Newest Telerik

 

When the Calendar control is in Month view, I wish to switch to Day view when a date is selected.

The view changes, but the Day view doesn't scroll to the selected date

If I am at January 10th (Month View), then go to March 30th (Day view), the Day view shows March, but shows the week containing the 10th , not the 30th

My RadCalendar is bound to a model.

 

<input:RadCalendar x:Name="calendar" SelectedDate="{Binding SelectedDate, Mode=TwoWay}"

 

In the code behind I do this.

private void Calendar_OnSelectionChanged(object sender, ValueChangedEventArgs<object> e)
{
    if (calendar.ViewMode == CalendarViewMode.Month)
    {
        calendar.TrySetViewMode(CalendarViewMode.Day);
        Model.SelectedDate = (DateTime) e.NewValue;
    }
}
Yana
Telerik team
 answered on 15 Jan 2019
6 answers
121 views

hi,

i am opening week view calendar from month view calendar cell tap event, both in two content pages. selected date in month view set to display date and selected date in week view calendar. same code work perfectly in android not in iOS.

1) how to fix navigation in iOS calendar ?

2) In my current project if i load appointments into week view calendar item source selected date highlighting also disappear. you can check my question in following link. (https://www.telerik.com/forums/selected-cell-does-not-keep-the-circle#YS2gCVT0Zked-0r8Twv0FQ)

i have a sample project don't know how to attach it

Yana
Telerik team
 answered on 15 Jan 2019
2 answers
414 views

In a Xamarin.Forms UWP project, I have a dark background color on my page. I've used the following code for a username entry:

<telerikInput:RadEntry x:Name="UsernameEntry" WidthRequest="100" BorderStyle="{StaticResource EntryBorderStyle}" TextColor="White" BackgroundColor="Transparent" FontSize="30" Focused="IsFocus"/>

When I focus on the entry to type, the typed characters are black, and when unfocused, they turn to white. I want them to always be white, as the black is hard to read against the background color.

I tried the following:

public void IsFocus(object sender, EventArgs e)
       {
           var obj = (Telerik.XamarinForms.Input.RadEntry)sender;
           obj.TextColor = Color.White;

     }

 

.. but this seems to have no effect either. Any suggestions on how I can keep the focused and unfocused TextColor consistent?

 

 

 

John
Top achievements
Rank 1
 answered on 14 Jan 2019
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?