HomeContent.xaml 6.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <UserControl
  2. x:Class="PDF_Office.Views.HomeContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:prism="http://prismlibrary.com/"
  9. xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
  10. d:DesignHeight="450"
  11. d:DesignWidth="800"
  12. prism:ViewModelLocator.AutoWireViewModel="True"
  13. xmlns:customControl ="clr-namespace:PDF_Office.CustomControl"
  14. xmlns:homePanel="clr-namespace:PDF_Office.Views.HomePanel"
  15. mc:Ignorable="d">
  16. <UserControl.Resources>
  17. <ResourceDictionary>
  18. <ResourceDictionary.MergedDictionaries>
  19. <ResourceDictionary Source="../Styles/CustomBtnStyle.xaml"/>
  20. </ResourceDictionary.MergedDictionaries>
  21. <DataTemplate x:Key="PromotionDataTemplate">
  22. <StackPanel Background="White" Orientation="Horizontal" Cursor="Hand" Margin="0,10,0,10">
  23. <Image Width="16" Height="16" Source="{Binding ImagePath}" Margin="0,0,10,0"/>
  24. <TextBlock Text="{Binding Content}" FontSize="14" Foreground="#6B6F7D"/>
  25. </StackPanel>
  26. </DataTemplate>
  27. </ResourceDictionary>
  28. </UserControl.Resources>
  29. <Grid>
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition Width="270" />
  32. <ColumnDefinition Width="*" />
  33. </Grid.ColumnDefinitions>
  34. <!-- 左侧菜单栏 -->
  35. <StackPanel>
  36. <Button x:Name="BtnOpenPDF" Height="48" Margin="41,54,41,0" Foreground="#FFFFFF" Background="#19233B" BorderThickness="1"
  37. Command="{Binding OpenFileCommand}"
  38. Style="{StaticResource BlueBtnStyle}" >
  39. <StackPanel Orientation="Horizontal">
  40. <TextBlock x:Name="TxbOpenPDF" Text="Open File" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="16"/>
  41. </StackPanel>
  42. </Button>
  43. <Button x:Name="BtnCreatPDF" Height="48" Width="188" Margin="41,8,41,0" Background="White" BorderThickness="1" HorizontalContentAlignment="Left"
  44. Command="{Binding OpenFileCommand}"
  45. Style="{StaticResource BlueBtnStyle}" >
  46. <Grid Width="184" >
  47. <Grid.ColumnDefinitions>
  48. <ColumnDefinition />
  49. <ColumnDefinition Width="48"/>
  50. </Grid.ColumnDefinitions>
  51. <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
  52. <Image Width="30" Height="30" Source="../Resources/HomeIcon/file_addition.png" Margin="18,0,12,0"/>
  53. <TextBlock x:Name="TxbCreatePDF" Text="Creat PDF" VerticalAlignment="Center" FontFamily="Segoe UI" Foreground="{StaticResource Common.ForGround.Blue}" FontSize="16"/>
  54. </StackPanel>
  55. <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment='Center'>
  56. <Rectangle Fill="#6B869C" Width="1" Height="48" Margin="0,0,8,0"/>
  57. <Path Data="M12.0001 6.00012L8 10.0002L3.99988 6.00012" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="#6B869C"/>
  58. </StackPanel>
  59. </Grid>
  60. </Button>
  61. <customControl:CustomIconToggleBtn x:Name="BtnGuid" Margin="0,24,0,0" Width="216" HorizontalContentAlignment="Left" Height="40" Tag="GridMode" Command="{Binding ShowToolCommand}" CommandParameter="Guid" Click="ToggleBtnSelect_Click"
  62. Style="{StaticResource ToggleBtnSelectStyle}">
  63. <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
  64. <Path Fill="{Binding ElementName=BtnGuid,Path=Foreground}" Data="M3.8655 5.79653C3.32363 6.16977 3 6.78565 3 7.44363V15C3 16.1046 3.89543 17 5 17H9V13.1785C9 12.6262 9.44772 12.1785 10 12.1785C10.5523 12.1785 11 12.6262 11 13.1785V17H15C16.1046 17 17 16.1046 17 15V7.44363C17 6.78565 16.6764 6.16977 16.1345 5.79653L11.1345 2.3526C10.4514 1.88206 9.54865 1.88206 8.8655 2.3526L3.8655 5.79653Z"/>
  65. <TextBlock x:Name="TxbHome" Text="Home" VerticalAlignment="Center" Margin="8,0,0,0" FontFamily="SF Pro Text" FontSize="14"/>
  66. </StackPanel>
  67. </customControl:CustomIconToggleBtn>
  68. <customControl:CustomIconToggleBtn x:Name="BtnTool" Width="216" Height="40" HorizontalContentAlignment="Left" Tag="GridMode" Command="{Binding ShowToolCommand}" CommandParameter="Tools" Click="ToggleBtnSelect_Click"
  69. Style="{StaticResource ToggleBtnSelectStyle}">
  70. <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
  71. <Path Fill="{Binding ElementName=BtnTool,Path=Foreground}" Data="M3.8655 5.79653C3.32363 6.16977 3 6.78565 3 7.44363V15C3 16.1046 3.89543 17 5 17H9V13.1785C9 12.6262 9.44772 12.1785 10 12.1785C10.5523 12.1785 11 12.6262 11 13.1785V17H15C16.1046 17 17 16.1046 17 15V7.44363C17 6.78565 16.6764 6.16977 16.1345 5.79653L11.1345 2.3526C10.4514 1.88206 9.54865 1.88206 8.8655 2.3526L3.8655 5.79653Z"/>
  72. <TextBlock x:Name="TxbTool" Text="Tool" VerticalAlignment="Center" Margin="8,0,0,0" FontFamily="SF Pro Text" FontSize="14"/>
  73. </StackPanel>
  74. </customControl:CustomIconToggleBtn>
  75. <customControl:CustomIconToggleBtn x:Name="BtnCloud" Width="216" HorizontalContentAlignment="Left" Height="40" Tag="GridMode" Command="{Binding ShowToolCommand}" CommandParameter="Cloud" Click="ToggleBtnSelect_Click"
  76. Style="{StaticResource ToggleBtnSelectStyle}">
  77. <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
  78. <Path Fill="{Binding ElementName=BtnCloud,Path=Foreground}" Data="M14.95 16.5H5.5C3.01472 16.5 1 14.4853 1 12C1 9.51472 3.01472 7.5 5.5 7.5L5.52018 7.50004C5.74751 4.9771 7.86787 3 10.45 3C13.1838 3 15.4 5.21619 15.4 7.95C15.4 8.10931 15.3925 8.26686 15.3778 8.42232C17.4134 8.63601 19 10.3577 19 12.45C19 14.6701 17.2137 16.4729 15 16.4997V16.5H14.95Z"/>
  79. <TextBlock x:Name="TxbCloud" Text="Cloud" FontFamily="SF Pro Text" FontSize="14" VerticalAlignment="Center" Margin="8,0,0,0" />
  80. </StackPanel>
  81. </customControl:CustomIconToggleBtn>
  82. <homePanel:PromotionContent/>
  83. </StackPanel>
  84. <!-- 右侧内容区域 -->
  85. <ContentControl Grid.Column="1" prism:RegionManager.RegionName="{Binding ToolRegionName}" />
  86. <cus:LoadingControl Grid.ColumnSpan="2" Visibility="{Binding IsLoading}" />
  87. </Grid>
  88. </UserControl>