I have a Popup control in WPF that loades it’s content dynamically and each time I need to set it’s size, how could this be automatically done, so it allways keeps it’s size to it’s content size.
<Popup
Name="popup1"
StaysOpen="False"
PlacementTarget="{Binding ElementName=myButton}"
Placement="Custom"
PopupAnimation="Fade"
AllowsTransparency="True">
A Popup already sizes according to content.
Perhaps your
Popupcontent is having sizing issues due to you restricting growth within your layout container? Your Popup is thus sized accordingly but yourGridfor example may have a fixed width.