AttachmentEditor control does not work in a ChildControl

529
1
04-13-2011 12:47 PM
JoelMcBeth
New Contributor
If I define an AttachmentEditor in the XAML of my MainPage.xaml that has it's FeatureLayer and SourceGraphic bound to a ViewModel that is directly set to it's DataContext it will correctly display the attachments and allow attachments to be added.

If I take the same AttachmentEditor XAML and put it in a ChildWindow and set the DataContext of the ChildWindow to the exact same model and show the ChildWindow the attachments are correctly displayed while the Add button is disabled.

How can I get this to work?
0 Kudos
1 Reply
AliMirzabeigi
New Contributor
Joel,

Thank you for your post. We are currently looking into this problem and the fix will be available soon. In the meantime you can use the following code snippet when you are setting the AttachmentEditor's GraphicSource property:

Dispatcher.BeginInvoke((Action)delegate()
{
   yourAttachmentEditor.GraphicSource = yourGraphic;
});


Hope this helps.
0 Kudos