Toggle image is not shown when using from Nuget package
Opened this issue · 3 comments
higty commented
As title described.
enisn commented
This is just an example, TreeView doesn't include that icon in the nuget package built-in.
- Make sure this check.png is included in your project under
Resources/Images
path
https://github.com/enisn/TreeView.Maui/blob/main/sandbox/SandboxTreeView/Resources/Images/check.png - Make sure you're using datatemplate like in example:
<t:TreeView ItemsSource="{Binding Nodes}"> <t:TreeView.ItemTemplate> <DataTemplate> <HorizontalStackLayout> <HorizontalStackLayout.GestureRecognizers> <TapGestureRecognizer Command="{Binding ToggleCommand}" /> </HorizontalStackLayout.GestureRecognizers> <Image Source="folder.png" IsVisible="{Binding IsDirectory}" HeightRequest="30"/> <Label Text="{Binding Name}"/> <Image Source="check.png" IsVisible="{Binding IsSelected}" HeightRequest="30"/> </HorizontalStackLayout> </DataTemplate> </t:TreeView.ItemTemplate> </t:TreeView>
higty commented
Thanks. I'll try.