Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Background Image is not set, gives error

'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '18' and line position '14'.


My code is like

XML
<Grid>
        <Grid.Background>
            <ImageBrush ImageSource="Logo.PNG" Stretch="Fill">
            </ImageBrush >
        </Grid.Background>
        <TextBlock>Hello this is just simple text within grid</TextBlock>
    </Grid>



I google and found answer saying close VS and restart it solve problem
but it doesn't work

what could be problem ?

Thanks in advance

Edit

@Kassor , Yes I am using XP SP3 but there is no key
there is something like this under PersistentHandler "{098f2470-bae0-11cd-b579-08002b30bfeb}"
Posted
Updated 18-Jan-11 2:48am
v3

1 solution

What operating system do you use?

if it is XP SP3 then
check the HKEY_CLASSES_ROOT\.png key in your registry.
 
Share this answer
 
Comments
Khaniya 18-Jan-11 8:46am    
@Kassar , Yes I am using XP SP3 but there is no key
there is something like this under PersistentHandler "{098f2470-bae0-11cd-b579-08002b30bfeb}"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900