CalculateTombstoneId() private method

private CalculateTombstoneId ( ) : void
return void
Example #1
0
 private static void OnTombstonerChanged(FrameworkElement obj, Epitaph oldValue, Epitaph newValue)
 {
     if (DesignerProperties.IsInDesignTool)
     {
         return;
     }
     if (oldValue != null)
     {
         oldValue.Parent = null;
     }
     if (newValue != null)
     {
         newValue.Parent = obj;
         ElementsToTombstone.Add(new WeakReference(obj));
         CleanupElementsToTombstone();
     }
     if (newValue != null)
     {
         obj.Dispatcher.BeginInvoke(() =>
         {
             try
             {
                 newValue.CalculateTombstoneId();
             }
             catch
             {
                 obj.Loaded += (o, a) => newValue.CalculateTombstoneId();
             }
         });
     }
 }
Example #2
0
 private static void OnTombstonerChanged(FrameworkElement obj, Epitaph oldValue, Epitaph newValue)
 {
     if (DesignerProperties.IsInDesignTool)
         return;
     if (oldValue != null)
         oldValue.Parent = null;
     if (newValue != null)
     {
         newValue.Parent = obj;
         ElementsToTombstone.Add(new WeakReference(obj));
         CleanupElementsToTombstone();
     }
     if (newValue != null)
         obj.Dispatcher.BeginInvoke(() =>
         {
             try
             {
                 newValue.CalculateTombstoneId();
             }
             catch
             {
                 obj.Loaded += (o, a) => newValue.CalculateTombstoneId();
             }
         });
 }