I've just discovered UniformGrid to automatically add items and reorder them. Is there a way of having max number of item (for example six) or have I to perform this check when I've to add an item?
Something as
private void OnAddCommandExecute()
{
IViewModelFactory viewModelFactory = ServiceLocator.Default.ResolveType<IViewModelFactory>();
CameraModel model = new CameraModel();
model.Name = $"Camera_{cameraCount}";
var camera = viewModelFactory.CreateViewModel<CameraViewModel>(model, null);
if(count<=6)
{
Cameras.Add(camera);
cameraCount++;
}
}