<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="SmartFoxChat.MainPage"
	Width="900" Height="600" mc:Ignorable="d">

	<Grid x:Name="LayoutRoot" Height="600" Width="900">
		<Grid.Background>
			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="#FF590000" Offset="0"/>
				<GradientStop Color="#FFFFCB5E" Offset="1"/>
			</LinearGradientBrush>
		</Grid.Background>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="SmartFoxChatStates">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="00:00:00"/>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="Connection">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LoginRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ChatRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisconnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConnectionRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Login">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ChatRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisconnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LoginRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LoginRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Chat">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LoginRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisconnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ChatRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ChatRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Disconnection">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ConnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LoginRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ChatRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisconnectionRoot" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisconnectionRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Canvas x:Name="ConnectionRoot" Height="600" HorizontalAlignment="Left" VerticalAlignment="Top" Width="900" RenderTransformOrigin="0.5,0.5" d:IsHidden="True" d:IsLocked="True">
			<Canvas.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform X="-900"/>
				</TransformGroup>
			</Canvas.RenderTransform>
			<Rectangle Stroke="#FF9B9B9B" RadiusX="10" RadiusY="10" Height="264" Width="448" Canvas.Left="240" Canvas.Top="168">
				<Rectangle.Effect>
					<DropShadowEffect Opacity="0.295"/>
				</Rectangle.Effect>
				<Rectangle.Fill>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFB3B3B3" Offset="0.661"/>
						<GradientStop Color="White"/>
					</LinearGradientBrush>
				</Rectangle.Fill>
			</Rectangle>
			<TextBlock Height="32" Width="432" Canvas.Left="248" Canvas.Top="189" FontFamily="Trebuchet MS" FontSize="26.667" FontWeight="Bold" TextAlignment="Center" TextWrapping="Wrap"><Run Foreground="#FFCC0000" Text="SmartFox"/><Run Foreground="#FFFF9900" Text="Chat"/></TextBlock>
			<TextBlock Height="24" Width="408" Canvas.Left="264" Canvas.Top="246" FontSize="13.333" Text="Server Address" TextAlignment="Center" TextWrapping="Wrap"/>
			<TextBlock Height="24" Width="408" Canvas.Left="264" Canvas.Top="299" FontSize="13.333" TextAlignment="Center" TextWrapping="Wrap"><Run Text="Server "/><Run Text="Port"/></TextBlock>
			<TextBox x:Name="TB_IpAddress" Height="28" Width="168" FontSize="13.333" Canvas.Left="384" Canvas.Top="269" Text="127.0.0.1" TextAlignment="Center" TextWrapping="Wrap"/>
			<TextBox x:Name="TB_Port" Height="28" Width="168" FontSize="13.333" Canvas.Left="384" Canvas.Top="321" Text="4502" TextAlignment="Center" TextWrapping="Wrap"/>
			<TextBlock x:Name="TB_ConnectionErr" Height="24" Width="408" Canvas.Left="264" Canvas.Top="359" FontSize="13.333" TextAlignment="Center" TextWrapping="Wrap" FontWeight="Bold" Foreground="#FFCC0000"/>
			<Button x:Name="BT_Connect" Width="88" FontSize="13.333" FontWeight="Bold" Content="Connect" Canvas.Left="424" Canvas.Top="387" Click="OnBTConnect_Click"/>
			<TextBlock Width="448" Canvas.Left="240" Canvas.Top="576" Text="(c) 2009 gotoAndPlay() -- www.smartfoxserver.com" TextAlignment="Center" TextWrapping="Wrap"/>
		</Canvas>
		<Canvas x:Name="LoginRoot" Height="600" HorizontalAlignment="Left" VerticalAlignment="Top" Width="900" RenderTransformOrigin="0.5,0.5" d:IsHidden="True" d:IsLocked="True">
			<Canvas.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform X="-900"/>
				</TransformGroup>
			</Canvas.RenderTransform>
			<Rectangle Stroke="#FF9B9B9B" RadiusX="10" RadiusY="10" Height="264" Width="448" Canvas.Left="240" Canvas.Top="168">
				<Rectangle.Effect>
					<DropShadowEffect Opacity="0.295"/>
				</Rectangle.Effect>
				<Rectangle.Fill>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFB3B3B3" Offset="0.661"/>
						<GradientStop Color="White"/>
					</LinearGradientBrush>
				</Rectangle.Fill>
			</Rectangle>
			<TextBlock Height="32" Width="432" Canvas.Left="248" Canvas.Top="189" FontFamily="Trebuchet MS" FontSize="26.667" FontWeight="Bold" TextAlignment="Center" TextWrapping="Wrap"><Run Foreground="#FFCC0000" Text="SmartFox"/><Run Foreground="#FFFF9900" Text="Chat"/></TextBlock>
			<TextBlock Height="24" Width="408" Canvas.Left="264" Canvas.Top="276" FontSize="13.333" TextAlignment="Center" TextWrapping="Wrap"><Run Text="Your Username"/><Run Text=":"/></TextBlock>
			<TextBox x:Name="TB_UserName" Height="28" Width="344" FontSize="13.333" Canvas.Left="296" Canvas.Top="299" TextAlignment="Center" TextWrapping="Wrap"/>
			<TextBlock x:Name="TB_LoginError" Height="24" Width="408" Canvas.Left="264" Canvas.Top="331" FontSize="13.333" TextAlignment="Center" TextWrapping="Wrap" FontWeight="Bold" Foreground="#FFCC0000"/>
			<Button x:Name="BT_Login" Width="88" FontSize="13.333" FontWeight="Bold" Content="Login" Canvas.Left="424" Canvas.Top="387" Click="OnBTLogin_Click"/>
			<TextBlock Width="448" Canvas.Left="240" Canvas.Top="576" Text="(c) 2009 gotoAndPlay() -- www.smartfoxserver.com" TextAlignment="Center" TextWrapping="Wrap"/>
		</Canvas>
		<Grid x:Name="ChatRoot" Height="600" HorizontalAlignment="Left" VerticalAlignment="Top" Width="900" RenderTransformOrigin="0.5,0.5">
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform X="-900"/>
				</TransformGroup>
			</Grid.RenderTransform>
			<TextBlock Height="32" FontFamily="Trebuchet MS" FontSize="26.667" FontWeight="Bold" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="8,8,0,0" VerticalAlignment="Top" Width="208"><Run Foreground="White" Text="SmartFox"/><Run Foreground="#FFFF9900" Text="Chat"/></TextBlock>
			<TextBox x:Name="TB_ChatHistory" Height="488" HorizontalAlignment="Left" Margin="8,48,0,0" VerticalAlignment="Top" Width="680" BorderThickness="1" FontSize="13.333" HorizontalScrollBarVisibility="Visible" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible">
				<TextBox.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="White" Offset="0"/>
						<GradientStop Color="#FFE0E0E0" Offset="1"/>
					</LinearGradientBrush>
				</TextBox.Background>
			</TextBox>
			<TextBlock Height="24" HorizontalAlignment="Right" Margin="0,48,20,0" VerticalAlignment="Top" Width="176" FontSize="13.333" FontWeight="Bold" Foreground="White" Text="Room List" TextWrapping="Wrap"/>
			<TextBlock HorizontalAlignment="Right" Margin="0,0,20,268" Width="176" FontSize="13.333" Foreground="White" Text="User List" TextWrapping="Wrap" Height="24" VerticalAlignment="Bottom" FontWeight="Bold"/>
			<ListBox x:Name="LB_RoomList" Height="228" HorizontalAlignment="Right" Margin="0,76,12,0" VerticalAlignment="Top" Width="184" BorderThickness="2" SelectionChanged="OnLBRoomList_Change"/>
			<ListBox x:Name="LB_UserList" Height="200" HorizontalAlignment="Right" Margin="0,336,12,0" VerticalAlignment="Top" Width="184" BorderThickness="2"/>
			<TextBox x:Name="TB_ChatMessage" Margin="8,0,308,24" VerticalAlignment="Bottom" FontSize="13.333" TextWrapping="Wrap"/>
			<Button x:Name="BT_SendMessage" Height="28" HorizontalAlignment="Right" Margin="0,0,209,24" VerticalAlignment="Bottom" Width="83" FontSize="13.333" Content="Send!" Click="OnBTSendMessage_Click"/>
			<Button x:Name="BT_LogOut" Height="28" HorizontalAlignment="Right" Margin="0,0,60,24" VerticalAlignment="Bottom" Width="83" FontSize="13.333" Content="Log out" Click="OnBTLogOut_Click"/>
			<TextBlock Text="(c) 2009 gotoAndPlay() -- www.smartfoxserver.com" TextWrapping="Wrap" Margin="192,19,412,0" VerticalAlignment="Top" Foreground="#FF919191"/>
			<TextBlock x:Name="TB_Nickname" TextWrapping="Wrap" Margin="0,19,12,0" VerticalAlignment="Top" Foreground="#FFFFCC00" HorizontalAlignment="Right" Width="184"/>
		</Grid>
		<Canvas x:Name="DisconnectionRoot" Height="600" HorizontalAlignment="Left" VerticalAlignment="Top" Width="900" RenderTransformOrigin="0.5,0.5" d:IsHidden="True" d:IsLocked="True">
			<Canvas.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform X="-900"/>
				</TransformGroup>
			</Canvas.RenderTransform>
			<Rectangle Stroke="#FF9B9B9B" RadiusX="10" RadiusY="10" Height="184" Width="448" Canvas.Left="240" Canvas.Top="168">
				<Rectangle.Effect>
					<DropShadowEffect Opacity="0.295"/>
				</Rectangle.Effect>
				<Rectangle.Fill>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFB3B3B3" Offset="0.661"/>
						<GradientStop Color="White"/>
					</LinearGradientBrush>
				</Rectangle.Fill>
			</Rectangle>
			<TextBlock Height="32" Width="432" Canvas.Left="248" Canvas.Top="189" FontFamily="Trebuchet MS" FontSize="26.667" FontWeight="Bold" TextAlignment="Center" TextWrapping="Wrap"><Run Foreground="#FFCC0000" Text="SmartFox"/><Run Foreground="#FFFF9900" Text="Chat"/></TextBlock>
			<TextBlock Height="60" Width="408" Canvas.Left="264" Canvas.Top="235" FontSize="13.333" TextAlignment="Center" TextWrapping="Wrap"><Run Text="Connection with Server was lost!"/><LineBreak/><Run Text="Please click the button below "/><Run Text="to go back to the"/><LineBreak/><Run Text="Connection Screen..."/></TextBlock>
			<Button x:Name="BT_GoBack" Width="88" FontSize="13.333" FontWeight="Bold" Content="Go Back" Canvas.Left="424" Canvas.Top="310" Click="OnBTGoBack_Click"/>
			<TextBlock Width="448" Canvas.Left="240" Canvas.Top="576" Text="(c) 2009 gotoAndPlay() -- www.smartfoxserver.com" TextAlignment="Center" TextWrapping="Wrap"/>
		</Canvas>
	</Grid>
</UserControl>