问题描述
我正在将WPF与黑暗神庙"表情一起使用,并遇到了跟踪错误.我已跟踪到对绑定数据源进行更新的时间.该邮件昨晚一直在工作,今天停了下来,不知道我为阻止它工作或如何进行修复怎么做.转换器通常返回12,所以我不认为这是量程错误.
错误:
PresentationFramework.dll中发生类型为'System.InvalidOperationException'的第一次机会异常
在'System.Windows.Controls.ControlTemplate'的名称范围中找不到'PART_Track'名称'.
XAML:
I am using WPF with the Expression Dark templete and am getting the follow error. I have tracked it down to when a update is done to the a bound data source. It was working last night this morning and stopped, no clue what I did to stop it from working or how to fix it. The converter is return 12 normally so I don't think it is a range error.
Anybody have a suggestion on where to look or what to look for or how to look for it?
Error:
A first chance exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
'PART_Track' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'.
XAML:
<ProgressBar Orientation="Vertical"
Width="15"
Value="{Binding Path=Strength, Mode=OneWay, NotifyOnTargetUpdated=True, Converter={StaticResource csqConverter}}"
Maximum="100"
Minimum="0"
Background="White"
Foreground="Black"
HorizontalAlignment="Right"></ProgressBar>
转换器:
Converter:
public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is int)
{
int i = (int)value;
if (i >= 1 && i <= 100)
{
return i;
}
return 0;
}
return value;
}
Regards,
John J. Hughes II
http://www.functioninternational.com/
推荐答案
这篇关于模板中的进度栏错误,也许的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!