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

Comments

Projects
None yet
3 participants
@DanielAHill
Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Owner

commented May 28, 2019

@ionixjunior thank you for GIF

I will check

@AndreiMisiukevich AndreiMisiukevich added p/medium and removed p/low labels May 28, 2019

@AndreiMisiukevich

This comment has been minimized.

Copy link
Owner

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 AndreiMisiukevich added p/high and removed p/medium labels May 31, 2019

AndreiMisiukevich added a commit that referenced this issue Jun 1, 2019

@AndreiMisiukevich

This comment has been minimized.

Copy link
Owner

commented Jun 2, 2019

v.1.3.0

@ionixjunior

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.