xamarin - Cancelcommand 在 xamarin 表单中的 sfdatepicker 中不起作用
问题描述
我希望在单击 sfdatepicker 页脚的取消按钮时具有正常的取消功能,我试图通过绑定命令来实现它,但它不起作用。任何人都可以建议我任何解决方案吗?
解决方案
您可以使用如下代码:
<datePicker:SfDatePicker.FooterView>
<Grid>
<Button Text="Ok"
x:Name="footerViewButton"
Clicked="footerViewButton_Clicked"/>
</Grid>
</datePicker:SfDatePicker.FooterView>
以这种方式创建,然后在ViewModel中创建相应的方法来实现逻辑操作。
推荐阅读
- snowflake-cloud-data-platform - 任务不在雪花中执行
- google-chrome - 可以在 Chrome 中选择具有相似格式的文本
- java - 如何在java上四舍五入?
- extjs - Sencha Architect 4.2 - 将循环结构转换为 JSON 的框架错误
- python-3.x - 如何使用 Cloud Logging Python SDK 获取给定接收器的 writerIdentity
- c# - 带有 ThenIncludes 的通用存储库模式
- google-colaboratory - sol[i] = solussaum(x[i]) 'float' 对象不可下标
- python - 分块后如何为每列创建 3 个数据点?
- java - 如何在我的代码中添加有效的 if?- 爪哇
- python - 为什么'odeint'不允许我在这里解压浮动对象?