【发布时间】:2013-10-09 05:58:04
【问题描述】:
在我的 WPF 应用程序中,我试图将控件“ProgressBar”中的属性“Maximum”与 ViewModel 中的属性绑定(在 Caliburn.micro 的帮助下)。
查看(xaml):
<ProgressBar x:Name="CurrentProgress"/>
视图模型:
private int currentProgress;
public int CurrentProgress
{
get { return currentProgress; }
set
{
if (currentProgress == value)
{
return;
}
currentProgress = value;
NotifyOfPropertyChange(() => CurrentProgress);
}
}
问题:Caliburn.micro 有没有办法绑定最大值。我试图创建一个像这样的属性:
private int maximumProgress;
public int MaximumProgress
{
get { return maximumProgress; }
set
{
if (maximumProgress == value)
{
return;
}
maximumProgress = value;
NotifyOfPropertyChange(() => MaximumProgress);
}
}
但这不起作用。 我也在 Caliburn 文档中进行搜索,但在那里找不到一些帮助。
感谢您的帮助
【问题讨论】:
标签: c# wpf progress-bar caliburn.micro