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] Including a StyleSheet throws an error on reload #3

Closed
davidortinau opened this issue Sep 22, 2018 · 1 comment
Closed

[CSS] Including a StyleSheet throws an error on reload #3

davidortinau opened this issue Sep 22, 2018 · 1 comment

Comments

@davidortinau
Copy link
Contributor

Including a CSS file works on the initial run.

Global.css (EmbeddedResource):

.superLabel {
    color: black;
    background-color: transparent;
    font-size: 64;
}
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:XAMLator.SampleApp"
             x:Class="XAMLator.SampleApp.MainPage">
    
    <ContentPage.Resources>
        <StyleSheet Source="/Global.css"/>
    </ContentPage.Resources>
    
    <StackLayout>
        <!-- Place new controls here -->
        <Label Text="This is my page!"
           TextColor="White"    
           HorizontalOptions="Center"
           BackgroundColor = "Red"
           class="superLabel"
           VerticalOptions="CenterAndExpand" />
    </StackLayout>
</ContentPage>

screenshot 2018-09-22 09 36 21

However upon hitting save and triggering a reload, XAMLator throws an eval error.

screenshot 2018-09-22 09 38 54

@ylatuya
Copy link
Owner

ylatuya commented Nov 3, 2018

Fixed in #10

@ylatuya ylatuya closed this as completed Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants