Exemple #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);
        }
Exemple #2
0
 /// <summary>
 /// Creates an empty WpfInteractor with no attached EyeX Behavior.
 /// </summary>
 /// <returns>An empty WpfInteractor.</returns>
 public static WpfInteractor CreateEmpty()
 {
     return(new WpfInteractor(InteractorIDGenerator.CreateUniqueID()));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FormsInteractor"/> class.
 /// </summary>
 /// <param name="control">The <see cref="Control"/> to represent.</param>
 public FormsInteractor(Control control)
 {
     Control = control;
     Id      = InteractorIDGenerator.CreateUniqueID();
 }