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?
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>
This is the solution, having a negative margin
<controls:Pivot>
<controls:PivotItem Margin="-10,0,-10,0">
<Grid />
</controls:PivotItem>
<controls:PivotItem Margin="-10,0,-10,0">
<Grid />
</controls:PivotItem>
</controls:Pivot>
Of course you can also use a regular pivot and only have the image margin set to -10,0,-10,0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With