1 Star 0 Fork 0

vfplt / Prism-Samples-Forms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Prism Samples Forms

Samples that demonstrate how to use various Prism features with Xamarin.Forms.

Learning Prism

Learn feature by feature how to use Prism in your apps!

# Sample Description
1 Prism Navigation How to use Prism's Uri based navigation to reset the navigation stack, or add pages Modally or Non-Modally
2 Registering Services How to use IContainerRegistry to register services to act as Singletons or Transients within your application.
3 Platform Specific Services How to use Prism to auto inject platform specific dependencies that are registered with the IPlatformInitializer.
4 Delegate Commands How to use DelegateCommands and ObservesCanExecute
4.1 Composite Commands How to use CompositeCommands to invoke commands in multiple unrelated ViewModels from a single interaction.
5 Event Aggregator How to use the IEventAggregator to raise and listen to events. This shows how to use a simple event with a primitive type payload, generic event with payload <T>, and event with custom EventArgs. It also demonstrated how to subscribe to events published in Xamarin.Forms inside native code.
6 Page Dialog Service How to use the IPageDialogService to display alerts and action sheets from within your ViewModels.
7 Dialog Service How to use the DialogService to provide highly customizable experiences within your application.
8 Tabbed Navigation coming soon
9 Master Detail coming soon
10 Modules How to use Prism modularization to separate the application logic using IModule, IModuleManager, ModuleCatalog.
11 Module Dependency coming soon
12 ViewModelLocator coming soon
13 ViewModel Initialization How to properly use IAutoInitialize, IInitialize, or IInitializeAsync to do a one time initialization of your ViewModel with the context you need based on the Navigation Parameters, or any other initialization you may need to do.
14 EventToCommandBehavior How to use the EventToCommandBehavior to bind to ViewModel Commands even when there is no Command property on an element.
15 PageBehaviorFactory coming soon
16 PageLifecycleAware How use IPageLifecycleAware to execute code in your ViewModel when the Page appears / disappears.
17 XamlNavigation How to do Prism navigation from within Xaml
18 DeviceService How to use Prism's IDeviceService to get the device's runtime and idiom.
19 NavigationMode How to use the NavigationMode enum to only act on something when navigating back to a view
20 Confirm Navigation coming soon

Advanced Concepts

Sample Description
Popups Plugin Quite often you may find that a Modal page just doesn't cut it. A very popular option is to use Rg.Plugins.Popup. Because this is a 3rd party plugin it requires the use of Prism.Plugins.Popup. This sample shows how to use both Popup Pages for the Dialog Service and with Prism's Navigation Service.
Logging with App Center coming soon
Logging with Syslog coming soon
Logging with Loggly Walks you through using the Logging Plugin with Loggly for Syslog or Http
Using Shiny Lib + Prism coming soon
Using ReactiveUI + Prism coming soon

Sample Apps

Sample Description
Prism Forms Gallery Prism.Forms Gallery demonstrates a number of Prism and Prism.Forms features all in a single app. The goal of this gallery is to make it easy to learn, share, teach, test, and use the material in your presentations and talks.
Contoso Cookbook Contoso Cookbook is a classic Microsoft sample recipe app; first adapted for Xamarin.Forms by Jeff Prosise in 2015 and now updated to use Prism for Xamarin.Forms. Demonstrates how to use a TabbedPage with a DataTemplate for the tabs, and a ListView with DataTemplate for the recipe list on each tab; for a clean professional-looking UI.

Adding or Updating a Sample

A number of topics have been stubbed out. For any existing topic you can simply update the project with the relavent content. Be sure the Project heads are each updated as follows:

  • The Display Name on iOS, Android and UWP should be updated from Prism Sample to be relevent to what your sample is on. It should also be short! (i.e. ViewModelInitialization -> Prism Init, EventToCommandBehavior -> Event 2 Cmd)
  • Please do not change any existing colors or styles. You may add colors / styles if they help but the samples are generally meant to be simple.
  • The Sample's all use com.prismlibrary.prismsample as the Bundle/Package Id. If every sample kept this you would not be able to have samples side by side. Be sure that the final segment prismsample is updated to the lowercase name of the sample (i.e. com.prismlibrary.eventtocommand)

If you're adding a brand new sample be sure to start with a copy of the resources in the Sample Template directory.

The MIT License (MIT) Copyright (c) .NET Foundation All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lvpt/Prism-Samples-Forms.git
git@gitee.com:lvpt/Prism-Samples-Forms.git
lvpt
Prism-Samples-Forms
Prism-Samples-Forms
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891