CloudFilesContent.xaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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="combCloudDisk" Grid.Column="1" Width="115" Height="32" Background="Wheat" HorizontalAlignment="Right"/>
  53. <Button Content="Test" Click="Button_Click"/>
  54. </StackPanel>
  55. </Grid>
  56. <Grid Grid.Row="1" >
  57. <Grid.ColumnDefinitions>
  58. <ColumnDefinition Width="Auto"/>
  59. <ColumnDefinition/>
  60. </Grid.ColumnDefinitions>
  61. <ListView x:Name="Listusers" Width="220" SelectionChanged="Listusers_SelectionChanged" VerticalAlignment="Top">
  62. <ListView.ItemTemplate>
  63. <DataTemplate>
  64. <Grid Height="50" >
  65. <TextBlock VerticalAlignment="Center" Text="{Binding user.UserAccount}"/>
  66. </Grid>
  67. </DataTemplate>
  68. </ListView.ItemTemplate>
  69. </ListView>
  70. <ListView x:Name="ListvmFiles" Grid.Column="1" ScrollViewer.VerticalScrollBarVisibility="Auto" ItemContainerStyle="{StaticResource itemstyle}">
  71. <ListView.ItemTemplate>
  72. <DataTemplate>
  73. <StackPanel Margin="0,5,0,5">
  74. <StackPanel Orientation="Horizontal">
  75. <TextBlock Text="Id:"/>
  76. <TextBlock Text="{Binding Id}"/>
  77. </StackPanel>
  78. <StackPanel Orientation="Horizontal">
  79. <TextBlock Text="文件名:"/>
  80. <TextBlock Text="{Binding Name}"/>
  81. </StackPanel>
  82. </StackPanel>
  83. </DataTemplate>
  84. </ListView.ItemTemplate>
  85. </ListView>
  86. </Grid>
  87. </Grid>
  88. </UserControl>