Scott Gu: Silverlight 2 Tutorial Part 6(weblogs.asp.net)

submitted by EtienneTremblayEtienneTremblay(5008) 4 years, 3 months ago

Using User Controls to Implement Master/Detail Scenarios.

2 comments |category: |Views: 91

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by ShavaisShavais(0) 3 years, 6 months ago 0

Hmm.. can't figure out how to add a comment to bottom of the post itself. Looks like it was posted clear back in February, so I guess the comments must be closed.

Anyway, when I went through the tutorial and made my own version of this, I kept getting an error message popping up on start up. AG_E_NETWORK_ERROR. Through a process of elimination, I finally narrowed it down to the thumbnail image in the story details view. Removing that image stops the error. So something about that image is causing it. But the error pops up on start up, the image isn't displayed on start up, and the source for the image is a binding that isn't even used until the details view is displayed. Which doesn't happen on start up. So I couldn't make any sense of it at all, and none of the comments were helpful, and I couldn't find anything helpful in MSDN or on the 'Net anywhere. Something's messed up in the behind-the-scenes initialization.

I downloaded Scott's solution, and found that it wasn't producing the error, that I could see, at first. I spent hours going over his stuff and mine with a fine toothed comb, including exact syntax, usings, references, namespaces, configuration settings and so on and on and so forth, trying to figure out why in hell his program doesn't produce the error and mine does -- and finally found that his program actually DOES produce the error! It's just that his html test page has JavaScript on it that HIDES it! His test page JavaScript traps and eats the error! Ah sheez! ;( And he makes no comment at all about it, and neither does anyone else. Maybe the old version of the automatically generated test page had this JavaScript on it? Maybe the old version of Silverlight didn't have the problem.

Anyway, so. Apparently there is sometimes some enigmatic initialization problem with Silverlight 2.0 RTW and XAML-referenced images with bound sources, under some-various circumstances that are unclear to me. And apparently you can hide them by trapping them on the launching browser page.

Reply

posted by KamshitskiyKamshitskiy(0) 3 years, 6 months ago 0

Hi, Scott.

1. I have got the same problems as mr. Shavais, so many thanks to him for his comments.

2. My second problem is a very strange bihavior of your sample in the next code line (Pade.xaml):

<Digg:StoryDetailsView x:Name="DetailsView" Grid.RowSpan="2" Visibility="Collapsed" />

In the Error List I can see Description:

Unknown attribute Name on element StoryDetailsView. [Line: 227 Position: 39]

If I change the line:

<Digg:StoryDetailsView Grid.RowSpan="2" Visibility="Collapsed" x:Name="DetailsView" />

in the Error List I can see next Description:

Unknown attribute Grid.RowSpan on element StoryDetailsView. [Line: 227 Position: 45]

As I can get there are no any influence of the errors on the sample bihavior. I think it is very strange.
I'd like to get any comments from you for both problems. Thanks in advance.

Reply

information Login or create an account to comment on this story