logo

Live Production Software Forums


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

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
doggy  
#21 Posted : Thursday, January 30, 2020 2:18:53 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 292 times
Was thanked: 955 time(s) in 790 post(s)
Looking good so far


Quote:
The biggest issue I see here is that it takes a while binding each textbox to the data manager (even if I used your solution : 1 line = 1 city) I still have to click Data Source and select the sheet.
Is there a way to do that in the XAML code ? So that I only have to import my text and everything is already set ?


If your Textbox names and Gsheet names are the same you only have to select the datasource and textblock once if you check the "Apply to all fields in this title "

You can save the settings as a preset (and your production setup ) and load the again at startup


Quote:
You understand that I'm getting the values from texts stored in TextBoxes (I use them as variables, opacity 0%) to get my margin right.
The margin is created in GSheet using basic functions.


Thats the way to do it


Quote:
I understand all that is really DIY, I'd love to do all of that in code behind, but I haven't been able to run 1 simple line (like setting my margin values) and my time is limited.


Than forget that for now focus on the current
If you create titles with code behind ( they will be saved as .dll) the problem is during the design , you can only test them in vMix not in Blend and will have to close vMix before continuing editing and debugging the title .

btw ;-) https://forums.vmix.com/....aspx?g=posts&t=3169
thanks 1 user thanked doggy for this useful post.
davidcallahan on 1/30/2020(UTC)
davidcallahan  
#22 Posted : Thursday, January 30, 2020 2:58:42 AM(UTC)
davidcallahan

Rank: Advanced Member

Groups: Registered
Joined: 1/22/2020(UTC)
Posts: 47
France
Location: Montpellier

Thanks: 14 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: doggy Go to Quoted Post

If your Textbox names and Gsheet names are the same you only have to select the datasource and textblock once if you check the "Apply to all fields in this title "

Thanks a lot for that! I didn't see that option..

Originally Posted by: doggy Go to Quoted Post

You can save the settings as a preset (and your production setup ) and load the again at startup

Yes once everything is ready I'll do that

Originally Posted by: doggy Go to Quoted Post

If you create titles with code behind ( they will be saved as .dll) the problem is during the design , you can only test them in vMix not in Blend and will have to close vMix before continuing editing and debugging the title .

Yes I saw that about the .dll, the issue is still that I don't know the name of what I'm looking for (and I'm not aware enough of C# language) but I feel like it would be so much easier (and proper) to deal with those data behind. Despite what you say about Blend not being able to do so. Any link to a tutorial on how to do an hello world dll for vmix?

Originally Posted by: doggy Go to Quoted Post

That's amazing! Exactly what I'm looking for!
How did you manage to get the code running?

Thanks again!
doggy  
#23 Posted : Thursday, January 30, 2020 3:03:22 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 292 times
Was thanked: 955 time(s) in 790 post(s)
Quote:
How did you manage to get the code running?


for a vMix title one is creating a usercontrol (as such starting your project) , not a windows form , so you need to build it and then load the resulting .dll into vMix

also INotifyPropertyChanged is a thing to google for for binding processed data
thanks 1 user thanked doggy for this useful post.
davidcallahan on 1/30/2020(UTC)
jasalmer  
#24 Posted : Monday, November 9, 2020 2:37:03 AM(UTC)
jasalmer

Rank: Newbie

Groups: Registered
Joined: 7/13/2020(UTC)
Posts: 2

Thanks: 2 times
Originally Posted by: doggy Go to Quoted Post
Quote:


Code:
<UserControl Width="1920" Height="1080" Panel.ZIndex="500" InputMethod.IsInputMethodEnabled="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mtl="clr-namespace:vMixTitleLibrary;assembly=vMixTitleLibrary">
  <Grid InputMethod.IsInputMethodEnabled="True">
    <Rectangle Fill="#FF1414CF" Stroke="#FF000000" Width="{Binding Path=Text, ElementName=Votes1}" Height="50" Margin="320,350,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" InputMethod.IsInputMethodEnabled="True" />
    <TextBlock Text="500" FontWeight="Bold" FontSize="36" Foreground="#FFA0E242" TextWrapping="Wrap" Name="Votes1" Width="86.333" Height="55.621" Margin="1195,344.379,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="-4.931,4.462" InputMethod.IsInputMethodEnabled="True" />
    <Rectangle Fill="#FF1414CF" Stroke="#FF000000" Width="{Binding Path=Text, ElementName=Votes2}" Height="50" Margin="320,430,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" InputMethod.IsInputMethodEnabled="True" />
    <TextBlock Text="300" FontWeight="Bold" FontSize="36" Foreground="#FFA0E242" TextWrapping="Wrap" Name="Votes2" Width="86.333" Height="55.621" Margin="1195,424.379,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="-4.931,4.462" InputMethod.IsInputMethodEnabled="True" />
    <Rectangle Fill="#FF1414CF" Stroke="#FF000000" Width="{Binding Path=Text, ElementName=Votes3}" Height="50" Margin="320,510,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" InputMethod.IsInputMethodEnabled="True" />
    <TextBlock Text="250" FontWeight="Bold" FontSize="36" Foreground="#FFA0E242" TextWrapping="Wrap" Name="Votes3" Width="86.333" Height="55.621" Margin="1195,504.379,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="-4.931,4.462" InputMethod.IsInputMethodEnabled="True" />
    <TextBlock Text="Candidate1" FontSize="36" Foreground="#FFF9EE03" TextWrapping="Wrap" Name="Candidate1" Width="275" Height="50" Margin="40,350,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" InputMethod.IsInputMethodEnabled="True" />
    <TextBlock Text="Candidate3" FontSize="36" Foreground="#FFF9EE03" TextWrapping="Wrap" Name="Candidate2" Width="275" Height="50" Margin="40,430,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" InputMethod.IsInputMethodEnabled="True" />
    <TextBlock Text="Candidate3" FontSize="36" Foreground="#FFF9EE03" TextWrapping="Wrap" Name="Candidate3" Width="275" Height="50" Margin="40,510,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" InputMethod.IsInputMethodEnabled="True" />
    <Image Stretch="Fill" Width="1920" Height="1080" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="0" InputMethod.IsInputMethodEnabled="True" />
    <mtl:TextBlockDesign FontWeight="Bold" Fill="#FFFFFF00" FontSize="72" TextAlignment="Center" Text="City" Name="City" Width="480.595399188092" Height="82.7933349609375" Margin="690.703653585927,150.297699594046,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Visible" InputMethod.IsInputMethodEnabled="True" />


  </Grid>
</UserControl>








How can I get this code to have the bar go all the way across when it receives a max value of 20??? Right now it takes about 850 to get it all the way across, what am I not doing right?

davidcallahan  
#25 Posted : Tuesday, November 10, 2020 5:09:13 AM(UTC)
davidcallahan

Rank: Advanced Member

Groups: Registered
Joined: 1/22/2020(UTC)
Posts: 47
France
Location: Montpellier

Thanks: 14 times
Was thanked: 2 time(s) in 2 post(s)
For the first question you need to do it in the code behind section, I can't help with this I didn't manage to get it to work.
For the seconde one it makes sense because the value is in pixels not in %. You just need to know how many pixels wide is your comp, so that you can deduce how much 20% is
thanks 1 user thanked davidcallahan for this useful post.
jasalmer on 11/11/2020(UTC)
doggy  
#26 Posted : Tuesday, November 10, 2020 8:44:05 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 292 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: davidcallahan Go to Quoted Post
For the first question you need to do it in the code behind section,


This

Quote:

For the seconde one it makes sense because the value is in pixels not in %. You just need to know how many pixels wide is your comp, so that you can deduce how much 20% is


This, -> see first
jasalmer  
#27 Posted : Tuesday, November 10, 2020 1:53:33 PM(UTC)
jasalmer

Rank: Newbie

Groups: Registered
Joined: 7/13/2020(UTC)
Posts: 2

Thanks: 2 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: davidcallahan Go to Quoted Post
For the first question you need to do it in the code behind section,


This

Quote:

For the seconde one it makes sense because the value is in pixels not in %. You just need to know how many pixels wide is your comp, so that you can deduce how much 20% is


This, -> see first




1) I am confused as to what "This" means.
2) What do you mean the code behind section?
doggy  
#28 Posted : Tuesday, November 10, 2020 5:22:41 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
Location: Belgium

Thanks: 292 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: jasalmer Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: davidcallahan Go to Quoted Post
For the first question you need to do it in the code behind section,


This

Quote:

For the seconde one it makes sense because the value is in pixels not in %. You just need to know how many pixels wide is your comp, so that you can deduce how much 20% is


This, -> see first




1) I am confused as to what "This" means.
2) What do you mean the code behind section?


"This" means : confirming what davidcallahan wrote

code-behind : https://en.wiktionary.org/wiki/code-behind

Quote:
"way across when it receives a max value of 20??? Right now it takes about 850 to get it all the way across"


Some code would have to be written that would transform your value in relation to the space you want it to occupy in your graphics depiction, your 20 (100%) transformed to the graphics 100% (850) and so on. XAML can not calculate values but the code behind can (taking info from the XAML and convert it to adapt graphical representation)
thanks 1 user thanked doggy for this useful post.
jasalmer on 11/11/2020(UTC)
Users browsing this topic
Guest (7)
2 Pages<12
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.