|
@@ -10,15 +10,16 @@
|
|
|
d:DataContext="{d:DesignInstance Type=bota:SearchContentViewModel}"
|
|
|
xmlns:helper="clr-namespace:PDF_Office.Helper"
|
|
|
xmlns:convert="clr-namespace:PDF_Office.DataConvert"
|
|
|
+ xmlns:customControl="clr-namespace:PDF_Office.CustomControl"
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
mc:Ignorable="d"
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
|
|
<UserControl.Resources>
|
|
|
<convert:WidthConvert x:Key="WidthConvert"/>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ <convert:BoolToVisible x:Key="BoolToVisible"/>
|
|
|
+ <convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert"/>
|
|
|
+
|
|
|
<Style x:Key="ListViewItemGraySelectStyle" TargetType="{x:Type ListViewItem}">
|
|
|
<Setter Property="UIElement.SnapsToDevicePixels"
|
|
|
Value="True" />
|
|
@@ -110,36 +111,49 @@
|
|
|
</UserControl.Resources>
|
|
|
<Grid Background="#F3F3F3" Width="200">
|
|
|
<Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
<RowDefinition Height="auto"/>
|
|
|
<RowDefinition Height="auto"/>
|
|
|
<RowDefinition/>
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
- <Grid Height="48" >
|
|
|
+ <Grid Height="48" Margin="10,0,10,0">
|
|
|
<TextBlock Text="查找" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
|
|
- <Button Content="完成" HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
|
|
+ <Button Content="完成" HorizontalAlignment="Right" VerticalAlignment="Center" Command="{Binding SearchTextCommand}"/>
|
|
|
</Grid>
|
|
|
|
|
|
- <Grid Height="48" Grid.Row="1">
|
|
|
- <TextBox Width="150" HorizontalAlignment="Left"/>
|
|
|
+ <TextBox Grid.Row="1" Margin="0,0,0,10" Width="180" Height="32" HorizontalAlignment="Center"
|
|
|
+ Text="{Binding SearchContent,Mode=TwoWay}"
|
|
|
+ />
|
|
|
|
|
|
- <Button Content="完成" HorizontalAlignment="Right" VerticalAlignment="Center" Command="{Binding SearchTextCommand}"/>
|
|
|
+ <Grid Grid.Row="2" Margin="10,0,10,0" Visibility="{Binding IsEmpty ,Converter={StaticResource InvertBoolToVisibleConvert}}">
|
|
|
+ <TextBlock Margin="0,0,0,10" Text="All Result" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
|
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
+ <TextBlock Margin="0,0,0,10" Text="Results:" VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
|
|
+ <TextBlock x:Name="TbCount" Margin="0,0,0,10" Text="{Binding SearchCount}" VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
</Grid>
|
|
|
-
|
|
|
- <Grid Grid.Row="2">
|
|
|
- <ListView Grid.Row="1" Name="SearchResultList" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
|
|
- ItemsSource="{Binding searchResults,Mode=OneWay}"
|
|
|
- BorderThickness="0" ItemContainerStyle="{StaticResource ListViewItemGraySelectStyle}"
|
|
|
+ <Grid Grid.Row="3">
|
|
|
+ <ListView Name="SearchResultList" VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
|
|
+ ItemsSource="{Binding searchResults,Mode=OneWay}"
|
|
|
+ BorderThickness="0" ItemContainerStyle="{StaticResource ListViewItemGraySelectStyle}"
|
|
|
+ Visibility="{Binding IsEmpty ,Converter={StaticResource InvertBoolToVisibleConvert}}"
|
|
|
SelectionChanged="SearchResultList_SelectionChanged"
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Hidden">
|
|
|
<ListView.GroupStyle>
|
|
|
<GroupStyle>
|
|
|
<GroupStyle.HeaderTemplate>
|
|
|
<DataTemplate>
|
|
|
- <StackPanel Background="#E2E3E6" Height="24">
|
|
|
- <TextBlock Padding="0,4,12,4" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Right" FontWeight="SemiBold" FontSize="12" Text="{Binding Name}"
|
|
|
+ <Grid Background="#E2E3E6" Height="24" >
|
|
|
+ <TextBlock Padding="0,4,12,4" VerticalAlignment="Stretch" TextAlignment="Center" HorizontalAlignment="Center" FontWeight="SemiBold" FontSize="12" Text="{Binding Name}"
|
|
|
FontFamily="Segoe UI" Foreground="#666666 "/>
|
|
|
- </StackPanel>
|
|
|
+ <customControl:CustomIconToggleBtn x:Name="BtnExptend" Height="24" Click="BtnExptend_Click"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Style="{StaticResource ToggleBtnViewModeStyle}">
|
|
|
+ <TextBlock Text="展开" VerticalAlignment="Center"/>
|
|
|
+ </customControl:CustomIconToggleBtn>
|
|
|
+ </Grid>
|
|
|
</DataTemplate>
|
|
|
</GroupStyle.HeaderTemplate>
|
|
|
<GroupStyle.Panel>
|
|
@@ -174,5 +188,13 @@
|
|
|
</i:Interaction.Triggers>
|
|
|
</ListView>
|
|
|
</Grid>
|
|
|
+
|
|
|
+ <Grid Grid.Row="0" Grid.RowSpan="4" Visibility="{Binding IsEmpty ,Converter={StaticResource BoolToVisible}}">
|
|
|
+ <StackPanel VerticalAlignment="Center" >
|
|
|
+ <Rectangle Margin="0,0,0,10" Width="140" Height="140" Fill="#D9D9D9" />
|
|
|
+ <TextBlock Text="Clik the XXX button below to create a XXX" Foreground="#94989C" Width="180" FontFamily="SF Pro Text" LineHeight="22" FontSize="14" TextAlignment="Center" TextWrapping="Wrap"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
</UserControl>
|