vMix Forums
»
General
»
General Discussion
»
Repeat rows from a datasource in the title
Rank: Newbie
Groups: Registered
Joined: 10/30/2020(UTC) Posts: 3 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 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.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 10/30/2020(UTC) Posts: 3 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 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 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 ?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 10/30/2020(UTC) Posts: 3 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: 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 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 ?
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Repeat rows from a datasource in the title
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.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close