Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui:InfoBar :The control closing event cannot be triggered #540

Closed
mingyaodagege opened this issue Feb 20, 2023 · 3 comments
Closed

ui:InfoBar :The control closing event cannot be triggered #540

mingyaodagege opened this issue Feb 20, 2023 · 3 comments
Labels
bug Something isn't working locked-due-to-inactivity

Comments

@mingyaodagege
Copy link

Describe the bug

ui:InfoBar :The control closing event cannot be triggered
image

To Reproduce

Expected behavior

Closed

Screenshots

image

OS version

win11

.NET version

.net6

WPF-UI NuGet version

3.0.0-preview.1

Additional context

No response

@mingyaodagege mingyaodagege added the bug Something isn't working label Feb 20, 2023
@johnvesalius
Copy link

This bug is still present in 3.0.0-preview.9.

@Virtualizer
Copy link

Same with Preview.8. Setting IsClosable to true or binding to ViewModel doesn't change anything, too.

<ui:InfoBar Title="{Binding ViewModel.Message.Value.Title}" Margin="20" HorizontalAlignment="Right" VerticalAlignment="Bottom" IsClosable="{Binding ViewModel.IsMessageOpen}" IsOpen="{Binding ViewModel.IsMessageOpen, Mode=TwoWay}" Message="{Binding ViewModel.Message.Value.Message}" Severity="{Binding ViewModel.Message.Value.Severity}" />

@pokorpa
Copy link
Contributor

pokorpa commented Dec 31, 2023

The problem is caused by RelayCommand<bool> used to close the InfoBar.
Since the command receives null for argument, the CanExecute logic evaluates to false.

@pokorpa pokorpa mentioned this issue Dec 31, 2023
7 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working locked-due-to-inactivity
Projects
None yet
Development

No branches or pull requests

4 participants