HomeContent.xaml 7.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.RowDefinitions>
  31. <RowDefinition Height="Auto"/>
  32. <RowDefinition/>
  33. </Grid.RowDefinitions>
  34. <Grid.ColumnDefinitions>
  35. <ColumnDefinition Width="270" />
  36. <ColumnDefinition Width="*" />
  37. </Grid.ColumnDefinitions>
  38. <!-- 左侧菜单栏 -->
  39. <StackPanel>
  40. <Button x:Name="BtnOpenPDF" Height="48" Margin="41,54,41,0" Foreground="#FFFFFF" Background="#19233B" BorderThickness="1"
  41. Command="{Binding OpenFileCommand}"
  42. Style="{StaticResource BlueBtnStyle}" >
  43. <StackPanel Orientation="Horizontal">
  44. <TextBlock x:Name="TxbOpenPDF" Text="Open File" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="16"/>
  45. </StackPanel>
  46. </Button>
  47. <Button x:Name="BtnCreatPDF" Height="48" Width="188" Margin="41,8,41,0" Background="White" BorderThickness="1" HorizontalContentAlignment="Left"
  48. Command="{Binding OpenFileCommand}"
  49. Style="{StaticResource BlueBtnStyle}" >
  50. <Grid Width="184" >
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition />
  53. <ColumnDefinition Width="48"/>
  54. </Grid.ColumnDefinitions>
  55. <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
  56. <Image Width="30" Height="30" Source="../Resources/HomeIcon/file_addition.png" Margin="18,0,12,0"/>
  57. <TextBlock x:Name="TxbCreatePDF" Text="Creat PDF" VerticalAlignment="Center" FontFamily="Segoe UI" Foreground="{StaticResource Common.ForGround.Blue}" FontSize="16"/>
  58. </StackPanel>
  59. <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment='Center'>
  60. <Rectangle Fill="#6B869C" Width="1" Height="48" Margin="0,0,8,0"/>
  61. <Path Data="M12.0001 6.00012L8 10.0002L3.99988 6.00012" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="#6B869C"/>
  62. </StackPanel>
  63. </Grid>
  64. </Button>
  65. <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"
  66. Style="{StaticResource ToggleBtnSelectStyle}">
  67. <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
  68. <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"/>
  69. <TextBlock x:Name="TxbHome" Text="Home" VerticalAlignment="Center" Margin="8,0,0,0" FontFamily="SF Pro Text" FontSize="14"/>
  70. </StackPanel>
  71. </customControl:CustomIconToggleBtn>
  72. <customControl:CustomIconToggleBtn x:Name="BtnTool" Width="216" Height="40" HorizontalContentAlignment="Left" Tag="GridMode" Command="{Binding ShowToolCommand}" CommandParameter="Tools" Click="ToggleBtnSelect_Click"
  73. Style="{StaticResource ToggleBtnSelectStyle}">
  74. <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
  75. <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"/>
  76. <TextBlock x:Name="TxbTool" Text="Tool" VerticalAlignment="Center" Margin="8,0,0,0" FontFamily="SF Pro Text" FontSize="14"/>
  77. </StackPanel>
  78. </customControl:CustomIconToggleBtn>
  79. <customControl:CustomIconToggleBtn x:Name="BtnCloud" Width="216" HorizontalContentAlignment="Left" Height="40" Tag="GridMode" Command="{Binding ShowToolCommand}" CommandParameter="Cloud" Click="ToggleBtnSelect_Click"
  80. Style="{StaticResource ToggleBtnSelectStyle}">
  81. <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
  82. <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"/>
  83. <TextBlock x:Name="TxbCloud" Text="Cloud" FontFamily="SF Pro Text" FontSize="14" VerticalAlignment="Center" Margin="8,0,0,0" />
  84. </StackPanel>
  85. </customControl:CustomIconToggleBtn>
  86. </StackPanel>
  87. <homePanel:PromotionContent Grid.Row="1"/>
  88. <!-- 右侧内容区域 -->
  89. <ContentControl Grid.Column="1" Grid.RowSpan="2" prism:RegionManager.RegionName="{Binding ToolRegionName}" />
  90. <cus:LoadingControl Grid.ColumnSpan="2" Grid.RowSpan="2" Visibility="{Binding IsLoading}" />
  91. </Grid>
  92. </UserControl>