private void LongBar_Closed(object sender, EventArgs e) { shadow.Close(); if (AppBar.IsOverlapping && sett.side == AppBarSide.Right) { AppBar.RestoreTaskbar(); } SystemTray.RemoveIcon(); AppBar.AppbarRemove(); WriteSettings(); RoutedEventArgs args = new RoutedEventArgs(UserControl.UnloadedEvent); foreach (Tile tile in TilesGrid.Children) { tile.RaiseEvent(args); } TilesGrid.Children.Clear(); }