<class> does not contain a definition for <property>
hi,
i tried question earlier , did not response, trying again still stuck!
i have collection of string values binding textblocks in silverlight project. string values showing fine when run project. however, added string:
link ="some more stuff"
and blend 3 throws error, says:
'olympicmediacomponentone.storyinfo' not contain definition 'link'
here code snippet:
in mainpage.xaml.cs:
namespace olympicmediacomponentone{
public partial class mainpage : usercontrol{
private list<storyinfo> stories;private storyinfo selectedstory;public mainpage()
{
// required initialize variablesinitializecomponent();
stories = new list<storyinfo>();stories.add(
new storyinfo() { headline = "us gold haul", body = "speed skating becomes sensation @ winter olympics pick 7 gold medals in 4 days.", link = "play video", image = new bitmapimage(new uri("images/1lg.png", urikind.relative)) });imagelistbox.itemssource = stories;
detailspanel.itemssource = stories;
transitiondetails.itemssource = stories;
in detailpage.xaml have this:
<stackpanel orientation="vertical" uselayoutrounding="true" margin="0" d:layoutoverrides="horizontalmargin" horizontalalignment="left" verticalalignment="top" width="216" minheight="75">
<grid>
<textblock x:name="detailsheadlinecrossfade" foreground="white" fontfamily="arial" fontsize="12" margin="8,6,4,0" textwrapping="wrap" fontweight="bold" />
<textblock x:name="detailsheadline" text="{binding headline, mode=oneway}" foreground="white" fontfamily="arial" fontsize="12" margin="8,6,4,0" textwrapping="wrap" fontweight="bold" />
</grid>
<grid margin="0,0,0,11">
<textblock x:name="detailsbodycrossfade" foreground="white" fontfamily="arial" fontsize="10.667" margin="8,4,4,0" textwrapping="wrap" />
<textblock x:name="detailsbody" text="{binding body, mode=oneway}" foreground="white" fontfamily="arial" fontsize="10.667" lineheight="13" margin="8,4,8,0" textwrapping="wrap" />
</grid>
<grid>
<textblock x:name="detailslinkcrossfade" foreground="white" fontfamily="arial" fontsize="10.667" margin="8,4,8,0" textwrapping="wrap" />
<textblock x:name="detailslink" text="{binding link, mode=oneway}" margin="8,0,0,0" fontfamily="arial" fontsize="10.667" foreground="white" textwrapping="wrap"/>
</grid>
</stackpanel>
can tell me how srting value recognized blend?
thanks in advance.
i found error, public string declaration in storyinfo() class missing set; cmd.
Silverlight > Programming Silverlight with .NET – General
Comments
Post a Comment