CloudFilesContent.xaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <UserControl x:Class="PDF_Office.Views.HomePanel.CloudDrive.CloudFilesContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:prism ="http://prismlibrary.com/"
  7. prism:ViewModelLocator.AutoWireViewModel="True"
  8. xmlns:local="clr-namespace:PDF_Office.Views.HomePanel.CloudDrive"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.Resources>
  12. <ContextMenu x:Key="FlyoutMenu" FontSize="14"
  13. >
  14. <ContextMenu.ItemContainerStyle>
  15. <Style TargetType="MenuItem">
  16. <Setter Property="Padding" Value="0,7,0,7"/>
  17. <Setter Property="VerticalContentAlignment" Value="Center"/>
  18. </Style>
  19. </ContextMenu.ItemContainerStyle>
  20. <MenuItem Name="OpenDocMenuItem" Header="打开文件" IsEnabled="True" Click="OpenDocMenuItem_Click">
  21. <MenuItem.Icon>
  22. <Path Fill="Black" Data="M9 0H3V2H0V3H1V14H11V3H12V2H9V0ZM2 13V3H3H4H8H9H10V13H2ZM8 2V1H4V2H8ZM4 12V4H3V12H4ZM6.5 4V12H5.5V4H6.5ZM9 12V4H8V12H9Z">
  23. <Path.RenderTransform>
  24. <TranslateTransform X="5.0000" Y="0"/>
  25. </Path.RenderTransform>
  26. </Path>
  27. </MenuItem.Icon>
  28. </MenuItem>
  29. </ContextMenu>
  30. <Style x:Key="itemstyle" TargetType="{x:Type ListViewItem}">
  31. <Setter Property="ContextMenu" Value="{StaticResource FlyoutMenu}"></Setter>
  32. </Style>
  33. </UserControl.Resources>
  34. <Grid>
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="auto"/>
  37. <RowDefinition/>
  38. </Grid.RowDefinitions>
  39. <Grid HorizontalAlignment="Stretch">
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition />
  42. <ColumnDefinition Width="auto"/>
  43. </Grid.ColumnDefinitions>
  44. <ListBox x:Name="ListFolder">
  45. <ListBox.ItemsPanel>
  46. <ItemsPanelTemplate>
  47. <WrapPanel Orientation="Horizontal"/>
  48. </ItemsPanelTemplate>
  49. </ListBox.ItemsPanel>
  50. </ListBox>
  51. <StackPanel Grid.Column="1" Orientation="Horizontal">
  52. <ComboBox x:Name="combCloudDrive" Grid.Column="1" Width="115" Height="32" Background="Wheat" HorizontalAlignment="Right" SelectionChanged="combCloudDrive_SelectionChanged">
  53. <ComboBox.ItemTemplate>
  54. <DataTemplate>
  55. <Border Background="#DBDBDB">
  56. <TextBlock Text="{Binding DriveName}"/>
  57. </Border>
  58. </DataTemplate>
  59. </ComboBox.ItemTemplate>
  60. </ComboBox>
  61. <Button Content="Test" Click="Button_Click"/>
  62. </StackPanel>
  63. </Grid>
  64. <Grid Grid.Row="1" >
  65. <Grid.ColumnDefinitions>
  66. <ColumnDefinition Width="Auto"/>
  67. <ColumnDefinition/>
  68. </Grid.ColumnDefinitions>
  69. <ListView x:Name="Listusers" Width="220" SelectionChanged="Listusers_SelectionChanged" VerticalAlignment="Top">
  70. <ListView.ItemTemplate>
  71. <DataTemplate>
  72. <Grid Height="50" >
  73. <TextBlock VerticalAlignment="Center" Text="{Binding user.UserAccount}"/>
  74. </Grid>
  75. </DataTemplate>
  76. </ListView.ItemTemplate>
  77. </ListView>
  78. <ListView x:Name="ListvmFiles" Grid.Column="1" ScrollViewer.VerticalScrollBarVisibility="Auto" ItemContainerStyle="{StaticResource itemstyle}">
  79. <ListView.ItemTemplate>
  80. <DataTemplate>
  81. <StackPanel Margin="0,5,0,5">
  82. <StackPanel Orientation="Horizontal">
  83. <TextBlock Text="Id:"/>
  84. <TextBlock Text="{Binding Id}"/>
  85. </StackPanel>
  86. <StackPanel Orientation="Horizontal">
  87. <TextBlock Text="文件名:"/>
  88. <TextBlock Text="{Binding Name}"/>
  89. </StackPanel>
  90. </StackPanel>
  91. </DataTemplate>
  92. </ListView.ItemTemplate>
  93. </ListView>
  94. </Grid>
  95. </Grid>
  96. </UserControl>