LibraryExplorer.xaml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <controls:MetroWindow x:Class="MediaBrowser.ServerApplication.LibraryExplorer"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:MediaBrowser.ServerApplication"
  5. xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
  6. Title="Library Explorer"
  7. Height="733.75"
  8. Width="893">
  9. <controls:MetroWindow.Resources>
  10. <ResourceDictionary>
  11. <ResourceDictionary.MergedDictionaries>
  12. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
  13. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
  14. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
  15. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
  16. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </controls:MetroWindow.Resources>
  20. <Grid Margin="0,0,0,10">
  21. <TreeView x:Name="tvwLibrary"
  22. HorizontalAlignment="Left"
  23. Margin="10,54,0,0"
  24. Width="399"
  25. SelectedItemChanged="tvwLibrary_SelectedItemChanged"
  26. Height="417"
  27. VerticalAlignment="Top">
  28. <TreeView.Resources>
  29. <Style TargetType="{x:Type TreeViewItem}">
  30. <Setter Property="HeaderTemplate">
  31. <Setter.Value>
  32. <DataTemplate>
  33. <StackPanel Orientation="Horizontal">
  34. <Image Name="img"
  35. Width="20"
  36. Height="20"
  37. Stretch="Fill"
  38. Source="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
  39. AncestorType={x:Type TreeViewItem}},
  40. Path=Tag,
  41. Converter={x:Static local:ItemToImageConverter.Instance}}" />
  42. <TextBlock Text="{Binding}"
  43. Margin="5,0" />
  44. </StackPanel>
  45. </DataTemplate>
  46. </Setter.Value>
  47. </Setter>
  48. </Style>
  49. </TreeView.Resources>
  50. </TreeView>
  51. <Button x:Name="btnLoad"
  52. Content="Load"
  53. HorizontalAlignment="Left"
  54. Margin="218,25,0,0"
  55. VerticalAlignment="Top"
  56. Width="75"
  57. RenderTransformOrigin="0.373,0.045"
  58. Click="btnLoad_Click"
  59. Visibility="Hidden" />
  60. <TextBox x:Name="txtData"
  61. Margin="427,54,0,0"
  62. HorizontalAlignment="Left"
  63. TextWrapping="Wrap"
  64. VerticalAlignment="Top"
  65. Height="417"
  66. Width="444"
  67. VerticalScrollBarVisibility="Auto" />
  68. <Label Content="Contents&#xD;&#xA;"
  69. HorizontalAlignment="Left"
  70. Margin="440,23,0,0"
  71. VerticalAlignment="Top"
  72. Height="26"
  73. Width="74"
  74. FontWeight="Bold" />
  75. <ListView x:Name="lstPreviews"
  76. HorizontalAlignment="Left"
  77. Margin="10,476,0,10"
  78. Width="861">
  79. <ListView.ItemsPanel>
  80. <ItemsPanelTemplate>
  81. <WrapPanel Orientation="Horizontal"
  82. MinWidth="100" />
  83. </ItemsPanelTemplate>
  84. </ListView.ItemsPanel>
  85. <ListView.ItemTemplate>
  86. <DataTemplate>
  87. <Grid>
  88. <Grid.RowDefinitions>
  89. <RowDefinition Height="150" />
  90. <RowDefinition Height="25" />
  91. </Grid.RowDefinitions>
  92. <Image Source="{Binding Preview}"
  93. Height="140"
  94. MaxWidth="300"
  95. Grid.Row="0" />
  96. <TextBlock Text="{Binding Name}"
  97. Grid.Row="1"
  98. FontFamily="Segoe Media Center"
  99. FontSize="14"
  100. FontWeight="Bold"
  101. HorizontalAlignment="Center" />
  102. </Grid>
  103. </DataTemplate>
  104. </ListView.ItemTemplate>
  105. </ListView>
  106. <ComboBox x:Name="ddlProfile"
  107. HorizontalAlignment="Left"
  108. Margin="10,25,0,0"
  109. VerticalAlignment="Top"
  110. Width="191"
  111. SelectionChanged="ddlProfile_SelectionChanged" />
  112. <Label Content="View;"
  113. HorizontalAlignment="Left"
  114. Margin="10,1,0,0"
  115. VerticalAlignment="Top"
  116. Height="24"
  117. Width="119"
  118. FontWeight="Bold" />
  119. <Label x:Name="lblLoading"
  120. Content="Loading..."
  121. HorizontalAlignment="Left"
  122. Margin="140,150,0,0"
  123. VerticalAlignment="Top"
  124. FontSize="18"
  125. Foreground="LightGray"
  126. Visibility="Hidden"
  127. FontStyle="Italic"
  128. FontWeight="Bold"
  129. RenderTransformOrigin="0.258,0.5" />
  130. <Label x:Name="lblObjType"
  131. Content="Type:&#xA;"
  132. HorizontalAlignment="Left"
  133. Margin="534,23,0,0"
  134. VerticalAlignment="Top"
  135. Height="26"
  136. Width="158"
  137. FontWeight="Bold" />
  138. <Button x:Name="btnRefresh"
  139. Content="Refresh"
  140. HorizontalAlignment="Left"
  141. Margin="712,25,0,0"
  142. VerticalAlignment="Top"
  143. Width="82"
  144. Click="btnRefresh_Click" />
  145. <CheckBox x:Name="cbxForce"
  146. Content="Force"
  147. HorizontalAlignment="Left"
  148. Margin="816,28,0,0"
  149. VerticalAlignment="Top"
  150. RenderTransformOrigin="-0.14,-0.562"
  151. Width="51" />
  152. <ComboBox x:Name="ddlIndexBy"
  153. HorizontalAlignment="Left"
  154. Margin="218,25,0,0"
  155. VerticalAlignment="Top"
  156. Width="92"
  157. SelectionChanged="ddlIndexBy_SelectionChanged" />
  158. <Label x:Name="lblIndexBy"
  159. Content="Index By"
  160. HorizontalAlignment="Left"
  161. Margin="218,0,0,0"
  162. VerticalAlignment="Top"
  163. Height="34"
  164. Width="75"
  165. FontWeight="Bold" />
  166. <ComboBox x:Name="ddlSortBy"
  167. HorizontalAlignment="Left"
  168. Margin="315,25,0,0"
  169. VerticalAlignment="Top"
  170. Width="94"
  171. SelectionChanged="ddlSortBy_SelectionChanged" />
  172. <Label x:Name="lblSortBy"
  173. Content="Sort By"
  174. HorizontalAlignment="Left"
  175. Margin="314,0,0,0"
  176. VerticalAlignment="Top"
  177. Height="34"
  178. Width="75"
  179. FontWeight="Bold" />
  180. <Label x:Name="lblVersion"
  181. Content="Version: "
  182. HorizontalAlignment="Left"
  183. Margin="729,-6,0,0"
  184. VerticalAlignment="Top"
  185. Width="138" />
  186. </Grid>
  187. </controls:MetroWindow>