Styles defined in Resource Dictionary are not accessable through ContentView.Resources in Telerik login screen

2 posts, 0 answers
  1. Sreekumary
    Sreekumary avatar
    1 posts
    Member since:
    Jul 2019

    Posted 06 Aug 2019 Link to this post



    I am new to Xamarin forms. I created a project and add a Telerik login screen to the project. I am facing some issues

        I have a Login xaml page ,here I have text fields like username and password and some social image icons .There is another  page for styling these login screen named Styles.xaml and it has some styles, these styles are declared using Resource Dictionary. I try to access these styles using  <ResourceDictionary Source="Styles.xaml" />. But the problem is , these styles are not visible. Text field and image icons are not visible.

    Please get me a solution. I researched lot


    My code samples are here:

    Login.xaml,styles.xaml  and design page are attached bleow. Please find these



  2. Lance | Team Lead - US DevTools Support
    Lance | Team Lead - US DevTools Support avatar
    1066 posts

    Posted 06 Aug 2019 Link to this post

    Hello Sreekumary,

    This looks like a Visual Studio designer issue. Can you compile and deploy it to confirm that the styles are respected at runtime?

    Generally speaking, the Xamarin.Forms designer is unreliable (I personally always have it disabled). Microsoft has been working on it, but it's not like WPF or UWP. They are releasing a new tool call Hot Reload that will make designing Xamarin.Forms app easier because it support native controls 100% (but it's not RTM yet).

    If the control is a native control, it won't work in the designer because it requires the native platform to compile and render it via the platform renderer (many of our controls are native controls). Though if the control is a SkiaSharp-based control, then it will sometimes work in the designer assuming all resources are built.

    This brings me to the MergedResources part of the XAML, I'm not sure that the designer is properly merging the ResourceDictionaries at design time, thus leads to what you're seeing.

    Let me know how it goes after you compile and deploy the project.

    Lance | Technical Support Engineer, Principal
    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
Back to Top