1 Replies - 777 Views - Last Post: 19 July 2017 - 06:18 AM

#1 jphoc13  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 584
  • Joined: 08-July 13

Events on elements in Relative Layout not firing, Xamarin.Forms

Posted 27 June 2017 - 09:29 AM

I am using Xamarin Forms and events on elements inside of a relative layout are not firing. I tried to register them in code behind as well and still not firing. Here is my xaml:

<RelativeLayout
        IsEnabled="True">
        <Button x:Name="SaveBtn"
                IsEnabled="True"
                WidthRequest="100"
                RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Y, Factor=0, Constant=-250}" RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=X, Factor=0, Constant=10}"
                Clicked="SaveBtn_Clicked"
                Text="Save"></Button>
        <Button x:Name="ClearFavorites"
                IsEnabled="True"
                WidthRequest="120"
                RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Y, Factor=0, Constant=-250}" RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.5, Constant=30}"
                Clicked="ClearFavorites_Clicked"
                Text="Clear Favorites"></Button>
</RelativeLayout>


Is This A Good Question/Topic? 0
  • +

Replies To: Events on elements in Relative Layout not firing, Xamarin.Forms

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1533
  • View blog
  • Posts: 5,972
  • Joined: 21-March 08

Re: Events on elements in Relative Layout not firing, Xamarin.Forms

Posted 19 July 2017 - 06:18 AM

Why aren't you using commands?

https://blog.xamarin...ith-commanding/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1