Is there any way whether we can stretch Element placed inside a Convas if we give the Horizotal and Vertical Alignment properties to Stretch?
views:
33answers:
1
A:
You could try something like this:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Canvas Name="theCanvas">
<Button Content="Hello" Width="{Binding ActualWidth, ElementName=theCanvas}" />
</Canvas>
</Window>
Adel Hazzah
2010-07-26 03:57:41