Skip to main content

Microsoft Silverlight

Answered Question Images appearing different in Blend than in SilverlightRSS Feed

(0)

phloxicon
phloxicon

Member

Member

16 points

5 Posts

Images appearing different in Blend than in Silverlight

I've made lots of XAML files in Blend and I put them into my VS project. Some aren't even visible at all (though width, height and all visibility attributes are set normally). Lots of XAML files are working as they should so I didn't notice this error until now. Here are some examples of how it's messing them up:

 

 

In Blend: 

In Visual Studio and Silverlight:

 

 

 

In Blend:

In VS and SL:

 

 

 

In Blend:

In VS and SL:

 I should say that I haven't altered any of their XAML or attributes via code. I've left them exactly as they came in. Any ideas?

 

 

P.S. Also, an unrelated question but I don't want to make too many new posts, is there any way to change the colour of these XAML things programmatically? e.g. change of the ellipse colour from black to yellow or green (without making a new XAML file). I can change the opacity but is there a way to change the colour. 

 All replies appricated :)
 

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Images appearing different in Blend than in Silverlight

I guess you are just design some graphics in Blend and copy the code into the VS / Silverlight.

But it is not a good way to do so, coz the alignment may affect the graphic.

You should open the project with Blend and save it. That means VS and Blend are sharing the same project, so it makes sure everything go well.

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Re: Images appearing different in Blend than in Silverlight

Oh, Miss the question at the last

you can do this

your_item.Color = new SolidColorBrush(Colors.Black);

 

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: Images appearing different in Blend than in Silverlight

In addition to the other good comments here, make sure you are using Blend 2.5 (assuming you are using Silverlight 2) and that you are working with a Silverlight template.

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

phloxicon
phloxicon

Member

Member

16 points

5 Posts

Answered Question

Re: Images appearing different in Blend than in Silverlight

Using Blend 2.5, Silverlight 2, started from project and did that Blend deal that Steve mentioned but this still happened. I didn't paste the code as you suspected. On the bright side, I found a solution. For any of you boppers out there who come across this post in a future search, I took one of the XAML that displayed correctly and copied and pasted the ellipses etc. from one "broken" Blend object into one of the "working" objects and then saved it under a different name. It's a solution without any elegance or learning at all but it works.

 Thanks for your help guys. It steered me in the right direction. :)
 

 

SteveWong
SteveWong

Contributor

Contributor

6343 points

1,281 Posts

Re: Re: Images appearing different in Blend than in Silverlight

As long as you work out the solution, I just wonder why there is difference between editing the silverlight in your computer and me...

Are there problems with the Blend? Or just some minor ones?

Regards,
SteveWong (HongKong)
Please mark post as answer if they help you

Client App Dev
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities