data binding - Silverlight DataBinding Against CLR Objects in Blend -
I like the feature in blend, where you can create a database for CLR objects, and your Silverlight control / page Can design. My problem is around the creation of a user control that will be used as a datatappleplate. It all works great in Blend, but only at design time. The point is that when I'm editing control in Blend, and I call a text box for the property of a CLR object, then it gives me:
text = "{binding Mode = oneway, path = TestAccount.Name, source = {StaticResource TestDataDS}} " But when I'm ready to run the app, and use that user control for that data box To do is called a list box, how can I use Nifty
I'm ready to run the project, so do not have to touch / search and replace all these dams? I am looking for an approach that will work both at design time and run time.
Thanks,
To create binding data for CLR objects in Expression Blend , You do not need to use the "Datafield" tab in the "Create Data Binding" dialog. In fact, doing this is very rare.
The most common way to use custom path expressions is to simply check the "Use a custom path expression" check box and then type in the name of the property that you want to bind. If you do not specify data references, the data binding that you specify on any object will be fixed as a datacontax.
If you want to set the design time DataContext, you can do this by de-setting: Datacentext property, make sure to properly define XML: d = "..."
Comments
Post a Comment