Skip to content

Commit

Permalink
完成搜索框UI调整
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWFan authored and ThomasWFan committed Oct 16, 2016
1 parent 28acc84 commit abe9947
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bilibili2/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@
<Grid Grid.Column="3" x:Name="TrueTitleBar" Background="Transparent">
<Image Grid.Column="0" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Source="ms-appx:///Assets/LOGOTITLE.png" Height="24"/>
</Grid>
<AutoSuggestBox Grid.Column="2" Grid.ColumnSpan="2" x:Name="top_txt_find" PlaceholderText="输入关键字或AV号" Visibility="Collapsed" Height="32" Width="180" QueryIcon="Find" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Style="{StaticResource AutoSuggestBoxStyle1}" TextChanged="top_txt_find_TextChanged" QuerySubmitted="top_txt_find_QuerySubmitted" SuggestionChosen="top_txt_find_SuggestionChosen"/>
<AutoSuggestBox Grid.Column="2" Grid.ColumnSpan="2" x:Name="top_txt_find" PlaceholderText="输入关键字或AV号" Visibility="Collapsed" Height="32" Width="180" QueryIcon="Find" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="5,0" Style="{StaticResource AutoSuggestBoxStyle1}" BorderThickness="1" TextChanged="top_txt_find_TextChanged" QuerySubmitted="top_txt_find_QuerySubmitted" SuggestionChosen="top_txt_find_SuggestionChosen"/>
<Button Grid.Column="0" x:Name="btn_back" Style="{ThemeResource TitleBarBackButtonTheme}" Width="48" Height="32" Background="{ThemeResource Bili-ForeColor}" Foreground="White"/>
<Button Grid.Column="1" x:Name="btn_refresh" Style="{ThemeResource TitleBarRefreshButtonTheme}" Width="48" Height="32" Background="{ThemeResource Bili-ForeColor}" Foreground="White"/>
<Button Grid.Column="2" x:Name="btn_search" Style="{ThemeResource TitleBarSearchButtonTheme}" Width="48" Height="32" Background="{ThemeResource Bili-ForeColor}" Foreground="White"/>
<Button Grid.Column="2" x:Name="btn_search" Style="{ThemeResource TitleBarSearchButtonTheme}" Width="48" Height="32" Background="{ThemeResource Bili-ForeColor}" Foreground="White" Click="btn_search_Click"/>
</Grid>
<SplitView x:Name="sp_View" Grid.Row="2" OpenPaneLength="200" PaneBackground="{ThemeResource Bili-MenuBack}" DisplayMode="Overlay" PaneClosed="sp_View_PaneClosed" >
<SplitView.Pane>
Expand Down Expand Up @@ -538,7 +538,7 @@
<TextBlock Text="首页" FontSize="16" x:Name="top_txt_Header" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White" />

<StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" HorizontalAlignment="Right" >
<AppBarButton x:Name="btn_User" Icon="Contact" Width="48" Height="48" Foreground="White" Click="btn_GoFind_Click"/>
<AppBarButton x:Name="btn_User" Icon="Contact" Width="48" Height="48" Foreground="White" Click="btn_User_Click"/>
<AppBarButton Icon="Download" Visibility="Collapsed" Width="48" Height="48" Foreground="White"></AppBarButton>

</StackPanel>
Expand Down
13 changes: 13 additions & 0 deletions bilibili2/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,8 @@ private void top_txt_find_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQu
}
else
{
top_txt_find.Visibility = Visibility.Collapsed;
btn_search.Visibility = Visibility.Visible;
infoFrame.Navigate(typeof(SearchPage), top_txt_find.Text);
}
}
Expand Down Expand Up @@ -2071,6 +2073,17 @@ private async void User_load_more_Click(object sender, RoutedEventArgs e)
Moreing = true;
}
}

private void btn_User_Click(object sender, RoutedEventArgs e)
{

}

private void btn_search_Click(object sender, RoutedEventArgs e)
{
btn_search.Visibility = Visibility.Collapsed;
top_txt_find.Visibility = Visibility.Visible;
}
}

public class FeedItemDataTemplateSelector : DataTemplateSelector
Expand Down

0 comments on commit abe9947

Please sign in to comment.