Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Render full screen when using Gradient as Background #22931

Closed
archergod opened this issue Jun 8, 2024 · 2 comments
Closed

Button Render full screen when using Gradient as Background #22931

archergod opened this issue Jun 8, 2024 · 2 comments
Labels
platform/iOS 🍎 t/bug Something isn't working

Comments

@archergod
Copy link

Description

I have a Xamarin App that I upgrade to Maui and app is already live so all buttons looks great. After upgrade I have Android version going smooth, But on iOS it render the Buttons with Background as LinearGradient as in image

image

this is my Resource for Gradient

<LinearGradientBrush x:Key="GradientBlueBackground" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="{StaticResource Primary}" />
<GradientStop Offset="1" Color="#073779" />
</LinearGradientBrush>

<Style x:Key="GreenButton" TargetType="Button">
		<Setter Property="TextColor" Value="{AppThemeBinding Dark=White, Light=White}" />
		<Setter Property="CornerRadius" Value="7" />
		<Setter Property="FontSize" Value="13" />
		<Setter Property="ContentLayout" Value="Right,10" />
		<Setter Property="Background" Value="{StaticResource GradientBlueBackground}" />
		<Setter Property="Padding">
			<Setter.Value>
				<OnPlatform x:TypeArguments="Thickness">
					<On Platform="Android" Value="20,10" />
					<On Platform="iOS" Value="18,10" />
				</OnPlatform>
			</Setter.Value>
		</Setter>
		<Setter Property="FontFamily" Value="Poppins-Regular" />
		<Setter Property="VisualStateManager.VisualStateGroups">
			<VisualStateGroupList>
				<VisualStateGroup x:Name="CommonStates">
					<VisualState x:Name="Disabled">
						<VisualState.Setters>
							<Setter Property="BackgroundColor" Value="#0c6344" />
						</VisualState.Setters>
					</VisualState>
					<VisualState x:Name="Pressed">
						<VisualState.Setters>
							<Setter Property="Background" Value="{StaticResource GradientRedBackground}" />
						</VisualState.Setters>
					</VisualState>
				</VisualStateGroup>
			</VisualStateGroupList>
		</Setter>
	</Style>

the Login word blue is suppose to be small to just cover the button text.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@archergod archergod added the t/bug Something isn't working label Jun 8, 2024
Copy link
Contributor

github-actions bot commented Jun 8, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@archergod
Copy link
Author

Closing as same as #20218

@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants