<Window x:Class="Hiyoko.Forms.MainForm" x:Name="this"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:c="clr-namespace:Hiyoko"
	xmlns:HiyokoForms="clr-namespace:Hiyoko.Forms"
	xmlns:HiyokoUtilities="clr-namespace:Hiyoko.Utilities"
	xmlns:NetCache="clr-namespace:System.Net.Cache"
	Title="Hiyoko - A Twitter Client" Height="640" Width="640"
	ResizeMode="CanResizeWithGrip"
	Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
	FontSize="12">
	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
			</ResourceDictionary.MergedDictionaries>
			
			<HiyokoForms:Int32ToSolidColorBrushConverter x:Key="Int32ToSolidColorBrushConverter" />
			<HiyokoForms:DateTimeToStringConverter x:Key="DateTimeToStringConverter" />
			<HiyokoForms:RemoveHtmlTagsConverter x:Key="RemoveHtmlTagsConverter" />
			<HiyokoForms:OutputItemToImageSourceConverter x:Key="OutputItemToImageSourceConverter" />
			<HiyokoForms:UrlToImageSourceConverter x:Key="UrlToImageSourceConverter" />
			<HiyokoForms:TextToMarkupTextConverter x:Key="TextToMarkupTextConverter" />
			<HiyokoForms:CommandToInputGestureTextConverter x:Key="CommandToInputGestureTextConverter" />
			<HiyokoForms:ExtractUriConverter x:Key="ExtractUriConverter" />
			<HiyokoForms:ExpandUrlsConverter x:Key="StatusTextExpandUrlsConverter" />
			
			<SolidColorBrush x:Key="statusEditCountNormalColor" Color="Gray" />
			<SolidColorBrush x:Key="statusEditCountWarningColor" Color="DarkRed" />
			<SolidColorBrush x:Key="statusEditCountHighWarningColor" Color="Red" />
			<SolidColorBrush x:Key="transparentBrush" Color="#00000000" />
			
			<ObjectDataProvider x:Key="networkJobServerProvider"></ObjectDataProvider>
			
			<BitmapImage x:Key="PostIcon" UriSource="/Resources/Post.png" />
			
			<DataTemplate x:Key="outputItemTemplate">
				<Grid>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="auto" />
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="auto" />
					</Grid.ColumnDefinitions>
					<Image Grid.Column="0" Source="{Binding Converter={StaticResource OutputItemToImageSourceConverter}}" Width="15" Height="15" />
					<TextBlock Grid.Column="1" Text="{Binding Text}" />
					<TextBlock Grid.Column="2" Text="{Binding Path=DateTime, Converter={StaticResource DateTimeToStringConverter}}" />
				</Grid>
			</DataTemplate>  
			<Style x:Key="outputListBoxStyle" TargetType="{x:Type ListBox}">  
				<Setter Property="HorizontalContentAlignment" Value="Stretch" />
				<Setter Property="ItemTemplate" Value="{StaticResource outputItemTemplate}" />  
				<Setter Property="ItemsPanel">
					<Setter.Value>
						<ItemsPanelTemplate>
							<VirtualizingStackPanel Orientation="Vertical" />
						</ItemsPanelTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			
			<DataTemplate x:Key="statusTemplate">
				<StackPanel Name="RootPanel" Width="480">
					<Border Margin="4" Padding="4" BorderThickness="1" CornerRadius="4"
						BorderBrush="{Binding Path=User.ProfileSidebarBorderColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}"
						Background="{Binding Path=User.ProfileBackgroundColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="auto" />
								<ColumnDefinition Width="*" />
							</Grid.ColumnDefinitions>
							<Image Width="47" Height="47" Margin="0,0,4,0" Source="{Binding Path=User.ProfileImageUrl, Converter={StaticResource UrlToImageSourceConverter}}"></Image>
							<Grid Grid.Column="1" Background="#eeffffff">
								<Grid.RowDefinitions>
									<RowDefinition Height="auto" />
									<RowDefinition Height="auto" />
									<RowDefinition Height="auto" />
								</Grid.RowDefinitions>
								<Grid Grid.Row="0">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="auto" />
										<ColumnDefinition Width="auto" />
										<ColumnDefinition Width="*" />
										<ColumnDefinition Width="auto" />
										<ColumnDefinition Width="auto" />
									</Grid.ColumnDefinitions>
									<TextBlock Grid.Column="0" Margin="2" FontWeight="UltraBold" Text="{Binding Path=User.Name, Mode=OneWay}"
										Foreground="{Binding Path=User.ProfileLinkColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}"
										Background="{StaticResource transparentBrush}" />
									<TextBlock Grid.Column="1" Margin="4,2,4,2" Text="/"
										Foreground="{Binding Path=User.ProfileTextColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}" />
									<TextBlock Grid.Column="2" Margin="2" Text="{Binding Path=User.ScreenName, Mode=OneWay}"
										Foreground="{Binding Path=User.ProfileTextColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}"
										Background="{StaticResource transparentBrush}" />
									<TextBlock Grid.Column="3" Margin="2" Text="{Binding Path=User.Location, Mode=OneWay}"
										Foreground="{Binding Path=User.ProfileTextColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}"
										Background="{StaticResource transparentBrush}" />
									<TextBlock Grid.Column="4" Margin="2" Text="{Binding Path=CreatedAt, Mode=OneWay, Converter={StaticResource DateTimeToStringConverter}}"
										Foreground="{Binding Path=User.ProfileTextColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}"
										Background="{StaticResource transparentBrush}" />
								</Grid>
								<TextBox Grid.Row="1" Margin="2"
									Text="{Binding Path=Text, Mode=OneWay, Converter={StaticResource StatusTextExpandUrlsConverter}}"
									TextWrapping="Wrap" IsReadOnly="true" BorderThickness="0"
									Foreground="{Binding Path=User.ProfileTextColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}"
									Background="{StaticResource transparentBrush}" />
								<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
									<HiyokoForms:LinkText OpenUri="{Binding Path=Source, Converter={StaticResource ExtractUriConverter}}" 
									Text="{Binding Path=Source, Converter={StaticResource RemoveHtmlTagsConverter}}" 
									Foreground="{Binding Path=User.ProfileTextColor, Converter={StaticResource Int32ToSolidColorBrushConverter}}" />
									<TextBlock Text=" で" />
								</StackPanel>
							</Grid>
						</Grid>
					</Border>
				</StackPanel>
				<DataTemplate.Triggers>
					<DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBoxItem}}" Value="true">
						<Setter TargetName="RootPanel" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
					</DataTrigger>
				</DataTemplate.Triggers>
			</DataTemplate>  
			<Style x:Key="timelineListBoxStyle" TargetType="{x:Type ListBox}">  
				<Setter Property="HorizontalContentAlignment" Value="Stretch" />
				<Setter Property="ItemTemplate" Value="{StaticResource statusTemplate}" />  
				<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
				<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
				<Setter Property="ScrollViewer.Margin" Value="0" />
				<Setter Property="ScrollViewer.Padding" Value="0" />
				<Setter Property="SelectionMode" Value="Extended" />
				<Setter Property="ItemsPanel">
					<Setter.Value>
						<ItemsPanelTemplate>
							<!--<UniformGrid Columns="2" />-->
							<WrapPanel Orientation="Vertical" />
						</ItemsPanelTemplate>
					</Setter.Value>
				</Setter>
				<!--
				<Setter Property="AlternationCount" Value="2" />
				<Setter Property="ItemContainerStyle">
					<Setter.Value>
						<Style TargetType="{x:Type ListBoxItem}">
							<Style.Triggers>
								<Trigger Property="ItemsControl.AlternationIndex" Value="0">
									<Setter Property="Margin" Value="0,0,0,16" />
								</Trigger>
								<Trigger Property="ItemsControl.AlternationIndex" Value="1">
									<Setter Property="Margin" Value="0,16,0,0" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Setter.Value>
				</Setter>
				-->
			</Style>
			
			<ContextMenu x:Key="StatusEditToolMenu">
				<MenuItem Header="URL短縮(_S)" Command="c:HiyokoCommands.ShortenUrl" />
				<MenuItem Header="画像をアップロード(_U)..." Command="c:HiyokoCommands.UploadImage" />
			</ContextMenu>
			
			<!-- for .NetFx 4.0
			<Style TargetType="{x:Type TextBoxBase}">
				<Style.Triggers>
					<Trigger Property="InputMethod.ImeState" Value="On">
						<Setter Property="CaretBrush" Value="Red" />
					</Trigger>
				</Style.Triggers>
			</Style>
			-->
			<!--<Style TargetType="{x:Type MenuItem}">
				<Style.Triggers>
					<Trigger Property="IsVisible" Value="true">
						<Setter Property="InputGestureText"
						        Value="{Binding RelativeSource={RelativeSource Self}, Path=Command,
						                Converter={StaticResource CommandToInputGestureTextConverter}}" />
					</Trigger>
				</Style.Triggers>
			</Style>-->
		</ResourceDictionary>
	</Window.Resources>
	<Window.CommandBindings>
		<CommandBinding Command="c:HiyokoCommands.Close" Executed="Close_Executed" CanExecute="Close_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.Exit" Executed="Exit_Executed" CanExecute="Exit_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.Refresh" Executed="Refresh_Executed" CanExecute="Refresh_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.UpdateStatus" Executed="UpdateStatus_Executed" CanExecute="UpdateStatus_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.NextPage" Executed="NextPage_Executed" CanExecute="NextPage_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.PreviousPage" Executed="PreviousPage_Executed" CanExecute="PreviousPage_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.FirstPage" Executed="FirstPage_Executed" CanExecute="FirstPage_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.About" Executed="About_Executed" CanExecute="About_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.Settings" Executed="Settings_Executed" CanExecute="Settings_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.SaveTimeline" Executed="SaveTimeline_Executed" CanExecute="SaveTimeline_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.DestroyStatus" Executed="DestroyStatus_Executed" CanExecute="DestroyStatus_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.OpenTwitterCom" Executed="OpenTwitterCom_Executed" CanExecute="OpenTwitterCom_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.OpenHome" Executed="OpenMyHome_Executed" CanExecute="OpenMyHome_CanExecute"/>
		<CommandBinding Command="c:HiyokoCommands.AbortCommunication" Executed="AbortCommunication_Executed" CanExecute="AbortCommunication_CanExecute"/>
	</Window.CommandBindings>
	
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="auto" />
		</Grid.RowDefinitions>
		<Menu Grid.Row="0">
			<MenuItem Header="ファイル(_F)">
				<MenuItem Header="twitter.comを開く(_T)..." Command="c:HiyokoCommands.OpenTwitterCom" />
				<MenuItem Header="自分のホームを開く(_H)..." Command="c:HiyokoCommands.OpenHome" />
				<Separator />
				<MenuItem Header="タイムラインを保存(_A)..." Command="c:HiyokoCommands.SaveTimeline" />
				<Separator/>
				<MenuItem Header="設定(_S)..." Command="c:HiyokoCommands.Settings" />
				<Separator/>
				<MenuItem Header="ウインドウを閉じる(_C)" Command="c:HiyokoCommands.Close" />
				<MenuItem Header="終了(_X)" Command="c:HiyokoCommands.Exit"  />
			</MenuItem>
			<MenuItem Header="表示(_V)">
				<MenuItem Header="更新(_R)" Command="c:HiyokoCommands.Refresh" />
				<Separator/>
				<MenuItem Header="最初のページ(_F)" Command="c:HiyokoCommands.FirstPage" />
				<MenuItem Header="前のページ(_P)" Command="c:HiyokoCommands.PreviousPage" />
				<MenuItem Header="次のページ(_N)" Command="c:HiyokoCommands.NextPage" />
				<Separator/>
				<MenuItem Header="通信を中止する(_C)" Command="c:HiyokoCommands.AbortCommunication" />
			</MenuItem>
			<MenuItem Header="ヘルプ(_H)">
				<MenuItem Header="Hiyokoについて(_A)..." Command="c:HiyokoCommands.About" />
			</MenuItem>
		</Menu>
		<Grid Grid.Row="1">
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />
				<RowDefinition Name="outputListRow" Height="64" />
			</Grid.RowDefinitions>
			
			<TabControl Grid.Row="0">
				<TabItem Header="タイムライン(_1)" Name="timelineTabItem">
					<TabItem.CommandBindings>
						<CommandBinding Command="c:HiyokoCommands.OpenUrls" Executed="OpenUrlsTimeline_Executed" CanExecute="OpenUrlsTimeline_CanExecute"/>	
						<CommandBinding Command="c:HiyokoCommands.OpenSite" Executed="OpenSiteTimeline_Executed" CanExecute="OpenSiteTimeline_CanExecute"/>	
						<CommandBinding Command="c:HiyokoCommands.OpenHome" Executed="OpenHomeTimeline_Executed" CanExecute="OpenHomeTimeline_CanExecute"/>	
						<CommandBinding Command="c:HiyokoCommands.CreateFavorite" Executed="CreateFavoriteTimeline_Executed" CanExecute="CreateFavoriteTimeline_CanExecute"/>	
						<CommandBinding Command="c:HiyokoCommands.CreateBlock" Executed="CreateBlockTimeline_Executed" CanExecute="CreateBlockTimeline_CanExecute"/>	
						<CommandBinding Command="c:HiyokoCommands.DestroyFriendship" Executed="DestroyFriendshipTimeline_Executed" CanExecute="DestroyFriendshipTimeline_CanExecute"/>
						<CommandBinding Command="c:HiyokoCommands.ShortenUrl" Executed="ShortenUrlStatusEdit_Executed" CanExecute="ShortenUrlStatusEdit_CanExecute"/>
						<CommandBinding Command="c:HiyokoCommands.UploadImage" Executed="UploadImageStatusEdit_Executed" CanExecute="UploadImageStatusEdit_CanExecute"/>
					</TabItem.CommandBindings>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="auto" Name="timelineStatusEditRow" />
							<RowDefinition Height="*" />
							<RowDefinition Height="auto" />
							<RowDefinition Height="auto" />
						</Grid.RowDefinitions>
						<Grid Grid.Row="0" Margin="4">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="auto" />
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="auto" />
								<ColumnDefinition Width="auto" />
								<ColumnDefinition Width="auto" />
							</Grid.ColumnDefinitions>
							<Label Grid.Column="0" Target="{Binding ElementName=statusEdit}" VerticalAlignment="center">ステータス(_S):</Label>
							<TextBox
								Grid.Column="1"
								Name="statusEdit" Height="auto" AllowDrop="true"
								TextWrapping="Wrap" BorderThickness="0"
								TextChanged="StatusEdit_TextChanged"
								SpellCheck.IsEnabled="True">
								<TextBox.CommandBindings>
									<CommandBinding Command="ComponentCommands.ScrollPageUp" Executed="ScrollPageUpTimeline_Executed" CanExecute="ScrollPageUpTimeline_CanExecute" />
									<CommandBinding Command="ComponentCommands.ScrollPageDown" Executed="ScrollPageDownTimeline_Executed" CanExecute="ScrollPageDownTimeline_CanExecute" />
								</TextBox.CommandBindings>
								<TextBox.Template>
									<ControlTemplate TargetType="{x:Type TextBoxBase}">
										<Border Name="Border" BorderBrush="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" BorderThickness="1" CornerRadius="4"
											Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
											<ScrollViewer Margin="0" x:Name="PART_ContentHost" />
										</Border>
										<ControlTemplate.Triggers>
											<Trigger Property="IsReadOnly" Value="true">
												<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
												<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
											</Trigger>
											<MultiTrigger>
												<MultiTrigger.Conditions>
													<Condition Property="IsFocused" Value="true" />
													<Condition Property="IsReadOnly" Value="false" />
												</MultiTrigger.Conditions>
												<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
											</MultiTrigger>
										</ControlTemplate.Triggers>
									</ControlTemplate>
								</TextBox.Template>
							</TextBox>
							<Button Grid.Column="2" x:Name="statusEditToolButton" HiyokoForms:ButtonBehaviors.DropDownMenu="{StaticResource StatusEditToolMenu}">
								<AccessText Text="ツール(_T)" />
							</Button>
							<Label Grid.Column="3" Name="statusEditCount" FontWeight="UltraBold" FontSize="24" VerticalAlignment="center"></Label>
							<Button Grid.Column="4" Name="statusSubmitButton" Command="c:HiyokoCommands.UpdateStatus">
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="auto" />
										<ColumnDefinition Width="auto" />
									</Grid.ColumnDefinitions>
									<Image Grid.Column="0" Source="{StaticResource PostIcon}" Width="15" Height="15" />
									<AccessText Grid.Column="1" Text="投稿(_P)" />
								</Grid>
							</Button>
						</Grid>
						
						<GridSplitter 
							Grid.Row="0" Height="3"
							HorizontalAlignment="Stretch" VerticalAlignment="Bottom" />
						
						<Grid Grid.Row="1">
							<Grid.RowDefinitions>
								<RowDefinition Height="auto" />
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>
							<Label Grid.Row="0" Target="{Binding ElementName=timelineList}">タイムライン(_L):</Label>
							<ListBox Grid.Row="1" ItemsSource="{Binding IsAsync=true}" Name="timelineList" Style="{StaticResource timelineListBoxStyle}">
								<ListBox.CommandBindings>
									<CommandBinding Command="ApplicationCommands.Copy" Executed="CopyStatus_Executed" CanExecute="CopyStatus_CanExecute" />
								</ListBox.CommandBindings>
								<ListBox.ContextMenu>
									<ContextMenu>
										<MenuItem Header="含まれるUrlを開く(_U)" Command="c:HiyokoCommands.OpenUrls" />
										<MenuItem Header="ユーザーのホームを開く(_H)" Command="c:HiyokoCommands.OpenHome" />
										<MenuItem Header="ユーザーのサイトを開く(_S)" Command="c:HiyokoCommands.OpenSite" />
										<Separator />
										<MenuItem Header="お気に入りに追加(_F)" Command="c:HiyokoCommands.CreateFavorite" />
										<MenuItem Header="ブロックに追加(_B)"  Command="c:HiyokoCommands.CreateBlock" />
										<MenuItem Header="フォローを削除(_R)"  Command="c:HiyokoCommands.DestroyFriendship" />
										<Separator />
										<MenuItem Header="コピー(_C)" Command="ApplicationCommands.Copy" />
										<Separator />
										<MenuItem Header="削除(_D)"  Command="c:HiyokoCommands.DestroyStatus"/>
									</ContextMenu>
								</ListBox.ContextMenu>
							</ListBox>
						</Grid>
						
						<HiyokoForms:Pager Grid.Row="2" CurrentPage="{Binding Path=CurrentTimelinePage, ElementName=this}"/>
					</Grid>
				</TabItem>
				
				<TabItem Header="フレンド(_2)" IsEnabled="false">
					<ListView ItemsSource="{Binding}" Name="friendList"> 
					</ListView>
				</TabItem>
				
				<TabItem Header="フォロワー(_3)" IsEnabled="false">
					<ListView ItemsSource="{Binding}" Name="followerList"> 
					</ListView>
				</TabItem>
				
				<TabItem Header="お気に入り(_4)" IsEnabled="false">
					<ListView ItemsSource="{Binding}" Name="favoriteList"> 
					</ListView>
				</TabItem>
				
				<TabItem Header="ブロック(_5)" IsEnabled="false">
					<ListView ItemsSource="{Binding}" Name="blockList"> 
					</ListView>
				</TabItem>
				
				<TabItem Header="ユーザー検索(_6)" IsEnabled="false">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="auto" />
							<RowDefinition Height="*" />
							<RowDefinition Height="auto" />
						</Grid.RowDefinitions>
						
						<ListView Grid.Row="1" ItemsSource="{Binding}" Name="searchList"> 
						</ListView>
						
						<HiyokoForms:Pager Grid.Row="2" />
					</Grid>
				</TabItem>
			</TabControl>
			
			<Grid Grid.Row="1">
				<Grid.RowDefinitions>
					<RowDefinition Height="auto" />
					<RowDefinition Height="*" />
				</Grid.RowDefinitions>
				
				<Label Grid.Row="0" Target="{Binding ElementName=outputList}">アウトプット(_O):</Label>
				<ListBox Grid.Row="1" ItemsSource="{Binding}" Name="outputList"
					Style="{StaticResource outputListBoxStyle}"> 
				</ListBox>
			</Grid>
			
			<GridSplitter 
				Grid.Row="1" Height="3"
				HorizontalAlignment="Stretch" VerticalAlignment="Top" />
		</Grid>
		<StatusBar Grid.Row="2">
			<StatusBar.ItemsPanel>
				<ItemsPanelTemplate>
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*"/>
							<ColumnDefinition Width="auto"/>
							<ColumnDefinition Width="auto"/>
						</Grid.ColumnDefinitions>
					</Grid>
				</ItemsPanelTemplate>
			</StatusBar.ItemsPanel>
			
			<StatusBarItem Grid.Column="0">
				<TextBlock Name="statusBarMessageBlock" />
			</StatusBarItem>
			<StatusBarItem Grid.Column="1"><Separator /></StatusBarItem>
			<StatusBarItem  Grid.Column="2">
				<Grid>
					<Grid.Style>
						<Style TargetType="Grid">
							<Style.Triggers>
								<DataTrigger Binding="{Binding Source={StaticResource networkJobServerProvider}, Path=IsBusy}" Value="True">
									<Setter Property="Visibility" Value="Visible" />
								</DataTrigger>
								<DataTrigger Binding="{Binding Source={StaticResource networkJobServerProvider}, Path=IsBusy}" Value="False">
									<Setter Property="Visibility" Value="Hidden" />
									<Setter Property="Width" Value="0" />
								</DataTrigger>
							</Style.Triggers>
						</Style>
					</Grid.Style>
					<ProgressBar Name="NetworkJobServerProgressBar" IsIndeterminate="true" Value="50"></ProgressBar>
					<StackPanel Orientation="Horizontal" Margin="4">
						<TextBlock Text="通信中 残りジョブ数: " />
						<TextBlock Text="{Binding Source={StaticResource networkJobServerProvider}, Path=JobCount}" />
					</StackPanel>
				</Grid>
			</StatusBarItem>
		</StatusBar>
	</Grid>
</Window>
