Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the markup extension for the SymbolIcon and FontIcon class not working at all. #1067

Merged
merged 4 commits into from
May 5, 2024

Conversation

m0lDaViA
Copy link
Contributor

@m0lDaViA m0lDaViA commented Apr 22, 2024

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Currently you cannot use a markup extension for symbolicons or fonticons because the constructor does not accept the arguments.

grafik

What is the new behavior?

The markup extension for the symbolicon and fonticon class are now working with some small issue.
grafik

Other information

So, I have now tested this extensively. I had previously closed this thread because for some reason the FontIcon markup extension randomly worked. However, I think that was due to VS (bugs and such).
I also confused the FontIcon class with the SymbolIcon class in the thread (sorry x.x).

So: The markup extension needs a standard constructor without arguments. Furthermore, the existing constructor does not accept 2 arguments.
Because of the bugs in VS, I wasn't sure before whether it was really a mistake in the markup extension
(that's why i closed the last pull request), but now I am. The SymbolIcon markup extension had the same problem.
The font size doesn't (forgot work), but it's not clear to me why.
Maybe you know why @pomianowski ?

@m0lDaViA m0lDaViA requested a review from pomianowski as a code owner April 22, 2024 12:56
@github-actions github-actions bot added PR Pull request dotnet labels Apr 22, 2024
…o easier scale the arc aswell as a new startpoint at 12am and refactoring of the code.
@github-actions github-actions bot added the controls Changes to the appearance or logic of custom controls. label Apr 30, 2024
@m0lDaViA
Copy link
Contributor Author

@pomianowski I have no idea why this commit went into this pull request :s
Sorry for that, but i coulnd't even create another one.

So: As the arc class wasn't quite working so i thought "Why not? I do need it anyways.".
The arc class had a few problems including that the arc had to be re-inserted (as a control) when the size was changed because a resize was not taken into account when rendering.
That was the biggest problem that made me want to adapt these in the first place.

In the course of this, I thought it would be better for the user if he had the opportunity to edit both the sweepdirection and the penlinecap.

I also changed the starting position, from 3 a.m. to 12 a.m. I'll be happy to explain the reason for this:
Ultimately, it is important to the user that it is as easy to use as possible. This also applies to programmers. And what's easier than a clock that you've known since birth?

If you don't agree and/or are satisfied with it, it can always be changed^^

@m0lDaViA m0lDaViA requested a review from pomianowski May 2, 2024 15:22
{
#region Declarations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to not use regions

Copy link
Contributor Author

@m0lDaViA m0lDaViA May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove them if you want but i never understood why anyone shouldn't use them. Can you tell me why you don't want them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purely stylistically, I think they are code smell. They hide part of the code because it is difficult to read, and if the code is difficult to read, it means that it is not good code. It is known that WPF UI needs a lot of work to improve readability and cleanliness, but it is worth working on it

namespace Wpf.Ui.Controls;

/// <summary>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing docs?

Copy link
Contributor Author

@m0lDaViA m0lDaViA May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well i removed them for a better overview and just forgot to add them back.

@pomianowski pomianowski merged commit bdc2182 into lepoco:development May 5, 2024
2 checks passed
@ElectroAttacks
Copy link

@m0lDaViA I found a new "feature" while using the NavigationView in LeftFluent mode. If you are using a different Font like Montserrat (which is actually quite big), you end up with a cut-off string, even if you increase the item size manually. I think it might be the ContentPresenter...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controls Changes to the appearance or logic of custom controls. dotnet PR Pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants