WIP Search

This commit is contained in:
2017-10-10 18:55:16 +02:00
committed by BONNEVILLE Geoffroy
parent ec4f2e7d88
commit f5fd3effaf
3 changed files with 16 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.ApplicationModel.Search;
using Windows.Foundation;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -99,7 +101,7 @@ namespace ModernKeePass
Database.Save();
deferral.Complete();
}
protected override void OnFileActivated(FileActivatedEventArgs args)
{
base.OnFileActivated(args);

View File

@@ -24,7 +24,7 @@
<Grid.Resources>
<CollectionViewSource
x:Name="GroupsViewSource"
Source="{Binding Groups}"/>
Source="{Binding Groups}" />
<CollectionViewSource
x:Name="EntriesViewSource"
Source="{Binding Entries}" />
@@ -209,7 +209,7 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<Button Margin="39,0,39,0"
Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
@@ -228,8 +228,17 @@
VerticalAlignment="Center"
Margin="0,0,30,0"/>
<CommandBar Grid.Column="2" Background="Transparent" IsOpen="True" VerticalAlignment="Center" Margin="0,20,0,0">
<AppBarButton Icon="Find" Label="Search">
<AppBarButton.Flyout>
<Flyout>
<StackPanel>
<SearchBox PlaceholderText="Search..." Width="350" />
</StackPanel>
</Flyout>
</AppBarButton.Flyout>
</AppBarButton>
<AppBarToggleButton Icon="Edit" Label="Edit" IsChecked="{Binding IsEditMode, Mode=TwoWay}" />
<AppBarButton Icon="Delete" Label="Delete" IsEnabled="{Binding IsNotRoot}" Click="AppBarButton_Click" />
<AppBarButton Icon="Delete" Label="Delete" IsEnabled="{Binding IsNotRoot}" Click="DeleteButton_Click" />
</CommandBar>
</Grid>
</Grid>

View File

@@ -98,7 +98,7 @@ namespace ModernKeePass.Pages
Frame.Navigate(typeof(EntryDetailPage), GridView.SelectedItem as EntryVm);
}
private void AppBarButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
private void DeleteButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
var group = DataContext as GroupVm;
group?.RemoveGroup();