We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TemplateHostViewRenderer

Thread ID:

Created:

Updated:

Platform:

Replies:

150285 Dec 30,2019 11:43 PM UTC Dec 31,2019 09:06 AM UTC Xamarin.Forms 1
loading
Tags: UI Kit
Mario
Asked On December 30, 2019 11:43 PM UTC

Hello there,

I was wondering why there isn't a TemplateHostViewRenderer for UWP in your EssentialUIKit demo project in github. You guys use a different method to display the respective Template Pages on UWP versus Android and iOS.



The logic is in TemplatePage.xaml.cs

  private void ListView_OnSelectionChanged(object sender, SelectedItemChangedEventArgs e)
        {
            if (e.SelectedItem == null || this.isNavigationInQueue)
            {
                return;
            }

            this.isNavigationInQueue = true;

            if (Device.RuntimePlatform == "UWP")
            {
                var assembly = typeof(App).GetTypeInfo().Assembly;
                Navigation.PushAsync((Page)Activator.CreateInstance(
                    assembly.GetType($"EssentialUIKit.{((Template)e.SelectedItem).PageName}")));
            }
            else
            {
                Navigation.PushAsync(new TemplateHostPage(e.SelectedItem as Template));
            }
        }

I actually wanted to run everything through the TemplateHostPage and get the same effect as on Andoird and iOS with the navigational items. 
Is it possible to write a TemplateHostViewRenderer for UWP?

Yuvaraj Palanisamy [Syncfusion]
Replied On December 31, 2019 09:06 AM UTC

Hi Mario, 
  
Thanks for contacting Syncfusion support. 
  
We have already implemented the TemplateHostViewRenderer support in Essential UI Kit UWP project and this will be included our upcoming release in GitHub repository. 
  
As of now, you can add the below file (TemplateHostViewRenderer.cs) manually in UWP project of your application to use this renderer. 
  
  
Once you have added the above file in your application, please use the below code for navigation. 

 
Navigation.PushAsync(new AppLayout.Views.TemplateHostPage(new Views.Forms.SignUpPage())); 
 
 

Please let us know if you have any concerns. 
  
Regards, 
Yuvaraj 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon