XAML-Map-Control/MapControl/PanelBase.cs
ClemensF 98cdc95c5d Version 2.5.0:
- moved tile rect calculation from MapBase to TileLayer
- added TileLayer.ZoomLevelOffset property
- Windows Universal sample application in solution MapControl VS2015
2015-08-09 20:04:44 +02:00

44 lines
1 KiB
C#

// XAML Map Control - http://xamlmapcontrol.codeplex.com/
// © 2015 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
#if NETFX_CORE
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else
using System.Windows;
using System.Windows.Controls;
#endif
namespace MapControl
{
/// <summary>
/// Common base class for MapPanel and TileLayer.
/// </summary>
public class PanelBase : Panel
{
protected override Size MeasureOverride(Size availableSize)
{
availableSize = new Size(double.PositiveInfinity, double.PositiveInfinity);
foreach (UIElement element in Children)
{
element.Measure(availableSize);
}
return new Size();
}
protected override Size ArrangeOverride(Size finalSize)
{
foreach (UIElement element in Children)
{
element.Arrange(new Rect(new Point(), finalSize));
}
return finalSize;
}
}
}