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
NewsworthyVision  
#1 Posted : Thursday, April 19, 2018 6:54:00 AM(UTC)
NewsworthyVision

Rank: Advanced Member

Groups: Registered
Joined: 7/19/2017(UTC)
Posts: 45
United Kingdom

Thanks: 11 times
Was thanked: 14 time(s) in 7 post(s)
Hi folks,

I've just started delving into creating my own XAML files using Microsoft Blend, and it's great for creating variable text fields.

Now I'm wondering if I would be able to alter the background colours of the fields from within vMix, like the text. OR, using the amazing UTC tool that elgarf created, which can alter the text fields perfectly.

Example:
UserPostedImage

I'd like to be able to alter the colours of the team backgrounds easily, without having to re-export the XAML. They have the "x:Name" properties "homeColour" and "homeColourDark" and likewise for the Away team.

Any thoughts appreciated.

Nick

PS: Happy to share the XAML template for anyone who likes the setup. I based it off of Fox Sports USA hockey graphics.
doggy  
#2 Posted : Thursday, April 19, 2018 8:46:10 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Several solutions given in this forum

doggy attached the following image(s):
tool.JPG (47kb) downloaded 57 time(s).

You cannot view/download attachments. Try to login or register.
NewsworthyVision  
#3 Posted : Thursday, April 19, 2018 9:29:47 AM(UTC)
NewsworthyVision

Rank: Advanced Member

Groups: Registered
Joined: 7/19/2017(UTC)
Posts: 45
United Kingdom

Thanks: 11 times
Was thanked: 14 time(s) in 7 post(s)
Okay Doggy. I see you've been bothered by this question before. Found your links after much squinting.
NewsworthyVision  
#4 Posted : Sunday, April 22, 2018 7:48:21 AM(UTC)
NewsworthyVision

Rank: Advanced Member

Groups: Registered
Joined: 7/19/2017(UTC)
Posts: 45
United Kingdom

Thanks: 11 times
Was thanked: 14 time(s) in 7 post(s)
I solved it! I used a method Doggy described here: https://forums.vmix.com/...ts&m=33878#post33878

I didn't realise also that if you put in HEX values instead of colour names it can still use it as a valid input. Here is the result: UserPostedImage

Lastly, feel free to use this as a template, as a thank you: https://www.dropbox.com/...ScoreboardBase.xaml?dl=0

Enjoy. :)

PS: If you don't want to download it, the code is below.

Code:
<UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mtl="clr-namespace:vMixTitleLibrary;assembly=vMixTitleLibrary"
        x:Class="MainWindow"
        x:Name="Window"             
        Width="1920" Height="1080">
    <Grid x:Name="LayoutRoot">

        <TextBlock x:Name="HOME_COLOUR" HorizontalAlignment="Left" Height="16" Margin="-168,88,0,0" TextWrapping="Wrap" Text="#ff0066" VerticalAlignment="Top" Width="58.667" Foreground="White"/>
        <TextBlock x:Name="HOME_COLOUR_DARK" HorizontalAlignment="Left" Height="16" Margin="-168,108,0,0" TextWrapping="Wrap" Text="#cc0052" VerticalAlignment="Top" Width="58.667" Foreground="White"/>
        <TextBlock x:Name="AWAY_COLOUR" HorizontalAlignment="Left" Height="16" Margin="-168,128,0,0" TextWrapping="Wrap" Text="#0066ff" VerticalAlignment="Top" Width="58.667" Foreground="White"/>
        <TextBlock x:Name="AWAY_COLOUR_DARK" HorizontalAlignment="Left" Height="16" Margin="-168,148,0,0" TextWrapping="Wrap" Text="#0052cc" VerticalAlignment="Top" Width="58.667" Foreground="White"/>

        <Rectangle Fill="#FF212121" HorizontalAlignment="Left" Height="70" Margin="96,54,0,0" Stroke="Black" VerticalAlignment="Top" Width="1040" Panel.ZIndex="0"/>
        <Rectangle Fill="{Binding Text, ElementName=HOME_COLOUR}" HorizontalAlignment="Left" Width="290" Height="70" Margin="96,54,0,0" Stroke="Black" VerticalAlignment="Top" Panel.ZIndex="1" StrokeThickness="0"/>
        <Rectangle Fill="{Binding Text, ElementName=HOME_COLOUR_DARK}" HorizontalAlignment="Left" Width="100" Height="70" Margin="386,54,0,0" Stroke="Black" VerticalAlignment="Top" Panel.ZIndex="1" StrokeThickness="0"/>
        <Rectangle Fill="{Binding Text, ElementName=AWAY_COLOUR}" HorizontalAlignment="Left" Width="290" Height="70" Margin="486,54,0,0" Stroke="Black" VerticalAlignment="Top" Panel.ZIndex="1" StrokeThickness="0"/>
        <Rectangle Fill="{Binding Text, ElementName=AWAY_COLOUR_DARK}" HorizontalAlignment="Left" Width="100" Height="70" Margin="776,54,0,0" Stroke="Black" VerticalAlignment="Top" Panel.ZIndex="1" StrokeThickness="0"/>

        <mtl:TextBlockDesign x:Name="homeTeam" Text="HOME TEAM" Margin="116,70,0,970" Width="269" Height="70" HorizontalAlignment="Left" Fill="White" FontSize="36" VerticalAlignment="Center" FontWeight="Bold" Panel.ZIndex="2"/>
        <mtl:TextBlockDesign x:Name="awayTeam" Text="AWAY TEAM" Margin="506,70,0,970" Width="269" Height="70" HorizontalAlignment="Left" Fill="White" FontSize="36" VerticalAlignment="Center" FontWeight="Bold" Panel.ZIndex="2"/>
        <mtl:TextBlockDesign x:Name="homeScore" Text="0" Margin="396,54,1440,955" Width="80" Height="70" HorizontalAlignment="Center" Fill="White" FontSize="60" VerticalAlignment="Center" FontWeight="Bold" TextAlignment="Center" Panel.ZIndex="2"/>
        <mtl:TextBlockDesign x:Name="awayScore" Text="0" Margin="786,54,1050,955" Width="80" Height="70" HorizontalAlignment="Center" Fill="White" FontSize="60" VerticalAlignment="Center" FontWeight="Bold" TextAlignment="Center" Panel.ZIndex="2"/>
        <mtl:TextBlockDesign x:Name="period" Text="1st" Margin="876,54,910,955" Width="130" Height="70" HorizontalAlignment="Center" Fill="White" FontSize="32" VerticalAlignment="Center" TextAlignment="Center" Panel.ZIndex="2"/>
        <mtl:TextBlockDesign x:Name="gameTime" Text="20:00" Margin="1006,54,785,955" Width="110" Height="70" HorizontalAlignment="Center" Fill="White" FontSize="32" VerticalAlignment="Center" TextAlignment="Center" Panel.ZIndex="2"/>

    </Grid>
</UserControl>
File Attachment(s):
ScoreboardBase.xaml (4kb) downloaded 45 time(s).

You cannot view/download attachments. Try to login or register.
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.