MainWindow.xaml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <Window x:Class="MediaBrowser.ServerApplication.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:tb="http://www.hardcodet.net/taskbar"
  5. Title="Media Browser Server" Height="350" Width="525" AllowsTransparency="True" Background="Transparent" WindowStyle="None" ShowInTaskbar="False">
  6. <Grid>
  7. <tb:TaskbarIcon Name="MbTaskbarIcon" ToolTipText="Media Browser Server">
  8. <tb:TaskbarIcon.ContextMenu>
  9. <ContextMenu Background="White">
  10. <MenuItem x:Name="cmdBrowseLibrary" Header="Browse Library" Click="cmdBrowseLibrary_click"/>
  11. <MenuItem x:Name="cmOpenDashboard" Header="Configure Media Browser" Click="cmOpenDashboard_click"/>
  12. <Separator x:Name="separatorDeveloperTools"/>
  13. <MenuItem x:Name="cmOpenExplorer" Header="Open Library Explorer" Click="cmOpenExplorer_click" />
  14. <MenuItem x:Name="cmdReloadServer" Header="Restart Server" Click="cmdReloadServer_click" />
  15. <MenuItem x:Name="cmdApiDocs" Header="View Api Documentation">
  16. <MenuItem x:Name="cmdStandardApiDocs" Header="Standard" Click="cmdApiDocs_Click" Background="White">
  17. </MenuItem>
  18. <MenuItem x:Name="cmdSwaggerApiDocs" Header="Swagger" Click="cmdSwaggerApiDocs_Click" Background="White">
  19. </MenuItem>
  20. </MenuItem>
  21. <Separator/>
  22. <MenuItem x:Name="cmShowLogWindow" Header="Show Log Window" IsCheckable="True" Click="CmShowLogWindow_click"/>
  23. <MenuItem x:Name="cmVisitCT" Header="Visit Community" Click="cmVisitCT_click"/>
  24. <Separator/>
  25. <MenuItem x:Name="cmExit" Header="Exit" Click="cmExit_click"/>
  26. </ContextMenu>
  27. </tb:TaskbarIcon.ContextMenu>
  28. <tb:TaskbarIcon.Style>
  29. <Style TargetType="{x:Type tb:TaskbarIcon}">
  30. <Setter Property="IconSource" Value="/Resources/Images/icon.ico" />
  31. <Style.Triggers>
  32. <DataTrigger Binding="{Binding LoadingImageIndex}" Value="1">
  33. <Setter Property="IconSource" Value="/Resources/Images/Loading/1.ico" />
  34. </DataTrigger>
  35. <DataTrigger Binding="{Binding LoadingImageIndex}" Value="2">
  36. <Setter Property="IconSource" Value="/Resources/Images/Loading/2.ico" />
  37. </DataTrigger>
  38. <DataTrigger Binding="{Binding LoadingImageIndex}" Value="3">
  39. <Setter Property="IconSource" Value="/Resources/Images/Loading/3.ico" />
  40. </DataTrigger>
  41. <DataTrigger Binding="{Binding LoadingImageIndex}" Value="4">
  42. <Setter Property="IconSource" Value="/Resources/Images/Loading/4.ico" />
  43. </DataTrigger>
  44. <DataTrigger Binding="{Binding LoadingImageIndex}" Value="5">
  45. <Setter Property="IconSource" Value="/Resources/Images/Loading/5.ico" />
  46. </DataTrigger>
  47. <DataTrigger Binding="{Binding LoadingImageIndex}" Value="6">
  48. <Setter Property="IconSource" Value="/Resources/Images/Loading/6.ico" />
  49. </DataTrigger>
  50. </Style.Triggers>
  51. </Style>
  52. </tb:TaskbarIcon.Style>
  53. </tb:TaskbarIcon>
  54. </Grid>
  55. </Window>