Skip to content

SyncfusionExamples/binding-reactive-mvvm-treeview-xaamarin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

binding-reactive-mvvm-treeview-xaamarin

The SfTreeView allows you to bind ItemTemplate to the reactive UI ViewModel which is a composable and cross-platform model-view-viewmodel framework for all .NET platforms.

Sample

public class ViewModel : ReactiveObject
{
    private ObservableCollection<FileManager> imageNodeInfo;
    public ObservableCollection<FileManager> ImageNodeInfo
    {
        get => imageNodeInfo;
        set => this.RaiseAndSetIfChanged(ref imageNodeInfo, value);
    }

    public ViewModel()
    {
        GenerateSource();
    }

    private void GenerateSource()
    {
        // Populate imageNodeInfo with FileManager items,
        // each having ItemName, ImageIcon (ImageSource), and SubFiles
    }
}

Requirements to run the demo

To run the demo, refer to System Requirements for Xamarin

Troubleshooting

Path too long exception

If you are facing path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.

About

How to bind data using Reactive MVVM in Xamarin.Forms TreeView (SfTreeView)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages