none
Can we specify the sequence in which properties are to be set while instantiating a Xaml control? RRS feed

  • General discussion

  • Iam creating a custom control that has two dependency properties say "ItemsContainer" and "SelectedValue"...

    the xaml reperesentation will be

    <vs:CustomList Name="TestList" ItemsContainer={Binding Path=Presentation.Item} SelectedValue={Binding Path=Container.Value} />

    In this control we use the ItemsContainer to create the List and the selectedvalue will be used to selected an item in the list...

    During binding i need the ItemsContainer to be set before setting the SelectedValue so that the list can be created...

    I find that the SelectedValue property of the control is set first and then the ItemsContainer property tiggered...

    In what sequence the xaml properties are set while loading a xaml control? Is there a way to specify the sequence in which property bind should happen when loading a xaml control?
    • Changed type Jim Zhou - MSFT Monday, August 31, 2009 9:09 AM customer does not provide feedback
    Tuesday, August 25, 2009 2:13 PM

All replies

  • Hi,

    Could you  please simplify a ready-to-run example for us to repro? So as to we can have a clear idea abour your concrete scenario and provide solution to the particular cases.
    Thanks.


    Jim Zhou -MSFT
    Wednesday, August 26, 2009 11:48 AM
  •  
    We are changing the issue type to “Comment” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to "Question” by clicking the "Options" link at the top of your post, and selecting "Change Type" menu item from the pop menu. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.
     
    Thank you!

    Jim Zhou -MSFT
    Monday, August 31, 2009 9:09 AM