d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Wpf Forms
Add Reply New Topic New Poll
Member
Posts: 6,266
Joined: May 10 2017
Gold: 1,500.00
Dec 20 2018 11:06pm
if anyone has good experience in these, im looking for some help.

i have moveable controls on a WPF form.

im trying to save the location of a label within a canvas for loading next time. needing to save the xml basically because i need where it is in relation to the canvas.

EX:
Quote

<Canvas x:Name="x" Width="1316" Height="939">
<Label x:Name="x2" Content="Example" Foreground="White" Background="#19000000" Canvas.Left="849" Canvas.Top="90" FontFamily="Ebrima" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Canvas>
Member
Posts: 3,028
Joined: Mar 23 2016
Gold: 7,568.50
Dec 22 2018 11:14pm
Code
double left = Canvas.GetLeft(x2);
double top = Canvas.GetTop(x2);
Member
Posts: 6,266
Joined: May 10 2017
Gold: 1,500.00
Dec 23 2018 09:24am
Quote (annexusquam @ Dec 22 2018 11:14pm)
Code
double left = Canvas.GetLeft(x2);
double top = Canvas.GetTop(x2);


holy fk thank you
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll