79108528

Date: 2024-10-21 04:19:08
Score: 1
Natty:
Report link

From the Rectangle doc

To paint the inside of the rectangle, set its Fill property to a Brush-derived object.

So you may use Fill property instead of BackgroundColor,

            <Rectangle.Triggers>
                <DataTrigger TargetType="Rectangle" Binding="{Binding Cancelled}" Value="True">
                    <Setter Property="Fill" Value="#FF0000" />
                </DataTrigger>
            </Rectangle.Triggers> 

Please let me know if you have any question.

Reasons:
  • RegEx Blacklisted phrase (2.5): Please let me know
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: Liqun Shen-MSFT