mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00
Updated nuspec to target any CPU
This commit is contained in:
50
ModernKeePass/Pages/BasicPage1.xaml
Normal file
50
ModernKeePass/Pages/BasicPage1.xaml
Normal file
@@ -0,0 +1,50 @@
|
||||
<Page
|
||||
x:Name="pageRoot"
|
||||
x:Class="ModernKeePass.Pages.BasicPage1"
|
||||
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:ModernKeePass.Pages"
|
||||
xmlns:common="using:ModernKeePass.Common"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Page.Resources>
|
||||
<!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
|
||||
<x:String x:Key="AppName">My Application</x:String>
|
||||
</Page.Resources>
|
||||
|
||||
<!--
|
||||
This grid acts as a root panel for the page that defines two rows:
|
||||
* Row 0 contains the back button and page title
|
||||
* Row 1 contains the rest of the page layout
|
||||
-->
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid.ChildrenTransitions>
|
||||
<TransitionCollection>
|
||||
<EntranceThemeTransition/>
|
||||
</TransitionCollection>
|
||||
</Grid.ChildrenTransitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="140"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Back button and page title -->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="backButton" Margin="39,59,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
|
||||
Style="{StaticResource NavigationBackButtonNormalStyle}"
|
||||
VerticalAlignment="Top"
|
||||
AutomationProperties.Name="Back"
|
||||
AutomationProperties.AutomationId="BackButton"
|
||||
AutomationProperties.ItemType="Navigation Button"/>
|
||||
<TextBlock x:Name="pageTitle" Text="{StaticResource AppName}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1"
|
||||
IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,30,40"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
106
ModernKeePass/Pages/BasicPage1.xaml.cs
Normal file
106
ModernKeePass/Pages/BasicPage1.xaml.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using ModernKeePass.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
// The Basic Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234237
|
||||
|
||||
namespace ModernKeePass.Pages
|
||||
{
|
||||
/// <summary>
|
||||
/// A basic page that provides characteristics common to most applications.
|
||||
/// </summary>
|
||||
public sealed partial class BasicPage1 : Page
|
||||
{
|
||||
|
||||
private NavigationHelper navigationHelper;
|
||||
private ObservableDictionary defaultViewModel = new ObservableDictionary();
|
||||
|
||||
/// <summary>
|
||||
/// This can be changed to a strongly typed view model.
|
||||
/// </summary>
|
||||
public ObservableDictionary DefaultViewModel
|
||||
{
|
||||
get { return this.defaultViewModel; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NavigationHelper is used on each page to aid in navigation and
|
||||
/// process lifetime management
|
||||
/// </summary>
|
||||
public NavigationHelper NavigationHelper
|
||||
{
|
||||
get { return this.navigationHelper; }
|
||||
}
|
||||
|
||||
|
||||
public BasicPage1()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.navigationHelper = new NavigationHelper(this);
|
||||
this.navigationHelper.LoadState += navigationHelper_LoadState;
|
||||
this.navigationHelper.SaveState += navigationHelper_SaveState;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Populates the page with content passed during navigation. Any saved state is also
|
||||
/// provided when recreating a page from a prior session.
|
||||
/// </summary>
|
||||
/// <param name="sender">
|
||||
/// The source of the event; typically <see cref="Common.NavigationHelper"/>
|
||||
/// </param>
|
||||
/// <param name="e">Event data that provides both the navigation parameter passed to
|
||||
/// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
|
||||
/// a dictionary of state preserved by this page during an earlier
|
||||
/// session. The state will be null the first time a page is visited.</param>
|
||||
private void navigationHelper_LoadState(object sender, LoadStateEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Preserves state associated with this page in case the application is suspended or the
|
||||
/// page is discarded from the navigation cache. Values must conform to the serialization
|
||||
/// requirements of <see cref="Common.SuspensionManager.SessionState"/>.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event; typically <see cref="Common.NavigationHelper"/></param>
|
||||
/// <param name="e">Event data that provides an empty dictionary to be populated with
|
||||
/// serializable state.</param>
|
||||
private void navigationHelper_SaveState(object sender, SaveStateEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#region NavigationHelper registration
|
||||
|
||||
/// The methods provided in this section are simply used to allow
|
||||
/// NavigationHelper to respond to the page's navigation methods.
|
||||
///
|
||||
/// Page specific logic should be placed in event handlers for the
|
||||
/// <see cref="Common.NavigationHelper.LoadState"/>
|
||||
/// and <see cref="Common.NavigationHelper.SaveState"/>.
|
||||
/// The navigation parameter is available in the LoadState method
|
||||
/// in addition to page state preserved during an earlier session.
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
navigationHelper.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
navigationHelper.OnNavigatedFrom(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -8,9 +8,11 @@
|
||||
xmlns:ViewModels="using:ModernKeePass.ViewModels"
|
||||
x:Name="pageRoot"
|
||||
x:Class="ModernKeePass.Pages.GroupDetailPage"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding ViewModel, RelativeSource={RelativeSource Mode=Self}}">
|
||||
|
||||
mc:Ignorable="d" >
|
||||
<Page.DataContext>
|
||||
<ViewModels:GroupVm />
|
||||
</Page.DataContext>
|
||||
|
||||
<Grid>
|
||||
<Grid.ChildrenTransitions>
|
||||
<TransitionCollection>
|
||||
@@ -25,7 +27,7 @@
|
||||
<Grid.Resources>
|
||||
<CollectionViewSource
|
||||
x:Name="itemsViewSource"
|
||||
Source="{Binding Groups}"/>
|
||||
Source="{Binding Path=Groups}"/>
|
||||
</Grid.Resources>
|
||||
<!-- Horizontal scrolling grid -->
|
||||
<GridView
|
||||
@@ -82,7 +84,7 @@
|
||||
AutomationProperties.Name="Back"
|
||||
AutomationProperties.AutomationId="BackButton"
|
||||
AutomationProperties.ItemType="Navigation Button"/>
|
||||
<TextBlock x:Name="pageTitle" Text="{Binding Name}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1"
|
||||
<TextBlock x:Name="pageTitle" Text="{Binding Path=Name}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1"
|
||||
IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,30,40"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
@@ -69,6 +69,7 @@ namespace ModernKeePass.Pages
|
||||
if (e.Parameter is GroupVm)
|
||||
{
|
||||
ViewModel = e.Parameter as GroupVm;
|
||||
ViewModel?.NotifyPropertyChanged("Name");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user