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

How to change Arrow icon in TreeView and how to change a size of Arrow icon? #813

Open
ihorfedorchuk opened this issue Oct 30, 2024 · 2 comments
Labels
question❔ Further information is requested
Milestone

Comments

@ihorfedorchuk
Copy link

Hello. Could you help me with this issues:

  1. How to change Arrow icon in TreeView?
  2. How to change a size of Arrow icon in TreeView?
@enisn enisn added the question❔ Further information is requested label Nov 5, 2024
@enisn enisn added this to the v2.10 milestone Nov 5, 2024
@enisn
Copy link
Owner

enisn commented Nov 5, 2024

You can check this section: https://enisn-projects.io/docs/en/uranium/latest/themes/material/components/TreeView#styles

You can add a style that customizes treeview arrow. It's a simple Path, so you can set Data property of it:

<Style TargetType="Path" Class="TreeView.Arrow" BaseResourceKey="Microsoft.Maui.Controls.Shapes.Path">
    <Setter Property="Fill" Value="Red" />
    <Setter Property="Data" Value="M14,43.7V8.3c0-1,1.3-1.7,2.2-0.9l21.2,17.3c0.8,0.6,0.8,1.9,0,2.5L16.2,44.7C15.3,45.4,14,44.8,14,43.7z" />
    <Setter Property="WidthRequest" Value="40" />
    <Setter Property="HeightRequest" Value="40" />
</Style>

@RhomGit
Copy link

RhomGit commented Jan 23, 2025

Just fyi: I tried this and the page stopped rendering (NET9/latest) and Uranium.UI.Material 2.11.0:

    <Style TargetType="Path" Class="TreeView.Arrow" BaseResourceKey="Microsoft.Maui.Controls.Shapes.Path">
        <Setter Property="Fill" Value="Red" />
    </Style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question❔ Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants