Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DanielAHill opened this issue May 24, 2019 · 5 comments
Closed

Comments

@DanielAHill
Copy link

@DanielAHill DanielAHill commented May 24, 2019

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>
@ionixjunior
Copy link

@ionixjunior ionixjunior commented May 28, 2019

This problem occurs with any resources located in App.xaml.

I added a new color and tried referencing it in the page and the problem occurs.

hotreload_issue

@AndreiMisiukevich
Copy link
Owner

@AndreiMisiukevich AndreiMisiukevich commented May 28, 2019

@ionixjunior thank you for GIF

I will check

@AndreiMisiukevich
Copy link
Owner

@AndreiMisiukevich AndreiMisiukevich commented May 31, 2019

Hey guys, I found the reason, I think

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

@AndreiMisiukevich
Copy link
Owner

@AndreiMisiukevich AndreiMisiukevich commented Jun 2, 2019

v.1.3.0

@ionixjunior
Copy link

@ionixjunior ionixjunior commented Jun 3, 2019

Works perfectly! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants