DCSIMG
C#,Reflection - Alex Golesh's Blog About Silverlight Development

Browse by Tags

All Tags » C# » Reflection (RSS)

Silverlight Quick Tip: Dynamically Updating Class Fields/Properties

In previous post ( here ) I blogged about displaying values of class/control in runtime and displaying them in Visual Studio - like property window. Today I’ll show how to push them back to the class instance. In previous post I’ve stored values in “ObservableCollection<FieldsPropertiesData>” for easy databinding and connected this ListBox control. In order to get user input I’ve created TwoWay databinding in DataTemplate – here is updated data template: < Style TargetType ="local:FiledPropertyData">...

Silverlight Quick Tip: Dynamically Displaying Class Fields/Properties

In one of my projects I had to create something like Visual Studio property window, for data set of different controls/data classes. Those controls/classes are still under development and I needed the way to display/change values of those properties dynamically without even knowing what is inside. For the simple case, let’s assume the following class which holds the data: public class SampleData { public SampleData() { BooleanProperty = false ; } public string StringProperty { get ; set ; } public...