Probably FillColor is a simple property, but it must be defined as a Dependency Property (https://video2.skills-academy.com/en-us/dotnet/desktop/wpf/advanced/dependency-properties-overview) to support binding. Show some details about FillColor.
Cannot get visual appearance of a UserControl to change
RogerSchlueter-7899
1,281
Reputation points
I use a UserControl called Dot to draw circles on a map:
<UserControl
x:Class="Dot"
.....
<Ellipse
Fill="{Binding Path=FillColor}"
Height="{Binding Path=Diameter}"
Width="{Binding Path=Diameter}">
</Ellipse>
</UserControl>
This is how I draw it:
Private Sub DrawPoint(Colr As SolidColorBrush, Radius As Double)
ADot = New Dot With {.FillColor = Colr, .Diameter = 2 * Radius}
MapLayr.AddChild(ADot, PointLocation, PositionOrigin.Center)
End Sub
Initially the colr is Red. After validation I want to change the color to green using:
ADot.FillColor = Brushes.Green
That does not change the appearance of the dot on the map. What more needs to be done to actually change the visible color?