Paging extention is unusable without Http extensions


I've created a project by this tutorial, but my app showed only blank screen. Navigation events are fired as usual. The app was pretty mush unusable and no exceptions were thrown.

After a couple of hours of re-doing the same project from scratch, I've decided to install MyToolkit.Http and it finally worked. This wasn't obvious at all as I don't need any HTTP extensions for my app.

file attachments

Closed Jun 3, 2015 at 9:48 PM by rsuter


rsuter wrote Apr 11, 2015 at 10:01 AM

Yesterday version 2.3.30 was released, v2.3.29 was broken... Is it possible that you created your first app with v2.3.29 and the second one with 2.3.30 and the added Http package is not the cause that it now works?

Nekroido wrote Apr 11, 2015 at 10:39 AM

Yes. Seems like this was the problem.

And I've just got another one with the same result, when I tried to set RequestedTheme.

rsuter wrote Apr 11, 2015 at 11:03 AM

Can you attach a sample app to reproduce the problrm?

Nekroido wrote Apr 11, 2015 at 11:40 AM

Okay, sorry. The problem was in page's styling, because I used __RequestedTheme = ApplicationTheme.Light;
    <TextBlock Text="Test" />
It relates to this issue: https://mytoolkit.codeplex.com/discussions/578806
The default OS theme is dark, so MtPage's background is black. And my test textblock's text was also black.
I will now try and "fight" with that, because my app uses brand colors and light background.

rsuter wrote Apr 11, 2015 at 12:09 PM

So the solution would be to remove the background brush?

Nekroido wrote Apr 11, 2015 at 12:37 PM

I've attached a test project for you.

Nekroido wrote Apr 11, 2015 at 12:46 PM

Okay, that was weird. Here it is.

rsuter wrote Apr 11, 2015 at 2:30 PM

So, the only problem is the background brush?

If you change it to

    <Grid Tapped="Grid_Tapped" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
It looks as expected?

rsuter wrote Apr 11, 2015 at 2:43 PM

In the Windows Store app templates in Visual Studio, the page background is also set on the first child and not the page itself:
<Page ...
   <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
What's the drawback of this?

Nekroido wrote Apr 11, 2015 at 7:54 PM

As it is already noted in another discussion, child's background is never extended to the whole page. This was quite a problem for WP7 developing prior theme managers. You can see that on this combined screenshot: left one is MT project with background set the Grid, an the right one is default paging. Both apps have this styling in App.xaml:

            <SolidColorBrush x:Key="ApplicationPageBackgroundThemeBrush" Color="#FFF0F0F0"/>
            <SolidColorBrush x:Key="ApplicationPageForegroundThemeBrush" Color="#FF333333"/>
                <ResourceDictionary x:Key="Dark">
                    <Color x:Key="ThemeColor">#00b3ee</Color>
                    <SolidColorBrush x:Key="ThemeBrush" Color="{ThemeResource ThemeColor}" />
                <ResourceDictionary x:Key="Light">
                    <Color x:Key="ThemeColor">#00b3ee</Color>
                    <SolidColorBrush x:Key="ThemeBrush" Color="{StaticResource ThemeColor}" />