Giter Site home page Giter Site logo

xamarin-forms's People

Contributors

brminnick avatar davidbritch 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

xamarin-forms's Issues

AnimationDemoPage throws exception when clicking on the button during animation

Hello David,

The AnimationDemoPage throws an exception when clicking on the button during animation:
System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.

I found how to inactivate the button during the animation:

<Button.Behaviors>
<behaviors:EventHandlerBehavior EventName="Clicked">

<behaviors:SetPropertyAction TargetObject="{x:Reference runAnimationButton}" PropertyName="IsEnabled" Value="false" />
<behaviors:SetPropertyAction TargetObject="{x:Reference stopAnimationButton}" PropertyName="IsEnabled" Value="true" />
<behaviors:SetPropertyAction TargetObject="{x:Reference stopAnimationButton}" PropertyName="IsVisible" Value="true" />
...

<behaviors:SetPropertyAction TargetObject="{x:Reference runAnimationButton}" PropertyName="IsEnabled" Value="true" />
<behaviors:SetPropertyAction TargetObject="{x:Reference stopAnimationButton}" PropertyName="IsEnabled" Value="false" />

But I did not find how to cancel the animation by clicking on the "Stop animation" button.
Here what I tried out:
Above code for stopAnimationButton plus:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:behaviors="clr-namespace:Behaviors;assembly=Behaviors"
x:Class="Behaviors.Sample.AnimationDemoPage"
x:Name="animationPage"
Title="Animation Demo"
Icon="xaml.png">

    <Button x:Name="stopAnimationButton" Text="Stop animation (ineffective)" IsVisible="true" IsEnabled="false">
        <Button.Behaviors>
            <behaviors:EventHandlerBehavior EventName="Clicked">
                <behaviors:InvokeMethodAction TargetObject="{x:Reference animationPage}" MethodName="OnStopAnimation" />
                <behaviors:SetPropertyAction TargetObject="{x:Reference runAnimationButton}" PropertyName="IsEnabled" Value="true" />
            </behaviors:EventHandlerBehavior>
        </Button.Behaviors>
    </Button>

	public void **OnStopAnimation**(object sender, EventArgs args)
	{
		//KO no animation.Commit(.., "animationID", ...) defined: this.AbortAnimation("animationID";
		//KO still same runtime exception: ViewExtensions.**CancelAnimations**(image);
		ViewExtensions.**CancelAnimations**(this); //KO: no effect (but no exception neither)
	}

Any idea?
Thanks.

Best regards,
Nikolas

WebAuthenticatorDemo Login error

Tried clicking on the Login button in the WebAuthenticatorDemo, but comes up with the following error - not sure what's needed to get the demo working? I don't see any Readme with directions for it.
image

Xamarin Web Authenticator with IdentityModel.OidcClient

Hello David,

This look great! I am searching now for a week to get a solutions like the Azure app for IOS.. you get only a cancel button.. i try many options but nothings is working like that.. to hide the default buttons, do you have some tips ?

can put button in action bar?

Hi, your plugin is amaizing, but i cuestion if can add a button on the action bar?
i try to replicate salesforce native android component

image

thanks.

Never goes back to the app

The codes works well. My issue is, it never goes back to the app after logging in.

[Activity(NoHistory = true, LaunchMode = LaunchMode.SingleTop)]
[IntentFilter(new[] { Android.Content.Intent.ActionView },
	Categories = new[] { Android.Content.Intent.CategoryDefault, Android.Content.Intent.CategoryBrowsable },
	DataScheme = Constants.DataScheme,
	DataHost = Constants.DataHost
	)]
public class WebAuthenticationCallbackActivity : Xamarin.Essentials.WebAuthenticatorCallbackActivity
{
	public WebAuthenticationCallbackActivity()
	{

	}
}
public static class Constants
{
	public const string DataScheme = "oauth2test";
	public const string DataHost = "callback";

	//public static string AuthorityUri = "https://demo.identityserver.io";

	//public static string AuthorizeUri = "https://staging-xoxo.se/Account/login";
	public static string AuthorizeUri = "https://id-staging-xoxo.se/Account/login";

	public static string TokenUri = "https://id-staging-xoxo.se";

	public static string ApiUri = "https://api-staging-xoxo.se";

	public static string RedirectUri = "oauth2test://callback";
	public static string ClientId = "xoxo";
	//public static string ClientSecret = "xoxo";
	public static string Scope = "openid profile api roles userinfo";
}
private async void Button_Clicked(object sender, EventArgs e)
{
	identityService = new IdentityService(new RequestProvider());

	string url = identityService.CreateAuthorizationRequest();

	Debug.WriteLine(url);

	var authresult = await WebAuthenticator.AuthenticateAsync(
			new Uri(url),
			new Uri(Constants.RedirectUri)
			);

	string raw = ParseAuthenticatorResult(authresult);
	authorizeResponse = new AuthorizeResponse(raw);
	if (authorizeResponse.IsError)
	{
		Console.WriteLine("ERROR: {0}", authorizeResponse.Error);
	}
}

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.