Skip to main content
Home Forums General Silverlight Getting Started Images appearing different in Blend than in Silverlight
5 replies. Latest Post by SteveWong on May 30, 2008.
(0)
phloxicon
Member
16 points
5 Posts
05-28-2008 7:21 PM |
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 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
Contributor
6343 points
1,281 Posts
05-29-2008 9:36 AM |
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.
05-29-2008 9:43 AM |
Oh, Miss the question at the last
you can do this
your_item.Color = new SolidColorBrush(Colors.Black);
Psychlis...
6040 points
973 Posts
05-29-2008 11:16 AM |
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
05-29-2008 1:17 PM |
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. :)
05-30-2008 2:30 AM |
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?