-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
IconElement
implementation
#543
IconElement
implementation
#543
Conversation
@pomianowski I hope you haven't forgotten about this interesting pull-request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @IvanDmitriev1 thank you again for your huge contribution and effort. You did a great job modifying the icons by the way changing strong dependencies on specific classes. Apart from a few minor things, the code looks fine to me.
However, looking at your recent changes, I think it's probably better to put all the control-related classes in one Controls directory. It may be a lot stuff in one place, but I think it will be easier for the end user to use, similar to what is done in WPF.
As for presenting icons, I think ContentPresenter
is a better than ContentControl
for that.
<ContentPresenter
x:Name="ControlIconLeft"
Grid.Column="0"
Margin="{StaticResource TextBoxLeftIconMargin}"
VerticalAlignment="Top"
Content="{TemplateBinding Icon}"
Focusable="False"
TextElement.FontSize="16"
TextElement.Foreground="{TemplateBinding Foreground}"
Visibility="Visible" />
Eventually, ContentControl
uses ContentPresenter
to present content, so we can consider ContentPresenter
as more ligthweight
https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/Themes/XAML/ContentControl.xaml#LL17C21-L17C40
src/Wpf.Ui.Gallery/Views/Pages/Navigation/BreadcrumbBarPage.xaml
Outdated
Show resolved
Hide resolved
src/Wpf.Ui.Gallery/Views/Pages/Navigation/BreadcrumbBarPage.xaml
Outdated
Show resolved
Hide resolved
|
Implements a
IconElement
control almost like in winui 3.Replaces
SymbolIcon
withIconElement
.Pull request type
Other information