全部, 我看到下面在我的輸出窗口中綁定警告。有人可以解釋一下在這裏綁定有什麼問題。我在我的ViewModel中爲ProgressValue'設置了一些值。但是,如下所示,僅爲「ProgressValue」設置了最終值100。WPF綁定警告
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 95 : BindingExpression (hash=58496944): Got PropertyChanged event from ExportControls (hash=6385044)
System.Windows.Data Warning: 101 : BindingExpression (hash=58496944): GetValue at level 0 from ExportControls (hash=6385044) using RuntimePropertyInfo(ProgressValue): '100'
System.Windows.Data Warning: 80 : BindingExpression (hash=58496944): TransferValue - got raw value '100'
System.Windows.Data Warning: 89 : BindingExpression (hash=58496944): TransferValue - using final value '100'
我的代碼如下所示。它在Styles.xaml中定義。
<ProgressBar IsIndeterminate="False"
Value="{Binding ProgressValue,
UpdateSourceTrigger=PropertyChanged,
Mode=TwoWay,
diag:PresentationTraceSources.TraceLevel=High}"
x:Name="ExportProgressBar"
Visibility="Collapsed"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
Background="Transparent"
BorderThickness="0"
Foreground="{StaticResource HighlightBlueBrush}"
/>
在我的視圖模型中,我更新瞭如下所示的值。
Dispatcher.CurrentDispatcher.Invoke(new Action(() =>
{
export.ProgressValue = pMeter;
}));
您應該顯示一些代碼。 –
代碼在哪裏?您只需複製輸出窗口。 –
這些都不是錯誤。我甚至不知道他們是警告,看起來更像是日誌。 – BradleyDotNET