Silverlight 数据表:“保存”和“编辑”按钮不显示
我正在尝试在 Silverlight 4 中制作数据表单。也许我做错了什么。
类:
public class ExpenseInfoTest
{
public int MyProperty { get; set; }
public int Foo { get; set; }
public int Bar { get; set; }
}
XAML:
<local:ExpenseInfoTest x:Key="newExpense"/>
<df:DataForm Height="218"
HorizontalAlignment="Left"
Margin="13,368,0,0"
Name="expenseDataForm"
VerticalAlignment="Top"
Width="590"
CurrentItem="{StaticResource newExpense}" />
显示内容:
我想要“保存”按钮。我怎样才能让它出现?我的 XAML 或数据类有问题吗?
I'm trying to make a data form in Silverlight 4. Perhaps I'm doing something wrong.
The class:
public class ExpenseInfoTest
{
public int MyProperty { get; set; }
public int Foo { get; set; }
public int Bar { get; set; }
}
XAML:
<local:ExpenseInfoTest x:Key="newExpense"/>
<df:DataForm Height="218"
HorizontalAlignment="Left"
Margin="13,368,0,0"
Name="expenseDataForm"
VerticalAlignment="Top"
Width="590"
CurrentItem="{StaticResource newExpense}" />
What is displayed:
I'd like the "Save" button. How can I get it to appear? Is something wrong in my XAML or data class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在您的 xaml 中,添加
您的
DataForm
声明。如果您愿意,您可以将 CommandButtonsVisibility 绑定到组合框
,并能够根据 CB 选择来控制哪些命令按钮可用。
In your xaml, add
in your
DataForm
declaration.If you wanted to, you could bind the
CommandButtonsVisibility
to lets say a combo boxand be able to control which command buttons are available based on the CB selection.
这行代码很有帮助:
This line of code is helpful: