enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
1.17k stars 139 forks source link

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

Open ihorfedorchuk opened 6 days ago

ihorfedorchuk commented 6 days ago

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 commented 13 hours ago

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>