question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS Stylesheet doesn't automatically reload when included in App.xaml

See original GitHub issue

Using the sample app, if we move the StyleSheet reference from the page*.xaml files into the App.xaml file, changes to the CSS do are not reloaded.

To replicate, on a Windows Android Simulator, I loaded the sample app, navigated to Thanos, then changed the .TeamLabel color and saved. Notice the color does not change.

If I hit the back button. Then tap on Thanos again, the color change is now visible.


Remove line from Pages xaml files:

<StyleSheet Source="../Assets/styles.css" />

App.xaml file:

<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.HotReload.Sample.App">
    <Application.Resources>
        <StyleSheet Source="Assets/styles.css" />
        <ResourceDictionary>
            <Color x:Key="CellTitleColor">White</Color>
        </ResourceDictionary>
    </Application.Resources>
</Application>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AndreiMisiukevichcommented, Jun 2, 2019

v.1.3.0

1reaction
AndreiMisiukevichcommented, May 31, 2019

Hey guys, I found the reason, I think

It will be fixed and delivered soon (I hope on this weekend)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stylesheet not updating when I refresh my site - css
If your site is not live yet, and you just want to update the stylesheet at your pleased intervals, then use this: Ctrl...
Read more >
Styling Xamarin.Forms Apps using Cascading Style Sheets ...
Xamarin.Forms supports styling visual elements using Cascading Style Sheets (CSS).
Read more >
How do I get visual studio 2019 to reload CSS files when ...
When I run the site in the built-in IIS, the CSS does not appear to reload. I have set the build actions on...
Read more >
Troubleshooting XAML Hot Reload - Visual Studio
If you don't see the in-app toolbar, then select Debug > Options > XAML Hot Reload from the Visual Studio menu bar. Next,...
Read more >
How to force CSS to reload using RadStyleSheetManager?
This is to force browsers to reload CSS instead of using cached versions. ... I make a change to CSS included via the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found