Telerik Forums
UI for Xamarin Forum
3 answers
236 views

I tried installing UI for Xamarin using both Telerik_UI_for_Xamarin_2018_2_620_2_Trial.msi and TelerikUIForXamarinSetup.exe.

But my Xamarin installation is not getting detected.

Here are the info on my VS2017 installation:

Microsoft Visual Studio Community 2017 
Version 15.7.3
VisualStudio.15.Release/15.7.3+27703.2026
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Community

C# Tools   2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Merq   1.1.19-rc (a4ffc1b)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Mono Debugging for Visual Studio   4.10.5-pre (ab58725)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

Visual Basic Tools   2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.1 for F# 4.1   15.7.0.0.  Commit Hash: 2527e6829ecdc8281ee60d83be8cfd0fa720a648.
Microsoft Visual F# Tools 10.1 for F# 4.1

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   4.10.10.1 (f1760154c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   4.12.1 (f3257e429)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK   8.3.3.2 (HEAD/dffc59120)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   11.12.0.4 (64fece5)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Vesko
Telerik team
 answered on 31 Jul 2018
2 answers
63 views

It seems I need to build using Visual Studio on Mac to get Apple to accept my app. But now Telerik is showing I only have a trial license. I have a Telerik Xamarin UI license, but have no idea what to do on a mac to remove the "Telerik trial" message from my app. Google search does not return any helpful advice.

thanks

Gerry
Top achievements
Rank 1
Veteran
 answered on 30 Jul 2018
1 answer
209 views

I am running Xamarin Forms version 3.1.0.637273. When running InitializeComponent on a page with a RadCartesianChart on. A fatal exception occurs within the Telerik framework during a type conversion of Telerik.XamarinForms.Chart.ChartSelectionBehavior to type Xamarin.Forms.Behavior.

Can anyone else confirm this?

Lance | Senior Manager Technical Support
Telerik team
 answered on 26 Jul 2018
2 answers
177 views

I'm using the calendar control in the master page of a master/detail scenario.When I perform a modal navigation to another page and then navigate back, the calendar crashes with this exception:

"System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.UI.Xaml.Controls.Input.Calendar.XamlHeaderContentLayer.MeasureContent(Object owner, Object content) at Telerik.UI.Xaml.Controls.Input.RadCalendar.Telerik.Core.IElementPresenter.MeasureContent(Object owner, Object content) at Telerik.UI.Xaml.Controls.Input.Calendar.CalendarMonthViewModel.GetCalendarViewRect(RadRect availableRect) at Telerik.UI.Xaml.Controls.Input.Calendar.CalendarMonthViewModel.Upd"

Am I doing something wrong?

Telerik_UI_for_Xamarin 2018.2.620.250
Shared code project targets .NET Standard 2.0
Xamarin Forms 2.5.1.527436
UWP

Here is the relevant code, simplified as much as possible:

MainPage.xaml

<?xml version="1.0" encoding="utf-8" ?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="RadCalendarBug.MasterDetailPage"
             xmlns:pages="clr-namespace:RadCalendarBug"
             x:Name="Self">
     
    <MasterDetailPage.ToolbarItems>
        <ToolbarItem Name="Settings" Order="Primary" Command="{Binding ShowSettingsCommand, Source={x:Reference Name='Self'}}" >
            <ToolbarItem.Icon>
                <OnPlatform x:TypeArguments="FileImageSource">
                    <On Platform="UWP" Value="Resources/Settings.png" />
                </OnPlatform>
            </ToolbarItem.Icon>
        </ToolbarItem>
    </MasterDetailPage.ToolbarItems>
    <MasterDetailPage.Master>
        <pages:MasterPage x:Name="MasterPage" />
    </MasterDetailPage.Master>
    <MasterDetailPage.Detail>
        <NavigationPage>
            <x:Arguments>
                <pages:DetailPage />
            </x:Arguments>
        </NavigationPage>
    </MasterDetailPage.Detail>
</MasterDetailPage>

 

Main.xaml.cs

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
 
namespace RadCalendarBug
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class MasterDetailPage : Xamarin.Forms.MasterDetailPage
    {
        public Command ShowSettingsCommand { private set; get; }
 
        public MasterDetailPage()
        {
            ShowSettingsCommand = new Command(ShowSettings, CanShowSettings);
 
            InitializeComponent();
        }
 
        private bool CanShowSettings(object arg)
        {
            return true;
        }
 
        private void ShowSettings(object obj)
        {
            Navigation.PushModalAsync(new NavigationPage(new Settings()));
        }
    }
}

 

MasterPage.xaml

<?xml version="1.0" encoding="utf-8" ?>
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
             x:Class="RadCalendarBug.MasterPage"
             Title="Master">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="500"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
 
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
 
        <telerikInput:RadCalendar x:Name="calendar" />
        <Label Grid.Row="1" Text="BottomHalf" />
 
    </Grid>
</ContentPage>

 

MasterPage.xaml.cs

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
 
namespace RadCalendarBug
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class MasterPage : ContentPage
    {
        public MasterPage()
        {
            InitializeComponent();
        }
    }
}

 

DetailPage.xaml

<?xml version="1.0" encoding="utf-8" ?>
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="RadCalendarBug.DetailPage"
             Title="Detail">
  <StackLayout Padding="10">
    <Label Text="This is a detail page. "/>
  </StackLayout>
</ContentPage>

 

DetailPage.xaml.cs

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
 
namespace RadCalendarBug
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class DetailPage : ContentPage
    {
        public DetailPage()
        {
            InitializeComponent();
        }
    }
}

 

Settings.xaml

<?xml version="1.0" encoding="utf-8" ?>
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="RadCalendarBug.Settings"
             x:Name="Self">
 
    <ContentPage.ToolbarItems>
        <ToolbarItem Name="Cancel" Order="Default" Command="{Binding CancelCommand, Source={x:Reference Name='Self'}}" Priority="1">
            <ToolbarItem.Icon>
                <OnPlatform x:TypeArguments="FileImageSource">
                    <On Platform="UWP" Value="Resources/Cancel.png" />
                </OnPlatform>
            </ToolbarItem.Icon>
        </ToolbarItem>
    </ContentPage.ToolbarItems>
 
    <ContentPage.Content>
        <StackLayout>
            <Label Text="Welcome to Xamarin.Forms!"
                VerticalOptions="CenterAndExpand"
                HorizontalOptions="CenterAndExpand" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

 

Settings.xaml.cs

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
 
namespace RadCalendarBug
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class Settings : ContentPage
    {
        public Command CancelCommand { private set; get; }
 
        public Settings ()
        {
            CancelCommand = new Command(Cancel, CanCancel);
 
            InitializeComponent();
        }
 
        private bool CanCancel(object arg)
        {
            return true;
        }
 
        private void Cancel(object obj)
        {
            Navigation.PopModalAsync();
        }
    }
}

 

I'm not attaching the icons for the toolbar buttons but they're not really needed. Just click the ... button in the app bar to show the toolbar item text.

From the main page, click ..., then settings to navigate to the settings page. In the settings page, click ... then Cancel to go back. Note the exception.

Any pointers are appreciated.

 

 

Valentin
Top achievements
Rank 1
 answered on 26 Jul 2018
2 answers
7.7K+ views
Hello, I have a RadListView bound to an ObservableCollection inside RadSideDrawer.DrawerContent and my ListView doesn't show the items until the device changes orientation. I'm actually using the Recipes source code provided in the Telerik UI for Xamarin Andriod App but I can't get the list to show the items. The only code that I don't have to fully run the sample would be the code in the OnAppearing override in Example.xaml.cs. Any help would be much appreciated.
Lance | Senior Manager Technical Support
Telerik team
 answered on 25 Jul 2018
9 answers
186 views

Hi,

Recently I added Telerik UI for Xamarin Chart to my Xamarin Forms project. When I compiled my Android project, I received few hundred of XA0106 warning.

Below is my Android project configuration and reference to support library as below,

  • Portable Project as .NetStandard 2.0
  • Xamarin Forms v2.5.0.122203
  • Android Support Libraries v 27.0.2
  • Android Project target framework set to Android Oreo 8.1 (API 27) with minimum version of Android 6.0 (API 23)

As according to here https://docs.telerik.com/devtools/xamarin/installation-and-deployment/required-android-support-libraries my project setup look good. Is there anything I missed out which generated few hundred of XA0106 warning?

 

Regards,

CT

Lance | Senior Manager Technical Support
Telerik team
 answered on 20 Jul 2018
1 answer
171 views

Is there a way to disable scrolling on the xamarin RadDataGrid on iOS? I'm currently showing many "Grid Cards" in a scrollable list view and it's undesirable to be have "double scrolls" on grids that are larger than my card height. 

Android seems to disable scrolling by default but iOS always add some scroll. 

Thanks,

Yana
Telerik team
 answered on 18 Jul 2018
3 answers
311 views

Hi.I get this error when RadDataGrid.ItemSource have 100 or more objects.

On Samsung Galaxy S6 edge = Java.Lang.OutOfMemoryError: Failed to allocate a 463014412 byte allocation with 10286048 free bytes and 241MB until OOM

On Pixel 2 XL ->  error [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.RuntimeException: Canvas: trying to draw too large(346442880bytes) bitmap.

 

This is the code that triggers this error.

Brand new project(.NET)

using System.Collections.Generic;
using Telerik.XamarinForms.DataGrid;
using Xamarin.Forms;

namespace test
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();

            RadDataGrid gridView = new RadDataGrid();

            var data = new List<object>();

            for (int i = 0; i < 100; i++)
            {
                data.Add(new ViewModelData()
                {
                    Data1 = "Data " + i,
                    Data2 = "Data " + i,
                    Data3 = "Data " + i,
                    Data4 = "Data " + i,
                    Data5 = "Data " + i,
                    Data6 = "Data " + i,
                    Data7 = "Data " + i,
                    Data8 = "Data " + i,
                    Data9 = "Data " + i,
                    Data10 = "Data " + i,
                    Data11 = "Data " + i,
                    Data12 = "Data " + i,
                    Data13 = "Data " + i,
                    Data14 = "Data " + i,
                    Data15 = "Data " + i,
                });
            }

            gridView.ItemsSource = data;

             //container is stacklayout and none of his properties are set.

            container.Children.Add(gridView);
        }
    }

    public class ViewModelData
    {
        public string Data1 { get; set; }
        public string Data2 { get; set; }
        public string Data3 { get; set; }
        public string Data4 { get; set; }
        public string Data5 { get; set; }
        public string Data6 { get; set; }
        public string Data7 { get; set; }
        public string Data8 { get; set; }
        public string Data9 { get; set; }
        public string Data10 { get; set; }
        public string Data11 { get; set; }
        public string Data12 { get; set; }
        public string Data13 { get; set; }
        public string Data14 { get; set; }
        public string Data15 { get; set; }
    }
}

//Xaml Code

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:test"
             x:Class="test.MainPage">

        <StackLayout x:Name="container">
            
        </StackLayout>

</ContentPage>

Lance | Senior Manager Technical Support
Telerik team
 answered on 17 Jul 2018
7 answers
304 views

Hello,

 

I have two Control Template in listView (SelectionMode Multiple)
It's possible change control template on click ? 
My problem is that it only changes the first one I select.

C#(Selector)

namespace ProtoDesign.Selector
{
    public class VenteBoxOptionSelector : DataTemplateSelector
    {
        public DataTemplate TemplateDefault { get; set; }
        public DataTemplate TemplateClicked { get; set; }
 
        protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
        {
            if (item != null && (Vente)item != null)
                return ((Vente)item).IsSelected ? TemplateClicked : TemplateDefault;
            return TemplateClicked;
        }
    }
}

 

XAML

<telerikDataControls:RadListView Grid.Column="0" BackgroundColor="{StaticResource WhiteColor}" x:Name="rlv1" SelectionChanged="listView_SelectionChanged" SelectionMode="Multiple">
    <telerikDataControls:RadListView.ItemTemplateSelector>
        <Selector:VenteBoxOptionSelector>
            <Selector:VenteBoxOptionSelector.TemplateDefault>
                <DataTemplate>
                    <telerikListView:ListViewTemplateCell>
                        <telerikListView:ListViewTemplateCell.View>
                            <StackLayout  Orientation="Horizontal">
                                <Label Margin="10" Text="{Binding TxtLabel}" />
                                <Label Margin="10" Text="{Binding IsSelected,Mode=TwoWay}" />
                                <Label Margin="10" Text="Texte séparé grace au StackLayout" />
                            </StackLayout>
                        </telerikListView:ListViewTemplateCell.View>
                    </telerikListView:ListViewTemplateCell>
                </DataTemplate>
            </Selector:VenteBoxOptionSelector.TemplateDefault>
            <Selector:VenteBoxOptionSelector.TemplateClicked>
                <DataTemplate>
                    <telerikListView:ListViewTemplateCell>
                        <telerikListView:ListViewTemplateCell.View>
                            <StackLayout  Orientation="Horizontal">
                                <Label Margin="10" Text="{Binding TxtLabel}" />
                                <Label Margin="10" Text="{Binding IsSelected,Mode=TwoWay}" />
                                <Label Margin="10" Text="Essai en cliquant" />
                            </StackLayout>
                        </telerikListView:ListViewTemplateCell.View>
                    </telerikListView:ListViewTemplateCell>
                </DataTemplate>
            </Selector:VenteBoxOptionSelector.TemplateClicked>
        </Selector:VenteBoxOptionSelector>
    </telerikDataControls:RadListView.ItemTemplateSelector>
</telerikDataControls:RadListView >


XAML.CS

private void listView_SelectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
 
            if ((sender as RadListView).SelectedItems != null && (sender as RadListView).SelectedItems.Count() > 0)
                ((sender as RadListView).SelectedItem as Vente).IsSelected = true;
       }


Cédric
Top achievements
Rank 1
 answered on 17 Jul 2018
3 answers
213 views

this is my XAML, but when I press a little long on button with binding command, the button gray out and froze the app. It also happen with image that has command binding if it's in CellContentTemplate 

<telerikDataGrid:RadDataGrid x:Name="PigDataGrid" ItemsSource="{Binding Measurements}" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="Cell" SelectionChanged="SelectedItem" >
        <telerikDataGrid:RadDataGrid.Columns>
            <telerikDataGrid:DataGridDateColumn PropertyName="MEASUREMENT_DATE" HeaderText="Date"/>
            <telerikDataGrid:DataGridTextColumn PropertyName="PIG_BARREL_TYPE_STRING" HeaderText="Pig"/>
            <telerikDataGrid:DataGridTextColumn PropertyName="PIG_TYPE" HeaderText="Pig Type"/>
            <telerikDataGrid:DataGridTemplateColumn HeaderText="Info">
                <telerikDataGrid:DataGridTemplateColumn.CellContentTemplate>
                    <DataTemplate>
                        <StackLayout Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="Center">
                            <Button Image="info_black.png" BackgroundColor="Transparent" Command="{Binding Path=ButtonCommand, Source={x:Reference PiggingListView}}" CommandParameter="{Binding .}" BorderWidth="0" HeightRequest="25" WidthRequest="25" HorizontalOptions="End" VerticalOptions="Center"/>
                            <Image WidthRequest="25" HeightRequest="25" HorizontalOptions="End">
                                <Image.Style>
                                    <Style TargetType="{x:Type Image}">
                                        <Style.Triggers>
                                            <DataTrigger TargetType="Image" Binding="{Binding IsUploaded}" Value="False">
                                                <Setter Property="Source" Value="clock.png"/>
                                            </DataTrigger>
                                            <DataTrigger TargetType="Image" Binding="{Binding IsUploaded}" Value="True">
                                                <Setter Property="Source" Value="upload.png"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Image.Style>
                            </Image>
                        </StackLayout>
                    </DataTemplate>
                </telerikDataGrid:DataGridTemplateColumn.CellContentTemplate>
            </telerikDataGrid:DataGridTemplateColumn>
            <telerikDataGrid:DataGridTemplateColumn HeaderText="Delete">
                <telerikDataGrid:DataGridTemplateColumn.CellContentTemplate>
                    <DataTemplate>
                        <Button Image="rubbish_bin" BackgroundColor="Transparent" Command="{Binding Path=DeleteCommand, Source={x:Reference PiggingListView}}" CommandParameter="{Binding .}" BorderWidth="0" HeightRequest="25" WidthRequest="25" HorizontalOptions="Center" VerticalOptions="Center"/>
                    </DataTemplate>
                </telerikDataGrid:DataGridTemplateColumn.CellContentTemplate>
            </telerikDataGrid:DataGridTemplateColumn>
        </telerikDataGrid:RadDataGrid.Columns>
    </telerikDataGrid:RadDataGrid>
Didi
Telerik team
 answered on 17 Jul 2018
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?