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
Nicolas Alves  
#1 Posted : Monday, November 2, 2020 4:10:37 PM(UTC)
Nicolas Alves

Rank: Newbie

Groups: Registered
Joined: 10/30/2020(UTC)
Posts: 3
Brazil
Location: Tucurui

Hello friend, I am developing a XAML title to display percentages via JSON datasource. It is already loading data normally. However, the number of lines can sometimes vary, so there is no way I can leave a fixed number of results.

What is the best way to repeat the lines, or hide the empty ones?

I tried using the xaml converter, however vMix did not accept it. I made a script to see if the name field is empty, if it was, it hid the grid of the whole line.

The way I put it to repeat the fields in vMix was to select the column and then what line number will be displayed.

Thankful friends.

UserPostedImage
doggy  
#2 Posted : Monday, November 2, 2020 7:28:04 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Is this a question or stating that you found a solution ?

Quote:
I made a script to see if the name field is empty, if it was, it hid the grid of the whole line.
Nicolas Alves  
#3 Posted : Tuesday, November 3, 2020 12:27:16 AM(UTC)
Nicolas Alves

Rank: Newbie

Groups: Registered
Joined: 10/30/2020(UTC)
Posts: 3
Brazil
Location: Tucurui

Is a question. I said that I tried to do this but vMix didn't accept it. Compiling within Visual Studio worked, but not within vMix.

So I ask if I am on the right path or if someone has another solution?

Originally Posted by: doggy Go to Quoted Post
Is this a question or stating that you found a solution ?

Quote:
I made a script to see if the name field is empty, if it was, it hid the grid of the whole line.


doggy  
#4 Posted : Tuesday, November 3, 2020 1:17:57 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Quote:
Compiling within Visual Studio worked, but not within vMix.


did you create/compile it as a Usercontrol and used the resulting .dll in vMix ?
Nicolas Alves  
#5 Posted : Tuesday, November 3, 2020 1:48:37 PM(UTC)
Nicolas Alves

Rank: Newbie

Groups: Registered
Joined: 10/30/2020(UTC)
Posts: 3
Brazil
Location: Tucurui

Yes. The problem is that I put the VB.Net script inside ".xaml.vb" and referenced it using the "xmlns: local" attribute. Then vMix didn't accept it. Where did I go wrong? When compiling the code in Blend everything works.

My UserControl tag:

Quote:
<UserControl x:Class="TelaPrefeito"
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"
xmlns:mtl="clr-namespace:vMixTitleLibrary;assembly=vMixTitleLibrary"
xmlns:local="clr-namespace:ProjApuracao2020"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">




Where to use the Convert function to hide the line with empty text:

Quote:
<Grid Visibility="{Binding ElementName=TxtNome07, Converter={local:StringNullOrEmptyToVisibilityConverter}}">


The implemented function of IValueConverter:

Quote:
Public Class StringNullOrEmptyToVisibilityConverter : Inherits System.Windows.Markup.MarkupExtension
Implements IValueConverter

Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Dim text As String
text = value.Text

Return If(String.IsNullOrEmpty(text), Visibility.Hidden, Visibility.Visible)
End Function

Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Return Nothing
End Function

Public Overrides Function ProvideValue(serviceProvider As IServiceProvider) As Object
Return Me
End Function
End Class




vMix error:
UserPostedImage


I attached the files.

Thank you.


TelaPrefeito.xaml (13kb) downloaded 1 time(s). TelaPrefeito.xaml.vb (1kb) downloaded 2 time(s).
Originally Posted by: doggy Go to Quoted Post
Quote:
Compiling within Visual Studio worked, but not within vMix.


did you create/compile it as a Usercontrol and used the resulting .dll in vMix ?
Users browsing this topic
Guest (2)
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.