The type of Background property of Control is Brush. There are a variety of Brushes and SolidColorBrush is one of them.
For the current value of Background to be SolidColorBrush, its Color property can be referenced in the binding.
<StackPanel>
<Slider Width="200" Minimum="0" Maximum="1" Value="{Binding ElementName=MY_BUTTON, Path=Opacity}"/>
<Button x:Name="MY_BUTTON" Content="button" Width="100" Height="50" Background="Red"/>
<DataGrid>
<DataGrid.HorizontalGridLinesBrush>
<SolidColorBrush Color="{Binding ElementName=MY_BUTTON,Path=Background.Color}" Opacity="{Binding ElementName=MY_BUTTON,Path=Opacity}"/>
</DataGrid.HorizontalGridLinesBrush>
...
</DataGrid>
</StackPanel>
The result:
----------------------------------------------------------------------------
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.