protected override void Resize(double width, double height) { bool saved = Game != null && Game.WasSaved(); var buttons = from button in Buttons where VisibleButtons.Contains(button.Name) select button; foreach (Button b in buttons) { if (saved) { if (b.Name == "ContinueGame") { b.Margin = new Thickness(0, 150, 0, 0); } else if (b.Name == "NewGame") { b.Margin = new Thickness(0, 0, 0, 150); } } else if (b.Name == "NewGame") { b.Margin = new Thickness(0, 0, 0, 0); } } }
protected override void Resize(double width, double height) { var buttons = from button in Buttons where VisibleButtons.Contains(button.Name) select button; foreach (Button b in buttons) { if (b.Name == "Game1") { b.Margin = new Thickness(0.25 * width - 150, 0, 0, 0); } else if (b.Name == "Game3") { b.Margin = new Thickness(0, 0, 0.25 * width - 150, 0); } } }