ArcGIS Pro message label not showing again after closing it

342
2
Jump to solution
05-12-2023 02:17 AM
JohnP18
New Contributor II

 

I am using ArcGIS Pro message label in my custom UI. I have also created a boolean Visibility property and binded with the message label control.

<frameworkControls:MessageLabel
Content="{Binding MessageLabelContent}"
Visibility="{Binding MessageLabelVisible, Converter={StaticResource BoolToVisibility}}" />

So we have multiple use cases where we are collapsing and showing(making visible) it again which is working perfectly fine. But in that process user can use the close button of the message control to close it and then even after marking the property as Visible it is still not showing again. How to tackle this issue because user may close this message? And then after close, user can use the functionality where the message label is supposed to show again. But it is not showing again even after setting the property as visible.

Can someone help me here?

@Wolf @UmaHarano @CharlesMcLeod @GKmieliauskas 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

Most properties default to OneWay binding, but some dependency properties (typically properties of user-editable controls such as the TextBox.Text and CheckBox.IsChecked default to TwoWay binding.

So try to set TwoWay binding:

<frameworkControls:MessageLabel
Content="{Binding MessageLabelContent}"
Visibility="{Binding MessageLabelVisible, Converter={StaticResource BoolToVisibility}, Mode=TwoWay}" />

View solution in original post

2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

Most properties default to OneWay binding, but some dependency properties (typically properties of user-editable controls such as the TextBox.Text and CheckBox.IsChecked default to TwoWay binding.

So try to set TwoWay binding:

<frameworkControls:MessageLabel
Content="{Binding MessageLabelContent}"
Visibility="{Binding MessageLabelVisible, Converter={StaticResource BoolToVisibility}, Mode=TwoWay}" />
Vidar
by
Occasional Contributor II

This worked for me.

0 Kudos