private void InitComposition() { this.Visibility = Visibility.Collapsed; _compositor = this.GetVisual().Compositor; _maskVisual = MaskBorder.GetVisual(); _contentVisual = ContentGrid.GetVisual(); _contentVisual.Opacity = _maskVisual.Opacity = 0f; }