- Xamarin Blueprints
- Michael Williams
- 91字
- 2021-07-08 11:48:25
IoC with Windows Phone
Implementing IoC with Windows Phone is very much the same as iOS and Android. We simply add the same function, InitIoC
, at our application's starting point; in this case, it is the MainPage
constructor of the Windows Phone project (try not to get the two confused), and we call it right before the LoadApplication
function:
public MainPage() { InitializeComponent(); InitIoC(); NavigationCacheMode = NavigationCacheMode.Required; LoadApplication(new SpeechTalk.App()); } private void InitIoC() { IoC.CreateContainer(); IoC.RegisterModule(new WinPhoneModule ()); IoC.RegisterModule(new PCLModule ()); IoC.StartContainer(); }
Simple! Now we can run the Windows application.
推薦閱讀
- 數據科學實戰手冊(R+Python)
- ClickHouse性能之巔:從架構設計解讀性能之謎
- Android Jetpack開發:原理解析與應用實戰
- 零基礎PHP學習筆記
- INSTANT OpenCV Starter
- SQL for Data Analytics
- Hands-On JavaScript High Performance
- MATLAB實用教程
- QGIS:Becoming a GIS Power User
- Learning FuelPHP for Effective PHP Development
- Illustrator CC平面設計實戰從入門到精通(視頻自學全彩版)
- Java 9 with JShell
- Learning Concurrency in Python
- Python GUI Programming Cookbook(Second Edition)
- Learning D3.js 5 Mapping(Second Edition)