Objects have not a color fill

2021-03-24T11:01:24.397+00:00

Hi!
I have a problem. My application has many objects end they have a color fill. But I can't see it in Designer. When I start my play all objects have only white color. Why? What do I have to do? Please see any screenshots.
Best regards, Alexander

Developer technologies | Visual Studio | Debugging
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 126.1K Reputation points
    2021-03-24T12:30:30.857+00:00

    It seems that your objects do not have a background. Try something like this:

     <Canvas . . . .>
       <Canvas.Background>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
             <GradientStop Color="Black" Offset="0"/>
             <GradientStop Color="White" Offset="1"/>
          </LinearGradientBrush>
       </Canvas.Background>
    </Canvas>
    
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.