Remove number placeholder in the right of result item.

This commit is contained in:
qianlifeng 2014-02-09 11:24:47 +08:00
parent a9fa1fb66b
commit 953adadd62
3 changed files with 1 additions and 21 deletions

View File

@ -12,10 +12,9 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="32"></ColumnDefinition>
<ColumnDefinition/>
<ColumnDefinition Width="73.064"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image x:Name="imgIco" Width="32" Height="32" HorizontalAlignment="Left" ></Image>
<Grid Margin="5 0 0 0" Grid.Column="1">
<Grid Margin="5 0 5 0" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition x:Name="SubTitleRowDefinition"></RowDefinition>
@ -23,9 +22,5 @@
<TextBlock Style="{DynamicResource ItemTitleStyle}" VerticalAlignment="Center" x:Name="tbTitle">Title</TextBlock>
<TextBlock Style="{DynamicResource ItemSubTitleStyle}" Grid.Row="1" x:Name="tbSubTitle">sub title</TextBlock>
</Grid>
<DockPanel Grid.Column="2" Visibility="Hidden">
<Image x:Name="img" Source="Images\ctrl.png" VerticalAlignment="Center"/>
<TextBlock x:Name="tbIndex" Visibility="Hidden" FontSize="16" Foreground="#5c1f87" Margin="0 5 0 0" Text="1" VerticalAlignment="Center" HorizontalAlignment="Left" />
</DockPanel>
</Grid>
</UserControl>

View File

@ -30,24 +30,10 @@ namespace Wox
set
{
selected = value;
if (selected)
{
img.Visibility = Visibility.Visible;
img.Source = new BitmapImage(new Uri(Directory.GetCurrentDirectory() + "\\Images\\enter.png"));
}
else
{
img.Visibility = Visibility.Hidden;
}
OnPropertyChanged("Selected");
}
}
public void SetIndex(int index)
{
tbIndex.Text = index.ToString();
}
public ResultItem(Result result)
{
InitializeComponent();

View File

@ -36,7 +36,6 @@ namespace Wox
if (!CheckExisted(result))
{
ResultItem control = new ResultItem(result);
control.SetIndex(i + 1);
pnlContainer.Children.Insert(GetInsertLocation(result.Score), control);
}
}