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

[Bug] Move color to local resource always wraps in a new ResourceDictionary #273

Closed
davidortinau opened this issue Jul 18, 2020 · 3 comments
Assignees
Labels
Bug A defect in MFractor.

Comments

@davidortinau
Copy link

I moved LinearGradientBrushs into the ContentPage.Resources dictionary and then used refactoring to extract the colors into resources.

This is what I got (RDs multiplying like rabbits):

Screen Shot 2020-07-18 at 10 41 06 AM

This is what I expected:

<ContentPage.Resources>
        <Color x:Key="DarkBlue">#0091FF</Color>
        <Color x:Key="LightBlue">#32C5FF</Color>
        <LinearGradientBrush x:Key="BlueGradient" StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="{StaticResource DarkBlue}" Offset="0.0"/>
            <GradientStop Color="{StaticResource LightBlue}" Offset="1.0"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="GreenGradient" StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="#6DD400" Offset="0.0"/>
            <GradientStop Color="#44D7B6" Offset="1.0"/>
        </LinearGradientBrush>
    </ContentPage.Resources>
@matthewrdev matthewrdev added the Bug A defect in MFractor. label Jul 18, 2020
@matthewrdev matthewrdev self-assigned this Jul 18, 2020
@matthewrdev
Copy link
Contributor

matthewrdev commented Jul 18, 2020

@davidortinau Can I confirm if this is occurring on Visual Studio Mac or Windows?

@matthewrdev
Copy link
Contributor

@davidortinau This was caused by a silly logic bug where the InsertResourceEntry code generator used the file on disk rather than the text buffer to perform the resource insertion.

This has been fixed and will be available in MFractor 4.2.11.

@matthewrdev
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A defect in MFractor.
Projects
None yet
Development

No branches or pull requests

2 participants