Git Product home page Git Product logo

hanselman.forms's Introduction

Hanselman.Forms: Hanselman Everywhere

The most awesome Hanselman app built originall in about 4 hours to showcase a sample of Xamarin.Forms. Be sure to read Scott's blog on the app.

Since release we have worked open source on Twitch to use the latest features of Xamarin.Forms and awesome plugins from the community including:

  • Audio & Video Playback
  • Background Syncronization
  • Azure Functions Optimized Backend
  • Azure Logic App Updating
  • Pretty UI with Xamarin.Forms Shell, CollectionView, Material Visual, and more

In this sample Hanselman app we show awesome information about the awesome man who is Scott Hanselman including reading in his blog, tweets, podcasts, and videos. All of this using a nice MVVM Style and nearly 100% code reuse.

To learn more about Xamarin.Forms visit: http://www.xamarin.com/forms

To learn about developing native iOS, Android, and Windows apps in C# with Xamarin visit: http://www.xamarin.com

Build Status

Build Server Type Platform Status
Azure DevOps App Build macOS Build status
Azure DevOps Functions Build Windows Build status

Download

Development build available:

Source Platform QR Code
App Center Android

Made Possible By

Awesome Tools

Run Twitter Auth Locally

  • run ngrok http 5000
  • Update auth redirect on Azure Function
  • Update Cores on Azure Functions
  • Update Twitter App with Url
  • Update code "constants.cs" with url
  • RUN THE FUNCTION :)
  • AuthInfo extensions change url to https://yoursite.azurewebsites.net/

hanselman.forms's People

Contributors

aritchie avatar azureadvocatebit avatar davidortinau avatar depechie avatar franckbour avatar frankely avatar gitter-badger avatar haavamoa avatar jamesmontemagno avatar jonathanpeppers avatar manutdkid77 avatar mike-e-angelo avatar modplug avatar saciervo avatar slombardo avatar willautioitrax avatar wilsonmar avatar zawhtut 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

hanselman.forms's Issues

PropertyChanged not working

Hello, I used your project (the navigation) as a template for me and changed a few things up. Now I have the problem that ImplementPropertyChanged (Nuget: PropertyChanged.Fody) is not working correctly. Is there a known problem with this Nuget and the MasterDetailPage?

Regards,
Jan

[Android] Potential Memory Leak

Switching between detail pages seems to preserve all the renderers on Android.

Steps to reproduce:

(I've added a custom QuestionableLabel and a pairing QuestionableLabelRenderer to the project, to make things easier to read in the profiler. It's used on the AboutPage)

  1. Switch between AboutPage and BlogPage a couple of times
  2. Settle on the AboutPage and do a snapshot
  3. Observe that there is now only one live instance of QuestionableLabel but the number of QuestionableLabelRenderer matches the number of times the page was loaded

Android:
h1

I assume this is related to the fact that the navigation pages are stored in a dictionary. This is also causing the pages to loose state: eg, when returning to a page with a ScrollView which has been previously scrolled the offset is lost when the renderer is recreated for the same Forms element.

I've checked and the Dispose() method is triggered on the QuestionableLabelRenderer so I'm not sure I'm not getting confused by the Garbage Collector. However:

  • the allocations graph has an upwards trend
  • doing the same thing on iOS seems to work more as expected: when leaving the AboutPage there is 1 live QuestionableLabel but no related renderer

iOS:
h2

What are your thoughts on this weird behaviour?

Hanselman.Forms-master 2.zip

problem with navigation

@jamesmontemagno, I created a Service (Navigation Service, NavigationService), but when I use in my ViewModel, nothing happens when I use the "PushAsync" but when I use the "PopModalAsync" present my page I want to surf, but I want to use "PushAsync"

  • My INavigationService
 public interface INavigationService
    {
        Task IrPara(Page page);
    }
  • My NavigationService
public class NavigationService:INavigationService
    {
        public NavigationService()
        {
        }
        public async System.Threading.Tasks.Task IrPara(Xamarin.Forms.Page page)
        {
            await Teste.App.Current.MainPage.Navigation.PushAsync(page);
        }
    }
  • My ViewModel
    public class myViewModel:INotifyPropertyChanged
    {

        readonly INavigationService navegar;

        public ICommand testCommand{ get; set;}

        public ObservableCollection<GrupoModel> Grupos{ get; set; }

        public myViewModel()
        {
            testCommand = new Command(this.ActionTeste);
            navegar = DependencyService.Get<INavigationService>();

        }

         public void ActionTeste(){
            navegar.IrPara(new NextPage());
        }
}
  • My View
<ToolbarItem Text="Novo" Command="{Binding testCommand}" />

Windows Phone 8.1 Project?

Hello... LOVED the introduction @ dotnetconf! That was a really enjoyable video.

Secondly... I'm a little confused around the Windows Phone integration, and was hoping to get some clarification. Windows Store (8.1) support was announced on Thursday, and from my understanding 8.1 means Universal Apps. Does that mean this project's Phone sample can update to 8.1 as well?

Thank you in advance for any clarification.

Can't Build After Cloning

See errors and Visual Stuido info dump below:

/Users/nestore.ledon/Projects/Hanselman.Forms/packages/Xamarin.Forms.2.5.0.121934/build/portable-win+net45+wp80+win81+wpa81/Xamarin.Forms.targets(3,3): Error MSB4060: The "XamlCTask" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name. (MSB4060) (Hanselman)

/Users/nestore.ledon/Projects/Hanselman.Forms/packages/Xamarin.Forms.2.5.0.121934/build/portable-win+net45+wp80+win81+wpa81/Xamarin.Forms.targets(3,3): Error MSB4061: The "XamlCTask" task could not be instantiated from "/Users/nestore.ledon/Projects/Hanselman.Forms/packages/Xamarin.Forms.2.5.0.121934/build/portable-win+net45+wp80+win81+wpa81/Xamarin.Forms.Build.Tasks.dll". 
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies
File name: 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, System.Boolean refonly) [0x0003b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/AppDomain.cs:802 
  at System.AppDomain.Load (System.String assemblyString) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/AppDomain.cs:782 
  at (wrapper remoting-invoke-with-check) System.AppDomain.Load(string)
  at System.Reflection.Assembly.Load (System.String assemblyString) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/Assembly.cs:589 
  at System.Runtime.Serialization.FormatterServices.LoadAssemblyFromString (System.String assemblyName) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatterservices.cs:482 
  at System.Reflection.MemberInfoSerializationHolder..ctor (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) [0x00041] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/reflection/memberinfoserializationholder.cs:79 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:661  (MSB4061) (Hanselman)
=== Visual Studio Community 2017 for Mac ===

Version 7.5.4 (build 3)
Installation UUID: 4198e6d3-c10b-493d-8286-5966470fe650
Runtime:
	Mono 5.10.1.57 (2017-12/ea8a24b1bbf) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

	Package version: 510010057

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.1.1
SDK: /usr/local/share/dotnet/sdk/2.1.301/Sdks
SDK Version: 2.1.301
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.4.1 (14161)
Build 9F2000

=== Xamarin.Mac ===

Version: 4.4.1.193 (Visual Studio Community)

=== Xamarin.iOS ===

Version: 11.12.0.4 (Visual Studio Community)
Hash: 64fece5f
Branch: d15-7
Build date: 2018-05-29 20:00:44-0400

=== Xamarin.Android ===

Version: 8.3.3.2 (Visual Studio Community)
Android SDK: /Users/nestore.ledon/Library/Android/sdk
	Supported Android versions:
		5.0 (API level 21)
		5.1 (API level 22)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)
		8.0 (API level 26)
		8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.3

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 705040003
Git revision: 6ae731889c896d6733efb8ff5117f5bf5b17b509
Build date: 2018-07-19 13:07:45-04
Xamarin addins: 417fed09624e1e1f76ab0a11e8b97ffd8bbf91e1
Build lane: monodevelop-lion-d15-7

=== Operating System ===

Mac OS X 10.13.3
Darwin 17.4.0 Darwin Kernel Version 17.4.0
    Sun Dec 17 09:19:54 PST 2017
    root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

Tabbed View

Hi,
The sample app has no tabbed view as show in the original blog (social). Wondering how could I implement tabbed view correctly.
Your help will be really appreciated.

Cannot build

I tried to build the app in VS2017 and Xamarin Studio (latest version) but it did not work.
In VS2017 the nuget packages are not restored and all references had the little yellow Warning symbol. I tried all suggestions described here https://forums.xamarin.com/discussion/56559/vs-2015-errors-on-sample-projects

In Xamarin Studio I am getting "This project references NuGet package(s) that are missing on this computer"

If I try to patch the .csproj file in, any suggested way, I have all sort of other issues.

Any idea?

Unwrap url in label

Hi,

Is it possible in Xamarin Forms to unwrap a url from a twitterpost and make it clickable in a label?

Clicking Pause and then Play has a typo

Issue #17 touched on this. It seems there is a typo in OnPlayClicked().
This works for me:

    private async void OnPlayClicked(object sender, EventArgs e)
    {
        //await CrossMediaManager.Current.VideoPlayer.Play();
        await CrossMediaManager.Current.Play();
        pause.IsEnabled = true;
        stop.IsEnabled = true;
    }

The name 'DataTransfer' does not exist in the current context

I'm getting an error compiling in the BlogDetailsView.cs with the latest code. "The name 'DataTransfer' does not exist in the current context" on line 32. Is DataTransfer in Xamarin Essentials?

My Xamarin Essentials is from Nuget version 1.0.1

separator in menu

It's possible to add separator between some of menu options. How?

Unable to change slide drawer icon..

Hi Hanselman,

First I want to say, this app was awesome and a great guide, I am using it as a template.

I am facing a issue when I try to change slide drawer icon, also tried creating drawable-v21 folder with icon.

Can you tell me how I can change the icon?, I tried renaming all slideout.png with new settings.png but there is no effect.

Thanks
Nouman

Wrong behavior of hamburger menu on iOS version

Navigation with hamburger menu works ok on UWP and Android (menu works as an flyout which is rendered on top of content of the app) but on iOS it kinda slides the whole content out of the screen.
It's not a big issue but I wonder if there's any easy fix for that and why exactly is it behaving like that.

Screenshots from Android and iOS attached
Android (notice how menu renders on top of content):
adnroidss

iOS (notice how menu pushes the content out of the screen):
iosss

isBusy/IsNotBusy?

Hello :)

it's not an issue just maybe a suggestion.

In BaseViewModel you have "isBusy" and "isNotBusy"....
wouldn't just one be enough?

cheers! :)

MIssing slideout.png in Android project

When running the Android project you will get an error Resource not found.

Added a slideout.png to folder\Hanselman.Forms\Hanselman.Android\Resources\drawable to resolve the isssue

Can't find slideout.png in Android project

Hi @jamesmontemagno,
Great demonstration project, but I am confused at how the "hamburger" menu logo on android works.
In MenuPage you specify the Icon in the BindingContext as "slideout.png".
The iOS, WinPhone, and WinStore projects all have the file slidout.png in them, but I can't find it anywhere in the Android project.

Why doesn't this throw an exception that the resource could not be found?

Needs update for new Xamarin Forms

The Portable project does not build in Visual Studio 2015 Update 2.

It has missing references for Xamarin.Forms.Core.Design and Xamarin.Forms.Xaml.Design. Also, it complains: Build action 'EmbeddedResource' is not supported by one or more of the project's targets.

Great screenshots

The readme shows great art work with screenshots of the app on all platforms. How did you create these? Is there a tool out there that can generate this ?

Aggressively changing between tabs & back causes exception

I was trying out the responsiveness of multi threading, switching between tabs, refreshing, and the app crashed with the following Exception. I'm using USB debugging on a Moto X (first gen) compiling on OSX with a trial version of Xamarin.Android

[Mono] GC_MINOR: (Nursery full) pause 211.99ms, total 212.18ms, bridge 244.56ms promoted 352K major 9792K los 10835K
[Choreographer] Skipped 59 frames! The application may be doing too much work on its main thread.
[dalvikvm-heap] Grow heap (frag case) to 48.758MB for 1640016-byte allocation
[Mono] GC_OLD_BRIDGE num-objects 79 num_hash_entries 80 sccs size 80 init 0.00ms df1 0.18ms sort 0.03ms dfs2 0.31ms setup-cb 0.06ms free-data 0.09ms links 1/1/1/1 dfs passes 160/81
[Mono] GC_MINOR: (Nursery full) pause 10.13ms, total 10.25ms, bridge 38.73ms promoted 368K major 10160K los 13460K
[Choreographer] Skipped 79 frames! The application may be doing too much work on its main thread.
[Mono] GC_OLD_BRIDGE num-objects 641 num_hash_entries 5738 sccs size 3557 init 0.00ms df1 15.69ms sort 2.17ms dfs2 4.58ms setup-cb 1.13ms free-data 5.71ms links 7736/7736/3005/13 dfs passes 14115/11293
[Mono] GC_MAJOR: (LOS overflow) pause 105.02ms, total 105.23ms, bridge 58.60ms major 10096K/10160K los 3325K/16013K
[mono] Unhandled Exception:
[mono] System.ArgumentException: 'jobject' must not be IntPtr.Zero.
[mono] Parameter name: jobject
[mono] at Android.Runtime.JNIEnv.CallVoidMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00010] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:500
[mono] at Android.Widget.AdapterView.set_OnItemClickListener (IOnItemClickListener value) [0x00043] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Widget.AdapterView.cs:944
[mono] at Xamarin.Forms.Platform.Android.ListViewAdapter.Dispose (Boolean disposing) [0x00000] in :0
[mono] at Java.Lang.Object.Finalize () [0x00056] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/src/Java.Lang/Object.cs:61

VS2017 Support?

Compiling fails with visual studio community edition (fresh install) with tons of errors for:

  1. Android
  2. UWP

16 Errors: Example -->
Severity Code Description Project File Line Suppression State
Error CS0103 The name 'InitializeComponent' does not exist in the current context Hanselman C:\Xamarin\Hanselman.Forms-master\Hanselman.Forms-master\Hanselman.Portable\Views\PodcastPlaybackPage.xaml.cs 15 Active

views in XAML

It would be nice for educational purposes to see in separate folders all of the views build in XAML.

Set the MasterDetailPage "RootPage" as a NavigationPage

@jamesmontemagno
Hello,

I work on a Xamarin.Forms project with MVVMLight, where the main page must been a MasterDetailPage.
I have read your article about the Material Design and I have tried your sample "Hanselman.Forms", as I want to implement something like this in my project.
I would also use a navigation "ViewModel first". For this, I use the *_Navegar *_package, which allows me to manage this easily:
https://github.com/mplessis/navegar
https://www.nuget.org/packages/Navegar/

But I currently meet a problem if the OS version of Android >= 5.1: I have a "gap" on my screen:
http://img15.hostingpics.net/pics/963309FormsAppCompatActivityAnd51WithNavegar.png
There is no problem for older versions (<5.1):
http://img15.hostingpics.net/pics/528135FormsAppCompatActivityAnd44WithNavegar.png

Would you have an iadea about the encountered problem?
Is there another way to adapt your code to ViewModel navigation?

Regards,

Menu hamburger missing in UWP

So this has been happening for a while, and it seems reverting xamarin.forms to an older version seems to fix it.

When using the latest version, you can see the hamburger does not appear:
image

But when using an older version of your repository and rolling back Xamarin.Forms to version 2.3.2.127 and run the app in UWP you can see that it does show up:

image

I tried debugging for a very long time but it seems I cannot figure out how to show the menu once it is collapsed.

Error retrieving parent for item: No resource found

I am new to xamarin development am trying to build your project but getting this error

Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Hanselman.Android

I have tried to solve this with but I am not getting any solution

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.