I create the following WPF control a dot and a description label: * North Star
<UserControl x:Class="StopPoint.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Canvas>
<Path Fill="SkyBlue" Stroke="Black" StrokeThickness="2">
<Path.Data>
<EllipseGeometry Center="10, 10" RadiusX="4" RadiusY="4"/>
</Path.Data>
</Path>
<TextBlock Text="North Star" Canvas.Left="20" Canvas.Top="20"/>
</Canvas>
</UserControl>
I will have a lot of stars in the panel. Can I autosize the control that is takes the minimum size possible?
Something à la : <Window SizeToContent="WidthAndHeight">...</Window>
?