PopupView Accessing Entry Inside

hi,
I am using syncfusion popupview and I have an entry as in the attached. How can I access the entry codebehind?
Thank You.

<sfPopup:SfPopupLayout.PopupView>
    <sfPopup:PopupView ShowHeader="False" HeightRequest="200" AnimationMode="SlideOnBottom">
        <sfPopup:PopupView.ContentTemplate>
            <DataTemplate>
                <StackLayout Padding="15" VerticalOptions="CenterAndExpand">
                    <inputLayout:SfTextInputLayout Hint="Mail Adresi" Style="{StaticResource EntryStyle}">
                        <Entry x:Name="Entry_EmailReset" Keyboard="Email" />
                    </inputLayout:SfTextInputLayout>
                </StackLayout>
            </DataTemplate>
        </sfPopup:PopupView.ContentTemplate>
    </sfPopup:PopupView>
</sfPopup:SfPopupLayout.PopupView>

3 Replies 1 reply marked as answer

KK Karthikraja Kalaimani Syncfusion Team August 18, 2020 09:11 AM UTC

Hi Tayyip,

Please refer to the below code snippet to achieve your requirement.

Code snippet :

 
<sfPopup:SfPopupLayout x:Name="popup" StaysOpen="True" Opening="Popup_Opening"> 
                <sfPopup:SfPopupLayout.PopupView> 
                    <sfPopup:PopupView> 
                        <sfPopup:PopupView.ContentTemplate> 
                            <DataTemplate> 
                                <StackLayout Padding="15" VerticalOptions="CenterAndExpand"> 
                                    <inputLayout:SfTextInputLayout Hint="Mail Adresi"> 
                                        <Entry x:Name="Entry_EmailReset" Keyboard="Email" /> 
                                    </inputLayout:SfTextInputLayout> 
                                </StackLayout> 
 
                            </DataTemplate> 
                        </sfPopup:PopupView.ContentTemplate> 
                    </sfPopup:PopupView> 
                </sfPopup:SfPopupLayout.PopupView> 
            </sfPopup:SfPopupLayout>

//Code behind
private
void Popup_Opening(object sender, Syncfusion.XForms.Core.CancelEventArgs e) 
        { 
            var nativeObject = (object)popup.GetType().GetRuntimeProperties().FirstOrDefault(x => x.Name.Equals("NativeObject")).GetValue(popup); 
            var formsPopupviewContentTemplate = (StackLayout)nativeObject.GetType().GetRuntimeFields().FirstOrDefault(x => x.Name.Equals("formsPopupViewContentTemplate")).GetValue(nativeObject); 
           var entry = formsPopupviewContentTemplate.FindByName("Entry_EmailReset"); 
 
        } 

Regards,
Karthik Raja
 


Marked as answer

TE Tayyip Emre ÖRNEK August 18, 2020 11:08 AM UTC

Thank you. Its Work


KK Karthikraja Kalaimani Syncfusion Team August 19, 2020 05:04 AM UTC

Hi Tayyip,

Thanks for the update.
We are glad to know that your requirement has been achieved at your end. Please let us know if you have any further queries on this. We are happy to help you. 

Regards,
Karthik Raja 
 


Loader.
Up arrow icon