c# - Xamarin 表单按钮背景
问题描述
我是 Xamarin 表单的新手。我刚刚练习了按钮,当我点击按钮时我发现了一个问题。请参阅我在下面记录的图像链接上的红色矩形:
我尝试使用自定义渲染器和效果,但按钮不显示点击效果。
代码在这里
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:extension="clr-namespace:LearnXamarin.MarkupExtensions"
x:Class="LearnXamarin.Views.SignInPage"
BackgroundColor="{DynamicResource appBackgroundColor}"
Padding="10"
<StackLayout Spacing="10"
HorizontalOptions="Fill">
<Image Source="{extension:EmbededImage LearnXamarin.Images.logo.png}"
HorizontalOptions="Center"
Margin="0,20,0,0" />
<Entry Placeholder="Email"
Keyboard="Email" />
<Entry Placeholder="Password"
IsPassword="True" />
<Button Text="Sign In"
TextColor="White" BackgroundColor="Green"/>
<Label HorizontalTextAlignment="Center">
<Label.FormattedText>
<FormattedString>
<Span Text="New to xamarin? " />
<Span Text="Create account!"
ForegroundColor="Blue" />
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
解决方案
推荐阅读
- pdf - 将 OpenType 字体嵌入 PDF 文件时需要哪些字体表?
- pygame - python pygame - player and enemy and bullet colliding
- java - 使用片段时Android Java底部导航栏不可见
- raspberry-pi - 在启动 Raspberry Pi 时启动 Reaper
- docker - Docker Compose 在“/app”中找不到 package.json 文件
- authentication - OpenId、OAuth、OIDC 只是一个规范吗?
- python - 无法在 spyder 上将 'home/user/anaconda3/bin/python' 设置为 python 路径?
- android - 如何使用 Spannable 为单词赋予特定颜色?
- node.js - 无法启动 jhipster 项目的前端应用程序
- java - 哈希集迭代器打印