private void DualContainer_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (DualContainer.Visibility == Visibility.Visible && DualContainer.Child == null) { MinerProfileDual child = new MinerProfileDual(); DualContainer.Child = child; } }
private void DualContainer_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (DualContainer.Visibility == Visibility.Visible && (DualContainer.Children == null || DualContainer.Children.Count == 0)) { MinerProfileDual child = new MinerProfileDual(); DualContainer.Children.Add(child); } }