Hi, I'm trying to add RateMyApp to a XF Windows Phone app (yes I will be looking at the Xam Components for iOS/Android later!).
RateMyApp is in Nuget (also see http://developer.nokia.com/community/wiki/Implement_"Rate_My_App"_in_under_60_seconds)
My main view is a TabbedPage and in the WP MainPage constuctor I have the usual
Content=MyApp.Shared.App.GetMainPage().ConvertPageToUIElement(this);
In order to use RateMyApp, I need to add the control in XAML as the last child in a grid so that when made visible it will cover the view. So I tried with this in the MainPage.xaml in the Windows Phone project
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel x:Name="stPanelMain"
Grid.Row="0">
<TextBlock Text="Demo" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="Demo" Margin="9,-7,0,0" FontSize="40" />
</StackPanel>
<ctrl:FeedbackOverlay x:Name="FeedbackOverlay"
Grid.RowSpan="2"
FeedbackTo="someon@somewhere.com"
ApplicationName="MyApp"
CompanyName="MyCompany"
/>
</Grid>
and in the code behind I try to add my XF view
public MainPage()
{
InitializeComponent();
FeedbackOverlay.VisibilityChanged += FeedbackOverlay_VisibilityChanged;
Forms.Init();
var ctl = MyApp.Shared.App.GetMainPage().ConvertPageToUIElement(this);
stPanelMain.Children.Add(ctl);
}
void FeedbackOverlay_VisibilityChanged(object sender, EventArgs e)
{
if (ApplicationBar != null)
{
ApplicationBar.IsVisible = (FeedbackOverlay.Visibility != Visibility.Visible);
}
}
I see my demo text blocks and the rating app pops up as expected, but when I remove the text blocks I don't see the tabbed page view at all.
I guess I can't put the main page content into a stackpanel/grid.
Any suggestions on how I should add RateMyApp, as I can't think how.
Thanks