logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ilTomma  
#1 Posted : Wednesday, December 18, 2019 1:41:25 AM(UTC)
ilTomma

Rank: Newbie

Groups: Registered
Joined: 10/21/2019(UTC)
Posts: 2
Man
Italy
Location: Cremona

Ciao,
I'd like to dynamically set the position of a box
I can change color, width andh height, but not the position

Code:
<UserControl x:Class="Box"
	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" Width="1920" Height="1080" xmlns:my="clr-namespace:vMixTitleLibrary;assembly=vMixTitleLibrary">
<Grid>

<TextBlock x:Name="Larghezza" Text="150" Visibility="Collapsed"> </TextBlock>
<TextBlock x:Name="Altezza" Text="220" Visibility="Collapsed"> </TextBlock>
<TextBlock x:Name="PosX" Text="500" Visibility="Collapsed"> </TextBlock>
<TextBlock x:Name="PosY" Text="100" Visibility="Collapsed"> </TextBlock>
<TextBlock x:Name="Colore" Text="#FFFF00" Visibility="Collapsed"> </TextBlock>

<Rectangle Fill="{Binding Text, ElementName=Colore}" HorizontalAlignment="Left" Width="{Binding Text, ElementName=Larghezza}" Margin="{Binding Text, ElementName=PosX},0,0,{Binding Text, ElementName=PosY}" Stroke="Black" VerticalAlignment="Bottom" Height="{Binding Text, ElementName=Altezza}" />
</Grid>
</UserControl>


The error is here:
Code:
Margin="{Binding Text, ElementName=PosX},0,0,{Binding Text, ElementName=PosY}"

Is there i working solution? I'd like to set X position and Y position in pixel... If possible without code behind

Thankyou
Marco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.