silverlight - Content of ContentControl in Resource -
i have contentcontrol in radtileview. if put in hard coded text content property works fine. (code below)
<contentcontrol grid.row="2" grid.column="0" content="hello world"></contentcontrol>
that works...if put content usercontrol.resources section application freezes , displays nothing.
<contentcontrol grid.row="2" grid.column="0" content="{staticresource tabcontrolcontent}"></contentcontrol> <usercontrol.resources> <textblock x:key="tabcontrolcontent" text="hello world"></textblock> </usercontrol.resources>
ultimately have context radtabcontrol..but id settle on having textblock render.
to string contentcontrol would, add
xmlns:sys="clr-namespace:system;assembly=mscorlib"
to usings. add this
<usercontrol.resources> <sys:string x:key="singlestring">hello world</sys:string> </usercontrol.resources>
which allow
<contentcontrol content="{binding source={staticresource singlestring}}"/>
hope helps.
Comments
Post a Comment