예제 #1
0
        private void BindMapWindow(MapWindow window)
        {
            if (window.View != null && View != null)
            {
                try
                {
                    //bind Time
                    BindingUtils.BindProperties(window.View, IViewProperties.PropertyTime,
                                                View, IViewProperties.PropertyTime); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)

                    //bind Captions (note: must do 2nd else freezes, not sure why - would expect the reverse order to be needed)
                    //BindingUtils.BindProperties(View, IActivityProperties.PropertyCaptions, //Note: Since Map component doesn't save/load captions itself, it should use as source the Activity, not the other way around, else order of component loading (e.g. 1st load Captions component in Activity and then Map component) causes loss of captions in the Captions component (gets null value from Map component via the Container two-way binding)
                    //                            window.View, IMapViewerProperties.PropertyCaptions); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)
                }
                catch (Exception ex)
                {
                    ErrorDialog.Show("Failed to bind Map component", ex);
                }
            }
        }
예제 #2
0
        public MapWindow AddMap()
        {
            MapWindow w = (MapWindow)AddWindow(MapWindowFactory, newInstance: true);

            return(w);
        }