xamlwindows-phonepivotviewer

How to obtain full width in PivotItem


In XAML, PivotItems don't have full width of the screen on a Windows Phone. This is good behavior and design, but for a single image I want it to fill the entire screenwidth.

Can this be accomplished?


Solution

  • The root cause is that default PivotItemMargin is set to 12,0,12,0. We can find the setting in generic.xaml.

    So what we need to do is overridding the setting in App.xaml. Just like this:
    <Thickness x:Key="PivotItemMargin">0</Thickness>