4

Maybe someone has an answer for this.

I am designing user controls that are to be added to other containers and they are to fit the available space of their container.

So this means not setting the height and width of the user control.

But when I am designing the control I want to see it with a width and height.

So surely I dont have to keep setting and removing the wdth and height of the control

How can this be handled???

Malcolm

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Malcolm
  • 12,524
  • 28
  • 89
  • 125

1 Answers1

6

Use this

<UserControl x:Class="MyApp.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="500" d:DesignWidth="600">
Sauron
  • 16,668
  • 41
  • 122
  • 174
  • 1
    It would help if you explained that this is only available in Blend and Visual Studio 2010 as it leads those with Visual Studio 2008 down a path of disappointment. – jpierson Feb 16 '10 at 18:52