Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How to get the inner frame from code in xamarin.forms?

$
0
0

Hello All,
I am trying to get the inner frame which is inside an another frame and apply TranslationX that.But I m unable to do so,With my below code the content which is starting to move instead of whole frame.Here is the code snippet./
public partial class LayoutRelative : ContentPage
{
MR.Gestures.Frame bottomFrameContainer = new MR.Gestures.Frame {
HeightRequest=150,
WidthRequest=150,
BackgroundColor=Color.Red,
Padding = new Thickness (40),
RotationX=10,
RotationY=-10

    };

MR.Gestures.Frame bottomFrame = new MR.Gestures.Frame ();
public LayoutRelative ()
{
bottomFrame.Content = new Label {
Text="Bottom Card",
TextColor=Color.Blue
};
bottomFrameContainer.Content = bottomFrame;
bottomFrameContainer.Panning += framepanning;

}
//Here is Panning Event
void framepanning(object sender,MR.Gestures.PanEventArgs e)
{
var displacement = e.DeltaDistance;
bottomFrameContainer.Content.TranslationX+=s.X;
}
Whenever we are panning with the below code.The label is only moving instead of Inner Frame.
Please help anybody have solution for this


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>