private void OnSizeChanged(object sender, SizeChangedEventArgs e)
{
//Program.GameMess.GameDebug("OnSizeChanged");
// if only height is set, set width accordingly so that slight differences in scans size
// don't propagate to the layout
//if (double.IsNaN(Width) && !double.IsNaN(Height))
//{
// var cs = Card == null ? Program.GameEngine.Definition.CardSize : Card.Size;
// if (IsUp == false)
// {
// Width = cs.BackWidth*Height/cs.BackHeight;
// }
// else
// {
// Width = cs.Width*Height/cs.Height;
// }
//}
target.Height = target.Width = Math.Min(Height, Width);
peekers.Margin = new Thickness(ActualWidth - 1, 8, -200, 0);
contentCtrl.Height = this.ActualHeight;
contentCtrl.Width = this.ActualWidth;
}