public IEnumerable <IContextPropertyProvider.ContextPropertyData> GetProperties()
        {
            var markerEditBag = PropertyBag.GetPropertyBag(m_MarkerEdit.GetType()) as PropertyBag <MarkerEditViewModel>;

            if (markerEditBag != null)
            {
                foreach (var property in markerEditBag.GetProperties())
                {
                    var data = new IContextPropertyProvider.ContextPropertyData()
                    {
                        context = typeof(MarkerEditContext), property = property
                    };
                    yield return(data);
                }
            }

            var markerListBag = PropertyBag.GetPropertyBag(m_MarkerList.GetType()) as PropertyBag <MarkerListViewModel>;

            if (markerListBag != null)
            {
                foreach (var property in markerListBag.GetProperties())
                {
                    var data = new IContextPropertyProvider.ContextPropertyData()
                    {
                        context = typeof(MarkerListContext), property = property
                    };
                    yield return(data);
                }
            }

            var markerDragBag = PropertyBag.GetPropertyBag(m_MarkerDrag.GetType()) as PropertyBag <MarkerDraggableEditorViewModel>;

            if (markerDragBag != null)
            {
                foreach (var property in markerDragBag.GetProperties())
                {
                    var data = new IContextPropertyProvider.ContextPropertyData()
                    {
                        context = typeof(MarkerDraggableEditorContext), property = property
                    };
                    yield return(data);
                }
            }

            var markerARModeBag = PropertyBag.GetPropertyBag(m_MarkerDrag.GetType()) as PropertyBag <MarkerARModeViewModel>;

            if (markerARModeBag != null)
            {
                foreach (var property in markerARModeBag.GetProperties())
                {
                    var data = new IContextPropertyProvider.ContextPropertyData()
                    {
                        context = typeof(MarkerARModeContext), property = property
                    };
                    yield return(data);
                }
            }
        }
Example #2
0
        public static IEnumerable <IContextPropertyProvider.ContextPropertyData> GetProperties <TContextData, TStateData>() where TContextData : IUIContext
        {
            var propertyBag = PropertyBag.GetPropertyBag(typeof(TStateData)) as PropertyBag <TStateData>;

            foreach (var property in propertyBag.GetProperties())
            {
                var data = new IContextPropertyProvider.ContextPropertyData()
                {
                    context = typeof(TContextData), property = property
                };
                yield return(data);
            }
        }