Closed jbe2277 closed 9 months ago
if you add a color for "Isenabled=true" does that work?
<Label Grid.RowSpan="2" Text="{Binding IconGlyph}" FontFamily="MaterialIcons" FontSize="22" VerticalOptions="Center" HorizontalOptions="Center">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding IsCommandEnabled}" Value="False">
<Setter Property="TextColor" Value="LightGray"/>
</DataTrigger>
</Label.Triggers>
</Label>
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
@PureWeen : I have added an additional DataTrigger
with color Red
for true
. This works. After navigation has completed it applies the color Red
.
So it seems that it does not switch back to the default color when the DataTrigger
condition changes to false. However, this issue is only on Android. Windows works correct.
<Label Grid.Column="1" Grid.Row="0" Text="{Binding Title}" Style="{StaticResource Subtitle}" VerticalOptions="Center">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding IsCommandEnabled}" Value="False">
<Setter Property="TextColor" Value="LightGray"/>
</DataTrigger>
<DataTrigger TargetType="Label" Binding="{Binding IsCommandEnabled}" Value="True">
<Setter Property="TextColor" Value="Red"/>
</DataTrigger>
</Label.Triggers>
</Label>
Update: This issue still exists after update to .NET 7/MAUI 7.
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 4.0. Can repro on Android platform with sample project. waf.zip
Any update on this? I am also running into the same issue where values aren't updating on a control if it's not visible.
✅ Seems that this issue got fixed. It does not occur anymore with MAUI 8.0.6.
Description
On Android it seems that the Binding does not update the properties when the view is hidden. However, it works on Windows and it worked with Xamarin Forms 5 on Android as well.
Explanation: During navigation (async Task operation) the navigation item is shown as disabled (gray). After navigation has completed the
NavigationItem.IsCommandEnabled
is set back to true and viaBinding
the navigation items is shown as enabled again.Issue on Android:
On Windows this works correct:
Steps to Reproduce
Link to public reproduction project repository
https://github.com/jbe2277/waf/tree/69803cef490970a344c370616021464f59ae201d
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No
Relevant log output
No response