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

How to access ContentView objects (x:Name) when you include this contentview in a page?

$
0
0

Hello,

I got this page:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Manager.Pages.EstablishmentCreateUser"
             xmlns:local="clr-namespace:APP.Views;assembly=APP"
             Title="Create user">
    <local:UserInfos/>
</ContentPage>

And i got this ContentView:

<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="APP.Views.UserInfos">
    <ContentView.Content>
        <StackLayout Orientation="Vertical">
            <Entry x:Name="E_Firstname" Placeholder="Prénom"/>
            <Entry x:Name="E_Lastname" Placeholder="Nom"/>
            <Entry x:Name="E_RegistrationNumber" Placeholder="Matricule"/>
            <Entry x:Name="E_Phone" Placeholder="Téléphone fixe"/>
            <Entry x:Name="E_Mobile" Placeholder="Téléphone mobile"/>
            <Entry x:Name="E_Email" Placeholder="Adresse électronique"/>
            <Entry x:Name="E_Adress" Placeholder="Adresse du domicile"/>
            <Picker x:Name="P_Job"/>
            <Picker x:Name="P_WeeklyHours"/>
            <StackLayout Orientation="Horizontal">
                <Label x:Name="L_Intermittent" Text="Intermittent"/>
                <Switch x:Name="S_Intermittent"/>
            </StackLayout>
        </StackLayout>
    </ContentView.Content>
</ContentView>

My design works fine but i'm trying to access :xName entries from my ContentView when i'm in my Page.
How i can access it?

Best regards


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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