123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <UserControl x:Class="PDF_Office.Views.EditTools.Background.BackgroundTemplateListFileContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True"
- xmlns:data ="clr-namespace:PDFSettings;assembly=PDFSettings"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:background="clr-namespace:PDF_Office.ViewModels.EditTools.Background" d:DataContext="{d:DesignInstance Type=background:BackgroundTemplateListFileContentViewModel}"
- mc:Ignorable="d"
- d:DesignHeight="632"
- d:DesignWidth="260">
- <Grid Background="#F3F3F3">
- <ListBox Name="TextWatermarkListbox"
- Width="240"
- BorderThickness="0"
- ScrollViewer.CanContentScroll="True"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Hidden"
- VirtualizingPanel.IsVirtualizing="True"
- VirtualizingPanel.VirtualizationMode="Standard"
- VirtualizingPanel.CacheLengthUnit="Page"
- VirtualizingPanel.CacheLength="1"
- VirtualizingPanel.ScrollUnit="Pixel"
- Background="#F3F3F3"
- ItemsSource="{Binding BackgroundModFileCollection}">
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem">
- <Setter Property="Margin" Value="0"/>
- <Setter Property="Padding" Value="8 0 8 0"/>
- <!--<Setter Property="ContextMenu" Value="{StaticResource FlyoutMenu}"/>-->
- <Setter Property="Template" Value="{DynamicResource ListBoxItemControlTemplate}"/>
- </Style>
- </ListBox.ItemContainerStyle>
- <ListBox.ItemTemplate>
- <DataTemplate DataType="{x:Type data:BackgroundItem}">
- <StackPanel Name="itemPanel" >
- <Grid Height="160" Width=" 128" Background="Blue">
- <Label Height="160" Width=" 128"></Label>
- <Label Height="160" Width=" 128"></Label>
- <Button Name="EditTemplateBtn" Height="43" Width="63" HorizontalAlignment="Left" VerticalAlignment="Bottom"></Button>
- <Button Name="DeleteTemplateBtn" Height="43" Width="63" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="DeleteTemplateBtn_Click" Command="{Binding DeleteTemplateItemCommand}" CommandParameter="{Binding ElementName=DeleteTemplateBtn}">
- </Button>
- </Grid>
- </StackPanel>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="EditTemplateBtn" Property="Visibility" Value="Visible"/>
- <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="False">
- <Setter TargetName="EditTemplateBtn" Property="Visibility" Value="Collapsed"/>
- <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Collapsed"/>
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Grid Width="140" Height="155" Margin="64,153,56,324" Visibility="{Binding CreateTemplateVisible, Mode=OneWay}">
- <StackPanel Orientation="Vertical">
- <Label Height="87" Width="87" HorizontalAlignment="Center" Background="BlueViolet"></Label>
- <TextBlock Height="24" FontSize="14" Text="请先创建一个背景模板" Margin="0,8,0,0" VerticalAlignment="Center" ></TextBlock>
- <Button Height="24" Width="44" Margin="0,12,0,0" Content ="新建" Command="{Binding AddTemplateCommand}"></Button>
- </StackPanel>
- </Grid>
- </Grid>
- </UserControl>
|