FileSelected.xaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <Window x:Class="WatchDog.WPF.FileSelected"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WatchDog.WPF"
  7. mc:Ignorable="d"
  8. TextElement.FontWeight="Regular"
  9. TextElement.FontSize="14"
  10. TextOptions.TextFormattingMode="Ideal"
  11. TextOptions.TextRenderingMode="Auto"
  12. Background="Wheat"
  13. Title="文件夹选择" Height="450" Width="800">
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="45"/>
  17. <RowDefinition Height="79*"/>
  18. </Grid.RowDefinitions>
  19. <Canvas>
  20. <TextBlock Canvas.Left="26" Canvas.Top="15" >当前目录:</TextBlock>
  21. <Label Content="{Binding CurrentDir}" Canvas.Left="86" Canvas.Top="15" MouseDoubleClick="Label_MouseDoubleClick" />
  22. <Button Background="Beige" Visibility="Hidden"
  23. Foreground="Black"
  24. Canvas.Left="503" Canvas.Top="4"
  25. Command="{Binding RootDirectory}" >磁盘盘符</Button>
  26. <Button Background="Beige"
  27. Foreground="Black"
  28. Canvas.Left="596" Canvas.Top="4"
  29. Command="{Binding PreDirectory}" >上级目录</Button>
  30. <Button Background="Beige"
  31. Foreground="Black"
  32. Canvas.Left="689" Canvas.Top="4"
  33. Command="{Binding SelectedDirectory}" >选择目录</Button>
  34. </Canvas>
  35. <ListView ItemsSource="{Binding FilesPath}" Grid.Row="1"
  36. MouseDoubleClick="ListView_MouseDoubleClick"
  37. SelectedItem="{Binding SelectedItem}"
  38. >
  39. </ListView>
  40. </Grid>
  41. </Window>