Пример #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);
        }