Coder Social home page Coder Social logo

xamarin-forms-samples's Introduction

Xamarin.Forms Demo Apps

Many of the Xamarin.Forms samples in this repo are discussed in Intro_To_Xamarin.Forms.pdf document.

  • EmployeeDirectoryXaml - port of the existing Xamarin Employee Directory sample... (uses PCLStorage Nuget). Still in-progress.

  • Evolve13 - port of the Xamarin Evolve conference app used last year (uses SQLite.Net-PCL Nuget), using the MasterDetailPage.

  • FormsBasics - simple explanations of basic Xamarin.Forms concepts like views, controls and layouts.

  • HttpClient - simple example of using HttpClient for network communication with Xamarin.Forms.

  • PlatformSpecific - simple examples of how to do various platform-specific operations (in code and in XAML).

  • RestaurantGuide - how to render HTML using Razor templates and the Xamarin.Forms WebView control.

  • Roget1911 - port of an old Silverlight sample, demonstrating a deep navigation structure generated from parsed XML files (uses PCLStorage Nuget).

  • Todo - simple todo list application that demonstrates how to load a pre-populated database and then read and write data to it (uses SQLite.Net-PCL Nuget). Also shows how to add platform-specific code to a Xamarin.Forms app, by implementing the text-to-speech engines on iOS and Android.

  • TodoAzure - same todo list application logic XAML, and using Windows Azure Mobile Services for cloud data storage (Windows Azure Nuget/Component).

  • TodoAzureSync - same todo list application logic XAML, and using Windows Azure Mobile Services offline sync component for cloud data storage (Windows Azure Nuget/Component).

  • TodoL10nResx - todo list that is localized/globalized using RESX files.

  • TodoL10nVernacular - todo list that is localized/globalized using Vernacular.

  • TodoMvvm - same todo list application logic, demonstrating Mvvm architecture with Xamarin.Forms. Uses data-binding and the command pattern to wire up model, view and view model objects (uses SQLite.Net-PCL Nuget).

  • TodoParse - similar to the Azure examples but uses Parse instead.

  • TodoXaml - same todo list application logic, but using XAML to declaratively build the screen layouts (rather than C# code, uses SQLite.Net-PCL Nuget).

##Unfinished

  • TicTacForms - simple tic tac toe game ~ still under development...

Nugets used in this repo:

Xamarin.Forms

Xamarin.Forms.Maps

SQLite.NET-PCL

PCLStorage

Also the Azure ones, and the Parse Xamarin Store Component.

Other Interesting Repos

###XForms Community-driven controls and extensions for Xamarin.Forms

###acr-xamarin-forms Another source of controls written by Allan Ritchie

xamarin-forms-samples's People

Contributors

conceptdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin-forms-samples's Issues

Are these samples intend to not support VS 2015 at all ?

When I create a project in Visual Studio 2015, this happens.

image

and If I think to create one in 2017 and open it in 2015, it doesn't work. please check this screenshot

image

Please tell me how I can sort out this. Is there anyway to work on VS 2015 without upgrading to 2017,

LoginPattern won't build in Xamarin Studio

Gives this error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: Support for Classic applications (using monotouch.dll) is obsoleted in Xamarin.iOS 10.0+. Please migrate your project to Unified (Project > Migrate to Xamarin.iOS Unified API). (LoginPattern.iOS)

[vernacular] Error building TodoL10nVernacular

I'm not sure how to fix this. The android version of TodoL10nVernacular doesn't build.

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'Android.Text.InputTypes Android.Widget.SearchView::get_InputType()' (defined in 'Xamarin.Forms.Platform.Android, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null' could not be resolved. (TodoXaml.Android)

[resx] build error

The TodoL10nResx sample doesn't build either. I've had no problem building samples from xamarin/xamarin-forms-samples.

Error: /xamarin-forms-samples/TodoL10nResx/PCL/Todo/TodoL10nResx.csproj: /xamarin-forms-samples/TodoL10nResx/PCL/Todo/TodoL10nResx.csproj could not import "../packages/Xamarin.Forms.1.1.0.6202/build/portable-win+net45+wp80+MonoAndroid10+MonoTouch10/Xamarin.Forms.targets" (TodoL10nResx)

Entry Exception in UITest - Resolved

The solution

After searching a lot finally i found the solution associated with the emulator keyboard configuration as described here Xamarin Guides


Hi guys,
I'm experience an exception when i trying to use the exemple after add an Entry element to the MyPage.cs view and use in CrossPlataformTests.cs. Here is the exception:

Tapping element matching Marked("txtUsuario") at coordinates [ 187.25, 381.5 ].
Entering text 'mobrj'.
Error while performing EnterText("mobrj")
Exception: System.Exception: Underlying query failed with output:
{"results":[{"status":"error","value":"VerboseError: Unable to type: mobrj","backtrace":"fail__delegate@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:25616:28\nfail@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:25623:31\nfile:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:25853:40\nfile:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:13606:39\nsval@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:9835:30\ncljs$core$ISeqable$_seq$arity$1@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:9917:30\n_seq@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:3855:45\ncljs$core$ISeq$_first$arity$1@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:9890:22\n_first@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:3136:46\nfirst@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:5141:35\nwait_for@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:25866:36\nkeyboard_enter_text__delegate@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:26528:41\nkeyboard_enter_text@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:26569:46\napply_to@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:10922:22\napply__2@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:11126:39\napply@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:11219:29\ntypeString__delegate@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:28047:64\ntypeString@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:28054:37\neval code\neval@[native code]\nglobal code@file:///Users/marcelo/solutions/xamarin/xamarin-forms-samples/UsingUITest/UsingUITest.UITests/bin/Debug/7DB2D0FF-837D-49F1-96DA-246A6E97CC12/run_loop_fast_uia.js:28483:27","index":3}],"outcome":"SUCCESS"}
at Xamarin.UITest.iOS.iOSGestures.ValidateSuccessfulCalabashResult (Xamarin.UITest.Shared.Http.HttpResult result) [0x00000] in :0
at Xamarin.UITest.iOS.iOSGestures.EnterText (Xamarin.UITest.Shared.Queries.SingleQuoteEscapedString text) [0x00000] in :0
at Xamarin.UITest.iOS.iOSApp+c__AnonStoreyB.<>m__0 () [0x00000] in :0
at Xamarin.UITest.Utils.ErrorReporting.With (System.Action func, System.Object[] args, System.String memberName) [0x00000] in :0

Anyone can help me ?
Best Regards,
Marcelo Amorim

TODOMVVM Reference Error

ViewFactory.cs line 46 & 68

var page = (Page)Activator.CreateInstance (viewType);

should be

var page = (TodoItemPage)Activator.CreateInstance (viewType);

WrapLayout can't handle items with irregular heights

For a requirement I was looking for an easy way to create a sort of moodboard with photo's of different sizes. The WrapLayout was a nice way to achieve that but I had to fiddle with the code to have it support photo's that have different heights. This version won't calculate the height correctly since it assumes that all items and rows have the same height.

My fork does this correctly, check this commit: roycornelissen@830aa42

Full file: https://github.com/roycornelissen/xamarin-forms-samples/blob/master/Evolve13/Evolve13/Controls/WrapLayout.cs

I think the code could be optimised a little bit, but for me it does what I want :)

Small change to height calculation

Craig I found a couple of small issues with the contain resize calculation, and I corrected one of them.

Height:
This line:
https://github.com/conceptdev/xamarin-forms-samples/blob/master/Evolve13/Evolve13/Controls/WrapLayout.cs#L159

Needs to be:
height = (height + Spacing) * rowCount - Spacing;

Width:
There is a remaining issue where the final width of the container is too wide. The fix is to subtract the Spacing from the width, as in:

width -= Spacing;

But, I cannot find the correct place to put that calculation that doesn't involve an incorrect final width.

Later, Mitch

Examples about repeating local notifications

Hello,

Now I am studying Xamarin.Forms.
I have a question to ask, whether it is possible to repeat some local notifications to users for Android, iOS and WinPhone. I cannot find some helpful examples provided by Xamarin.Forsm github-repository. Could you give me some suggestions?

Thanks very much.

WrapLayout

Is there any hope for updating the code that leverages obsolete APIs?

TodoAzureSync.Android

Hi guys,

TodoAzureSync.Android fails to reference Microsoft.WindowsAzure.MobileServices.Sync.

I tried to reinstall WindowsAzure.MobileServices.SQLiteStore, however I receive this error:
Removing 'WindowsAzure.MobileServices.SQLiteStore 1.0.0-alpha2' from TodoAzureSync.Android.
Specified argument was out of the range of valid values.
Parameter name: supportedFrameworks

I'm opening the project using Xamarin Studio 5.

Has anyone else encountered this issue?

Could not install package 'Monkey.Robotics 0.5.2'.

After opening TISensorBrowser solution there in no Monkey.Robotics. I unfortunately cannot add it:
Could not install package 'Monkey.Robotics 0.5.2'. You are trying to install this package into a project that targets 'portable-net45+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I will be glad for help.

Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager. Is the system running?

When I try to run the android application, here are the errors I'm getting, using Visual Studio 2015 Update 3:

1>100% ... 6793kb of 6793kb copied
1>:Deployment failed
1>Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager.  Is the system running?
1>
1>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.<InstallPackage>b__0(Task`1 t)
1>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
1>   at System.Threading.Tasks.Task.Execute()
1>The "InstallPackageAssemblies" task failed unexpectedly.
1>System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager.  Is the system running?
1>
1>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.<InstallPackage>b__0(Task`1 t)
1>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
1>   at System.Threading.Tasks.Task.Execute()
1>   --- End of inner exception stack trace ---
1>   at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>d__99.MoveNext()
1>--- End of stack trace from previous location where exception was thrown ---
1>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>   at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>d__98.MoveNext()
1>   --- End of inner exception stack trace ---
1>   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
1>   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
1>   at System.Threading.Tasks.Task.Wait()
1>   at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute()
1>   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager.  Is the system running?
1>
1>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.<InstallPackage>b__0(Task`1 t)
1>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
1>   at System.Threading.Tasks.Task.Execute()
1>   --- End of inner exception stack trace ---
1>   at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>d__99.MoveNext()
1>--- End of stack trace from previous location where exception was thrown ---
1>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>   at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>d__98.MoveNext()<---
1>
1>Done building project "LoginPattern.Android.csproj" -- FAILED.
1>Build FAILED.
1>
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Does anyone have any suggestions? TIA.

Why you dont update your samples with new updates

Hi

Why all your samples use old version of nugets packages??? you get paid for that, come on do it. Everytime i try a sample the sdk or java you used is old and that reason the app dont run and to be fixed.

/Hussam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.