Skip to content

Insert Separator Line under NavigationBar in Android #21724

Closed Answered by AlleSchonWeg
AlleSchonWeg asked this question in General
Discussion options

You must be logged in to vote

My trick is to set a BarBackground with a LinearGradientBrush:

	<Style TargetType="NavigationPage"
		   ApplyToDerivedTypes="True">
		<Setter Property="BarBackground">
			<OnPlatform x:TypeArguments="Brush">
				<On Platform="Android">
					<LinearGradientBrush StartPoint="0,0"
										 EndPoint="0,1">
						<GradientStop Color="{AppThemeBinding Light={StaticResource BackgroundColor}, Dark={StaticResource BackgroundColor-dark}}"
									  Offset="0.0" />
						<GradientStop Color="{AppThemeBinding Light={StaticResource BackgroundColor}, Dark={StaticResource BackgroundColor-dark}}"
									  Offset="0.99" />
						<GradientStop Color="{AppThemeBinding Light={StaticResource SeparatorCol…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AlleSchonWeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant