24
Apr

Creating touch responsive (animated) button in Xamarin.Forms Android

Sometimes we would like to have a bit more user action responsivity when handling our apps. This post explains how to create tactile buttons in Xamarin.Forms using custom renderers to do so for Android.

First, we need a custom control that would represent our tactile button, so let’s create it.

Next, we would need to create a custom renderer class that would take care of button’s touch sensitivity.

To create the button pressed look and feel, in this example, we need to animate the button or to add a scale animation when button is pressed and un-scale when button is released. One of the ways to do that is to subscribe to button’s touch event. Implementing these overridden methods in your custom renderer takes care of subscribing and unsubscribing from the button’s touch event.

Finally, animating the button to have a little touch responsivity here comes down to scaling to a smaller size on mouse down, and returning to original size and launching command (if exists) on mouse up.

All you have to do now to start using these new buttons is to add them to your view!

Cheers!

4
Nov

Disable/Enable New Button Using Extensions in new Microsoft Dynamics AX

This topic will describe how to add new button to existing form in new Dynamics AX and disable or enable it based on condition.

Requirement is to add menu item button on Job card form that will be enabled if the production order has any quality orders, disabled otherwise. It should open the quality order related to production order.
Read more