private double GetCurrentOffset(double currentOffset, Size lastItemSize) { if (MinimizedItemsPosition.Equals(Dock.Left) || MinimizedItemsPosition.Equals(Dock.Right)) { currentOffset += lastItemSize.Height; return(currentOffset); } currentOffset += lastItemSize.Width; return(currentOffset); }
private Size GetMaximizedItemSize(TileViewItem item) { double num = ((ActualWidth - MinimizedColumnWidth) - item.Margin.Left) - item.Margin.Right; double num2 = (ActualHeight - item.Margin.Top) - item.Margin.Bottom; if (MinimizedItemsPosition.Equals(Dock.Bottom) || MinimizedItemsPosition.Equals(Dock.Top)) { num = (ActualWidth - item.Margin.Left) - item.Margin.Right; num2 = ((ActualHeight - MinimizedRowHeight) - item.Margin.Top) - item.Margin.Bottom; } num = Math.Max(0.0, num); return(new Size(num, Math.Max(0.0, num2))); }