I want to use a GeometryDrawing as a button icon, inside a ControlTemplate, and I want its Brush property to be bound to the button's Foreground property, but it's not working. On the other hand, if I set the Brush explicitly, it works.
Here is my (non-working) code:
    <Style x:Key="SimpleButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="LightGray"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" 
                            BorderBrush="{TemplateBinding Foreground}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            SnapsToDevicePixels="true">
                        <StackPanel Orientation="Vertical">
                            <Image x:Name="buttonImage" Height="20" Width="20">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <!-- line below does not work -->
                                            <GeometryDrawing Brush="{TemplateBinding Foreground}">
                                                <GeometryDrawing.Geometry>
                                                    <EllipseGeometry RadiusX="15" RadiusY="15"/>
                                                </GeometryDrawing.Geometry>
                                            </GeometryDrawing>
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>
                            </Image>
                            <ContentPresenter x:Name="contentPresenter"/>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
 
     
    