Answer the question
In order to leave comments, you need to log in
How to make a WPF button?
Good evening everyone!
One of these days I decided to start studying WPF, and my dislike for the standard Windows Calculator prompted me to do this.
I myself, of course, am not a .NET programmer with 20 years of experience, I'm just learning this language, but I think I'm already ready for WPF.
In general, I started with the design of my own product, I did it in the style of the iPhone
. This is the story that turned out.
Then, to celebrate, I opened the studio, created a project and started writing something in XAML. Two days in a row my progress was, to put it mildly, "so-so".
I decided to start with the AC button , created a grid, positioned the button, nothing happened, went to bed.
The next day I read some more material on Metanit and got motivated to start coding again.
Finally, I began to understand at least something in this, and I, sort of, how it turned out ( no ).
The studio says it's great! I start the project, thinking that the moment has come when this damn button will become the way I want, and ... no ...
The program itself for some reason looks like this:
I already have a headache googling about this WPF , especially since I stupidly do not understand half of what I found.
And the code for the button is this:
<Border Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" CornerRadius="40" Margin="10px, 0, 10px, 0" Background="#383838">
<Button OverridesDefaultStyle="True" Background="#383838" Foreground="#ECF1FF" FontSize="50px" FontFamily="SFNS Display" Width="350px" Height="70px">
AC
</Button>
</Border>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question