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
Brutuss  
#1 Posted : Friday, April 12, 2019 6:43:26 PM(UTC)
Brutuss

Rank: Member

Groups: Registered
Joined: 1/23/2018(UTC)
Posts: 16
Man
Location: Poland

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
how to add a background color to textbox (name candidate) depending on the result of the vote. yes = green, no = red, abstained = orange. In xaml ????
Quote:
<Style x:Key="PercVerified" TargetType="{x:Type DataGridCell}" >
<Style.Triggers>
<DataTrigger Binding="{Binding 1PercVerified}" Value="no">
<Setter Property="Background" Value="Red"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="Margin" Value="-2.0"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding 1PercVerified}" Value="yes">
<Setter Property="Background" Value="Green"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="Margin" Value="-2.0"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding 1PercVerified}" Value="abs">
<Setter Property="Background" Value="Orange"></Setter>
<Setter Property="Foreground" Value="Black"></Setter>
<Setter Property="Margin" Value="-2.0"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>


This code won't workin on Microsoft Blend for Visual Studio
Users browsing this topic
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.