Rendering a UI using IValueConverter using just c# code

后端 未结 1 1218
清酒与你
清酒与你 2020-12-18 11:48

I am c# and silverlight-5 beginner.

First i had to create object by deserializing an xml string. I have done that succesfully but now my next step

1条回答
  •  一个人的身影
    2020-12-18 12:31

    You could use Implicit Data Types for this.

    In your xaml you define a template for a certain datatype:

    
            
                
                
                
            
    
    

    You better create different types depending on the type-element value. Another solution is to create a large template for the type Parameter, and show the appropriate elements depending on what the Parameter-type contains. But I wouldn't recommend this approach.

    Then you can use an ItemsControl to display all parameters:

    
    

    The different parameters will be rendered in different ways depending on what type it has.

    0 讨论(0)
提交回复
热议问题