WPF Binding Warnings

1

Все, я вижу ниже. Предупреждения в окне "Выход". Может кто-нибудь, пожалуйста, объясните, в чем проблема с Binding здесь. Я установил несколько значений для ProgressValue 'в моей ViewModel. Но для "ProgressValue" установлено только конечное значение 100, как показано ниже.

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;
                }));
  • 0
    Вы должны показать некоторый код.
  • 0
    Где код? Вы просто копируете окно вывода.
Показать ещё 3 комментария
Теги:
wpf

1 ответ

0

BradleyDotNET прав.

У вас есть PresentationTraceSources.TraceLevel установлен на Высокий. Это приведет к печати информации о привязке.

MSDN на PresentationTraceSources.TraceLevel

  • 0
    Я это понимаю. Можете ли вы сообщить мне, если вы видите какие-либо проблемы с кодом выше. Почему ProgressBar не обновляется?
  • 0
    Ой, извини. Я неправильно понял. Какой type pMeter?
Показать ещё 3 комментария

Ещё вопросы

Сообщество Overcoder
Наверх
Меню