Ejemplo n.º 1
0
        private static void OnIsOccluderPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var element = d as FrameworkElement;

            if (null == element)
            {
                return;
            }

            // Make sure there is a unique id set on the element
            if (string.IsNullOrEmpty(element.Uid))
            {
                element.Uid = InteractorIDGenerator.CreateUniqueID();
            }

            var occluderBehavior = new OccluderBehavior();
            var wpfInteractor    = element.GetWpfInteractorOrDefault();

            wpfInteractor.AddBehavior(element, occluderBehavior);
        }
Ejemplo n.º 2
0
        private static void OnIsOccluderPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var element = d as FrameworkElement;
            if (null == element) { return; }

            // Make sure there is a unique id set on the element
            if (string.IsNullOrEmpty(element.Uid))
            {
                element.Uid = InteractorIDGenerator.CreateUniqueID();
            }

            element.Unloaded += OnOccluderElementUnloaded;

            var occluderBehavior = new OccluderBehavior();
            var wpfInteractor = element.GetWpfInteractorOrDefault();
            wpfInteractor.AddBehavior(element, occluderBehavior);
        }