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

Is there possible to use App.xaml code behind in Xamarin forms

$
0
0

In this project, A part of XAML is required in several places so I put it on App. Xaml it Ui part is working. but I need to add an item tapped event or anything. In order to have to go to another page, I need to use the item tapped command but in here they did not recognize its name in the app.Xaml code behind.

are there a better way to do this without put this on APP.xaml or if this is the way how to use that item tapped in here

<Application.Resources>
<ResourceDictionary>
    <ControlTemplate x:Key="PageTemplate">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="8*"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>

            <ContentPresenter Grid.Row="0"></ContentPresenter>


            <customRenderes:NavigationImageButton Source="IconFAB" Grid.Row="1"

                                                  x:Name="Button1"

                                                  AbsoluteLayout.LayoutFlags="PositionProportional"
                                                  AbsoluteLayout.LayoutBounds="1.0,1.0,-1,-1"
                                                  HorizontalOptions="EndAndExpand"
                                                  Margin="10"
                                                  Opacity="0.4"
                                                  ItemTapped="Button1_OnItemTapped"/>
     </Grid>

    </ControlTemplate>
     </ResourceDictionary>
     </Application.Resources>

I need to do some function when this floating menu is tapped how to do this are a there better way to do this without doing it on App.Xaml or If this is the way How to do this


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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