This is a migrated thread and some comments may be shown as answers.

SlideDrawer working in Android but not in iOS Simulator

3 Answers 85 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 17 Feb 2018, 08:55 PM

I snagged the sample sideDrawer from the github repo with all the xamarin.forms samples for telerik and have been able to get the sideDrawer working pretty nicely in Android (physical device + vysor) but when I try and run my app in iOS I get the following error:

 

Unhandled Exception:

Xamarin.Forms.Xaml.XamlParseException: Position 158:38. Type telerikListView:ListViewItemStyle not found in xmlns clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls

 

heres were i snagged the code:

https://github.com/telerik/telerik-xamarin-forms-samples/tree/master/QSF

The QSF folders...

3 Answers, 1 is accepted

Sort by
0
Lance | Senior Manager Technical Support
Telerik team
answered on 19 Feb 2018, 06:07 PM
Hi Mark,

When using custom controls in Xamarin.Forms that reside in external assemblies on iOS, you need to give the control an x:Name or enable XAML Compilation. Otherwise the iOS Linker will not include the dependent code.

If it is not included by the Linker, then you'll get a runtime XamlParseException like you're seeing. Since you just copied out the code form the demo, this is likely what happened.

To fix it, enable XamlC for your project:

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace YourAppNamespace
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
        }
    }
}


If you have any further issues, please open a support ticket here and include the code you're using so that we can investigate further.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mark
Top achievements
Rank 1
answered on 20 Feb 2018, 07:46 AM

it worked but only after i did the following:

cleaned solution

rebuilt solution (still had build errors)

unloaded android/ios/uwp apps leaving just the XAML app...

rebuilt...still got build errors...something relating to using the <OnPlatform> type argument to set the FontSize property of a few <Label> controls. Once those removed. the XAML app builds.

reloaded android. built...success

reloaded ios built....success...

 

super weird.

0
Lance | Senior Manager Technical Support
Telerik team
answered on 20 Feb 2018, 03:17 PM
Hi Mark,

Visual Studio and Xamarin is known to have quirks like this, there is also an issue that happens from time to time where the PCL project's assembly doesn't get updated when you make changes.

This leads to maddening behavior where you know you just made changes to the PCL but they're not appearing in the deployed project or you're seeing an exception that you know you just fixed.

The best way to eliminate this when it starts happening is to clean/rebuild the PCL project first, then do a clean/rebuild on the platform target project (don't rely on solution "rebuild all"). The Visual Studio team is aware of this and state that they're working on it.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
SideDrawer
Asked by
Mark
Top achievements
Rank 1
Answers by
Lance | Senior Manager Technical Support
Telerik team
Mark
Top achievements
Rank 1
Share this question
or