protected override void OnApplyTemplate() { base.OnApplyTemplate(); _dialogFrame = (Frame)GetTemplateChild("ModalDialogFrame"); StackLayout modalDialogContainer = (StackLayout)GetTemplateChild("ModalDialogContainer"); TouchEffect.SetCommand(modalDialogContainer, DismissCommand); TouchEffect.SetShouldMakeChildrenInputTransparent(modalDialogContainer, false); }