Example #1
0
        private VisualElement GetVisualElement(FrameworkElement element)
        {
            var elementID         = TourHelper.GetElementID(element);
            var placement         = TourHelper.GetPlacement(element);
            var transtionBehavior = TourHelper.GetWindowTransisionBehavior(element);

            RemoveElement(elementID);

            return(new VisualElement(element)
            {
                Placement = placement,
                ElementID = elementID,
                WindowTransisionBehavior = transtionBehavior,
                WindowID = myWindowManager.GetWindowID(element, elementID)
            });
        }
Example #2
0
        internal void ElementPropertyChanged(UIElement element, Action <UIElement, VisualElement> propertySetter)
        {
            var elementID = TourHelper.GetElementID(element);

            if (string.IsNullOrEmpty(elementID))
            {
                return;
            }

            var visualElement = myVisualElements.FirstOrDefault(e => e.ElementID == elementID);

            if (visualElement != null)
            {
                propertySetter(element, visualElement);
            }
        }