Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I got stuck in simple property refresh in wpf.
I have 2 textblocks
<textblock text="{Binding RedWarningText}">
Visibility="{Binding IsRedWarning, Converter={StaticResource visConverter},UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"/>

<textblock text="{Binding ActualWorkInProgress}">

binded to 2 different properties of VM

private bool _isRedWarning = false;
public bool IsRedWarning
{
get
{
if(ActualWorkInProgress > 0)
_isRedWarning = true
return _isRedWarning;
}
set
{
_isRedWarning = value;
RaisePropertyChanged(() => this.IsRedWarning);
}
}

private decimal actualWorkInProgress;
public decimal ActualWorkInProgress
{
get
{
return this.actualWorkInProgress;
}
set
{
this.actualWorkInProgress = value;
RaisePropertyChanged(() => this.ActualWorkInProgress);
RaisePropertyChanged(() => this.IsRedWarning);
}
}

I am calculating ActualWorkInProgress in an async process.
Problem is On UI I am getting updated ActualWorkInProgress but not IsRedWarning (I put it in another textblock)

How can I solve it
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900