Monkeys Jumping - An (Incomplete) Kid's Game

This prototype of a kid's game was built using Expression Interactive Designer. It shows some simple uses of animation, hit testing and sound and is almost entirely built without code. In particular, it shows how to chain storyboards together to create extremely rudimentary game.

C# (3.5 MB)
 
 
 
 
 
5 Star
(1)
4,256 times
Add to favorites
2/1/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
using System;
using System.IO;
using System.Net;
using System.Security;
using System.Security.Permissions;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media.Animation;
using System.Windows.Navigation;

namespace MonkeysJumping
{
	public partial class MainApplication: System.Windows.Application
	{
		protected override void OnLoadCompleted(NavigationEventArgs e)
		{
			// Set the Window title.
			this.MainWindow.Title = "Application";

			// Get the window to take the size of its content, and then allow
			// it to be set by the user, and have the content take the size
			// of the window.
			if (!this.IsWebBrowserApplication)
			{
				this.MainWindow.SizeToContent = SizeToContent.WidthAndHeight;
				this.MainWindow.SizeToContent = SizeToContent.Manual;
			}

			FrameworkElement root = this.MainWindow.Content as FrameworkElement;
			if (root != null)
			{
				root.Height = double.NaN;
				root.Width = double.NaN;

				root.Focus();
			}
		}
		
		private bool IsWebBrowserApplication
		{
			get
			{
				try
				{
					PermissionSet testSet = new PermissionSet(PermissionState.None);
					testSet.AddPermission(new UIPermission(UIPermissionWindow.AllWindows));
					testSet.Assert();

					return false;
				}
				catch (SecurityException)
				{
					return true;
				}
			}
		}
	}
}