This has been resolved - i confused childwindow (from my C# days) to floatingwindow.... Below is step by step
1/ In your add-in make sure following references are available (not all may be used but this is what my project showing; will iron out what is required or not later on): ESRI.ArcGIS.Client ESRI.ArcGIS.Client.Application.Controls ESRI.ArcGIS.Client.Extensibility ESRI.ArcGIS.Client.Toolkit
3/ Code-behind for the user-control is simple (no additional code - just default).
4/ To create and use the control as a floating window .... - Add following using statements using ESRI.ArcGIS.Client.Application.Controls; using System.ComponentModel.Composition;
- Define some global properties private PopupDialog popupDialog; private FloatingWindow window;
- Create the dialog and floating window (this is in the MouseRightButtonDown event handler for a graphic) // Get the Graphic object that was clicked on. ESRI.ArcGIS.Client.Graphic pt = (ESRI.ArcGIS.Client.Graphic)sender;
// check and create popup if required if (popupDialog == null) { window = new FloatingWindow() { HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Top };
popupDialog = new TimeSliderPopup() { };
popupDialog.CloseButton.Click += new RoutedEventHandler(popupDialogCloseButton_Click);
window.Content = popupDialog; window.Show(); }
// set attribute into popup dialog using [pt.attributes["SiteInfo"].ToString(); popupDialog.lblSiteTitle.Content = pt.Attributes["StateName"].ToString();