Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Just need a little help with something... #85

Closed
wh1337 opened this issue Feb 10, 2016 · 3 comments
Closed

Just need a little help with something... #85

wh1337 opened this issue Feb 10, 2016 · 3 comments

Comments

@wh1337
Copy link

wh1337 commented Feb 10, 2016

So I'm trying to implement some new features that I found in the excellent update recently.

I'm trying to implement the adding of a new theme using the 'love' on as a test. Bellow is my complete code for the ResourceDictionary. I've tried it like this <ImageBrush Opacity=".1" ImageSource="/Assets/background.love.jpg" Stretch="UniformToFill" />

and like this <ImageBrush Opacity=".1" ImageSource="/CTaCInformationSystem;component/Assets/background.love.jpg" Stretch="UniformToFill" />

both give me this error: Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension during the AppearanceManager.Current.ThemeSource = value.Source; method that is called on line 148 of the AppereanceViewModel.cs. The error put's it right at the Opacity='.1' in the code below.

The images is located in the Assets/background.love.jpg section in the source code.

Any ideas on how to fix this?

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mui="http://firstfloorsoftware.com/ModernUI">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.Dark.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Color x:Key="AccentColor">#e51400</Color>

    <!-- background image taken from http://good-wallpapers.com/ -->
    <Rectangle x:Key="WindowBackgroundContent" x:Shared="false">
        <Rectangle.Fill>
            <ImageBrush Opacity=".1" ImageSource="/CTaCInformationSystem;component/Assets/background.love.jpg" Stretch="UniformToFill" />
        </Rectangle.Fill>
    </Rectangle>

</ResourceDictionary>```



@wh1337
Copy link
Author

wh1337 commented Feb 10, 2016

Found the issue. Needed to set the property of the image to Copy Always in the output directory for the Properties. Wow....that's what you get for self teaching c# 📦

@sylveon
Copy link

sylveon commented Feb 10, 2016

Got in the same issue more than once when making themes >_<

@kozw
Copy link
Contributor

kozw commented Feb 10, 2016

Thanks for sharing the solution

@kozw kozw closed this as completed Feb 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants