-
July 22nd, 2010, 04:58 PM
#1
dynamic elements position
Hi,
I want to create an WPF app where position of elements and their size will change dynamicly with window size. I can't put them into StackPanel, because I wan't to create an animation with moving objects.
Is it possible to use dimensions in % instead of fixed and auto possitions ?
There is example code, where I used buttons as example objects and I want to place buttons 10 %, 30% 60%, 80% from the left (example values). Is it possible?
<Grid>
<Canvas Name="canvas1">
<Button Canvas.Left="33" Canvas.Top="182" Content="Button" Height="23" Name="button1" Width="75" />
<Button Canvas.Left="147" Canvas.Top="182" Content="Button" Height="23" Name="button2" Width="75" />
<Button Canvas.Left="279" Canvas.Top="182" Content="Button" Height="23" Name="button3" Width="75" />
<Button Canvas.Left="397" Canvas.Top="182" Content="Button" Height="23" Name="button4" Width="75" />
</Canvas>
</Grid>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|