To work with .NET MAUI user interface, I wish there was a template for Shell which I can start with it. However, the default template has only a very simple Shell example as below.

1
2
3
4
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />

I like the built-in Shell template in Xamarin.Forms so I rebuilt the same for .NET MAUI. If you like the same, you can use this project template.
This template includes the following features:

  1. A master-detail user interface using Shell
  2. Using MVVM Toolkit source generator to replace the original INotifyPropertyChanged
  3. Using .NET MAUI built-in Dependency Injection to replace DependencyService
  4. Added unit test using xUnit and NSubstitute

LoginPage

loginpage

AboutPage

aboutpage

Flyout menu

flyoutpage

ItemsPage

itemspage

NewItemPage

newitempage

You can download Visual Studio project template (.NET MAUI) at:

.NET MAUI Project and Item Templates - VS Marketplace

Build environment

This template is built using Visual Studio Version 17.5.0 on Windows.

Build and Test on macOS

I tested this template on macOS using Visual Studio for Mac Version 17.4.1. I cannot build and test using Visual Studio for Mac directly. We need to wait for a better .NET MAUI support in the future release.

However, it is possible to build and run from the command line.

Build and run as a Mac Catalyst app

1
dotnet build -t:Run -f net7.0-maccatalyst

Build and run on iOS

1
dotnet build -t:Run -f net7.0-ios

Known Issues

There are two issues on iOS and macOS as below.

newitempage

隐私声明

隐私保护声明适用范围包括PassXYZ应用及相关的网站。

本隐私声明阐述了 PassXYZ 处理的个人数据的方式和目的。

信息的收集,使用和分享

本网站是一个静态网站使用GitHub提供的服务。静态网站没有任何信息收集的能力。关于GitHub服务的使用,请参考GitHub的隐私保护声明。

PassXYZ应用帮助存储您的个人数据在本地设备并使用KeePass 加密格式。应用本身并不会通过网络收集任何个人数据。PassXYZ的部分字体和图标是从网络下载的。

隐私声明的更新

您可以通过本网站获取最新的隐私保护声明。

KPCLibPy is a KeePass command application written in Python.

The original KeePass by Dominik Reichl is a .NET application written in C#. KeePassLib is part of KeePass which can be built as a library to support the major functions of KeePass. However, at the moment, KeePassLib is still built for .NET framework which can run on Windows only. I modified KeePassLib and extended it as a .NET Standard library - KPCLib. KPCLib stands for KeePass Portable Class Library at the time when I started the work. Portable Class Library (PCL) is replaced by .NET Standard Library nowadays.

KPCLibPy is just a Python wrapper of KPCLib using Python.NET. In this perspective, KPCLibPy is fully compatible to the original KeePass, since the majority of code is the same as KeePass.

In order to save the development effort and have a nice user interface, the Python library python-nubia from Facebook is used as the framework to support command line interface.

Key Features

  • Full compatible with the original KeePass
  • .NET Standard 2.0 support with KPCLib
  • Cross platform support with .NET Standard and .NET core
  • Nice user interface with python-nubia
  • Interactive mode that offers fish-style auto-completion

Installation

As a developer, you can use KPCLibPy from GitHub directly.

1
2
3
4
5
$ git clone https://github.com/shugaoye/KPCLibPy.git
$ cd KPCLibPy
$ pip install -r requirements.txt
$ cd src
$ python3 ./nubia_main.py

For normal user, KPCLibPy can be installed using pip.

1
2
$ pip install kpclibpy
$ keepass

image01

Docker image

A Dockr image - docker-mono can be used on Linux or Windows 10 (WSL).

在PassXYZ中每个账户是与数据库一一对应的。当有需要时,如何建立一个新的账户呢?一般来说,可以通过以下三种方式建立新账户:

  1. 新安装时,可以在注册页面建立新账户;
  2. 在登陆页面,点击注册按钮建立新账户;
  3. 在登陆或注册页面,点击导入按钮,导入已有的KeePass数据库亦可建立新账户。

对于上述1、2项的两种情况,即,新安装或在登陆页面建立新账户,可以参考以下的动画图片:

生成新用户

用户通过导入已有的KeePass数据库建立新账户,可以参考文章如何导入KeePass数据文件

There are multiple ways to create a new account in PassXYZ. In this article, we discuss three major approaches that can be used for most of the cases.

  1. For a new installation, a new account can be created in the SignUp page;
  2. In the Login page, select the SignUp button on the toolbar to create a new account;
  3. In either SignUp or Login page, select the Import button on the toolbar to import an existing KeePass database so as to create a new account.

For the cases 1 and 2, Please refer to the below animated picture on how to create a new account:

Create a new user

To import an existing KeePass database for creating a new account, please refer to the article Import KeePass Data.

There are built-in icons in PassXYZ and users can change the icon of an entry or a group using the built-in icons. However, users may want to use their own icons as well. PassXYZ uses KeePassLib as the base for password management. KeePassLib does support custom icons, but this function can be used only on Windows platform. However, PassXYZ needs to support three platforms (iOS, Android and Windows). In the version 1.1.9 of KPCLib, the custom icon can be supported on all three platforms by using Skiasharp library from Xamarin. KPCLib is a modified version of KeePassLib and the source code can be found in GitHub.

In version PassXYZ 2.1.1/PassXYZ Cloud 2.4.1, KPCLib is updated to 1.1.9, so custom icons can be used from this version onwards. Please refer to the below animated picture on how to use custom icons.

change_icons

From the above figure, we can see that users can access “Change Icon” option in the context menu of an entry or a group. After selecting “Change Icon” option, a page with built-in icons will be listed. There is a toolbar item “+” at the top of the page. This toolbar item can be used to add a custom icon as we can see from the above figure.

Requirements of custom icon

  1. The icon must be a square with at least 96x96 pixels
  2. in JPEG or PNG format

How to remove a custom icon

After a custom icon is added, users can removed it as well if needed. Please refer to the below animated picture on how to remove a custom icon.

remove_icons

As you can see in the above figure, users can delete a custom icon from the context menu of the custom icon.

PassXYZ can import and export different file types through file type or sharing supported by operating system. However, different systems handle file type and sharing slightly different. Users may have difficulties to use file type or sharing to import or export. I can still see questions from the user’s feedback concerning how to import a KeePass file. In version PassXYZ 2.1.1/PassXYZ Cloud 2.4.1, a simple option is added to simplify the import of KeePass data file.

In the toolbar of both login and sign-up page, an import option is added as shown in the below animated picture.

Import

After choosing this toolbar item, the system file explorer will be shown. In the above figure, the file explorer of Android is shown. It is very similar in either iOS or Windows. After selecting the KeePass data file from file explorer, the imported data file can be accessed in PassXYZ.

To find more on import and export, please refer to another article Import and Export of PassXYZ data files.

PassXYZ可以通过文件类型和系统的分享功能实现各种类型文件的导入和导出。由于不同系统的文件类型处理和分享功能略有不同,用户在使用时可能会碰到一些困难。因为常会在用户反馈中看到询问如何导入KeePass数据文件的问题,所以在版本PassXYZ 2.1.1/PassXYZ Cloud 2.4.1中,增加了一个简单的导入选项。

在登陆和注册页面的工具栏中,都增加了一个导入的图标,如下面的动画图片所示:

导入

选择这个导入图标按钮后,便进入系统的文件浏览界面。上图所示的是Android系统的文件浏览界面。在文件浏览界面中选择所要导入的KeePass数据文件后,即可在PassXYZ中打开KeePass文件了。

进一步了解各类文件的导入和导出,请参考文章PassXYZ数据文件的导入和导出

自定义图标是PassXYZ用户反馈中要求最多的一项功能。虽然KeePassLib本身是支持自定义图标的,但只适用于Windows环境。而PassXYZ需要在Windows,iOS和Android这三个平台上同时支持这一功能。为了达到这一目的,先要在KPCLib中实现这一功能。在最新的KPCLib 1.1.9版本中,通过利用SkiaSharp图形库,将自定义图标功能同时实现在了三个平台上。有兴趣的朋友可以在GitHub上找到相关的代码。

在PassXYZ 2.1.1/PassXYZ Cloud 2.4.1版本中,KPCLib已被更新到1.1.9,所以用户就可以使用自定义图标功能了。关于如何使用自定义图标,请参考以下的动画图片:

更改图标

如上图所示,可以使用更换图标的上下文菜单来添加自定义图标。关于如何使用更换图标的上下文菜单,请参考另一篇文章“如何更改图标”。当用户选择了更换图标后,在更换图标的页面,可以看到一个新增加的”+”按钮,选择这个按钮便可以通过相册或文件浏览来选择想要的图标。

自定义图标的要求:

用户自定义的图标需符合如下要求:

  1. 图标必须是正方形的,并且像素需要大于96x96。
  2. 建议使用JPEG或PNG格式。

如何删除自定义图标

添加了自定义图标后,如果有需要,用户也可以删除自定义图标。如何删除自定义图标,请参考下面的动画图片:

删除图标

在更换图标的页面,用户可以使用上下文菜单来删除图标。如在Android系统中,可以长按自定义图标来显示上下文菜单。关于在不同系统中的上下文菜单使用,可以参考文章PassXYZ的上下文菜单在不同系统中的比较

PassXYZ和PassXYZ Cloud的版本在2018年12月17日分别更新至1.7.1和2.0.1了。这次更新带来了以下三个新功能:

  1. 用户可以更改“组”和“条目”的图标。
  2. PassXYZ用户可以通过拍照或截屏来快速抓取信息并保存为附件。
  3. 增加了“模板重置”选项。在新版本中,用户可以通过此选项自行更新模板。

如何使用上述新功能,请参考下面“扩展阅读”部分的文章。


扩展阅读:

PassXYZ是一款跨平台的密码管理软件,可以运行在安卓和苹果手机以及Windows 10上。
PassXYZ基于著名的开源软件KeePass开发,所以兼容KeePass数据格式。PassXYZ的核心代码可以在开源社区GitHub上获取。PassXYZ最大的特点是通过提供大量的个人信息记录模板来分享和传递良好的使用习惯。PassXYZ个人信息管理软件和PassXYZ公众号的目标是通过两者的结合来推动和提高公众的个人信息管理水平。

您可以通过苹果应用商店微软应用商店Google Play华为应用商店搜索关键字PassXYZ来下载该应用。如果您想获得更多模板或对个人信息安全及管理有兴趣,可以搜索关键字PassXYZ关注公众号。您也可以通过微信号passxyz_kpclib来添加此公众号。PassXYZ公众号专注于个人信息安全及管理的相关知识。

0%