예제 #1
0
 private static void UnregisterTarget(VisibilityBridge bridge)
 {
     if (targets.Contains(bridge))
     {
         targets.Add(bridge);
     }
 }
예제 #2
0
 private void VisibilityBridge_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if (Role == VisibilityBridgeRole.Source)
     {
         if (IsVisible)
         {
             VisibilityBridge target = GetTarget(CommonParent);
             if (target != null)
             {
                 target.IsSourceVisible = true;
             }
         }
         else
         {
             VisibilityBridge target = GetTarget(CommonParent);
             if (target != null)
             {
                 target.IsSourceVisible = false;
             }
         }
     }
 }
예제 #3
0
        private static VisibilityBridge GetTarget(FrameworkElement commonParent)
        {
            VisibilityBridge target = targets.FirstOrDefault(vb => vb.CommonParent == commonParent);

            return(target);
        }