Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed DrawingSurfaceBackgroundGrid in Game.xaml #2220

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion MonoGame.Framework/WindowsPhone/XamlGame.cs
Expand Up @@ -117,6 +117,8 @@ static public T Create(string launchParameters, PhoneApplicationPage page)
mediaElement = (MediaElement)child; mediaElement = (MediaElement)child;
else if (drawingSurface == null && child is DrawingSurface) else if (drawingSurface == null && child is DrawingSurface)
drawingSurface = (DrawingSurface)child; drawingSurface = (DrawingSurface)child;
else if (drawingSurface == null && child is DrawingSurfaceBackgroundGrid)
drawingSurface = (DrawingSurfaceBackgroundGrid)child;
} }


if (!(drawingSurface is DrawingSurfaceBackgroundGrid) && !(drawingSurface is DrawingSurface)) if (!(drawingSurface is DrawingSurfaceBackgroundGrid) && !(drawingSurface is DrawingSurface))
Expand Down Expand Up @@ -194,4 +196,4 @@ private static void OnDrawingSurfaceUnloaded(object sender, RoutedEventArgs e)
initializedSurfaces.Remove(drawingSurface); initializedSurfaces.Remove(drawingSurface);
} }
} }
} }