Hi,
I have an add-in built with ArcGIS Pro SDK for .NET that displays a formatted multiline text on the ScreenTips of InfoButtons. In order to display the text properly, the width of the ScreenTips is set to Auto so that they get as wide as needed. Up to ArcGIS Pro 3.3, the code below has worked well:
<controls:InfoButton.Resources>
<Style TargetType="{x:Type ribbon:ScreenTip}">
<Setter Property="Width" Value="Auto" />
</Style>
</controls:InfoButton.Resources>However, the code above doesn't work in 3.4 or later. I noticed that as of 3.4 the ScreenTip in use has changed from the Ribbon namespace (ActiproSoftware.Windows.Controls.Ribbon.Controls.ScreenTip) to the Bars namespace (ActiproSoftware.Windows.Controls.Bars.ScreenTip), and also that a new ProScreenTip class has been added to the SDK. After some research, I was able to produce the following solution:
<controls:InfoButton.Resources>
<Style TargetType="{x:Type controls:ProScreenTip}" BasedOn="{StaticResource {x:Type controls:ProScreenTip}}">
<Setter Property="ComplexContentWidth" Value="500" />
</Style>
</controls:InfoButton.Resources>However, the solution above requires the library ArcGIS.Desktop.Bars.Wpf.dll to be added as a dependency, meaning that the add-in cannot work in versions of ArcGIS Pro earlier than 3.4. Could you advise if there is a better way to achieve the same?
Also, the value Auto can no longer be used and the ScreenTip doesn't adjust its width to the contents. Are there any alternatives?
Thanks