Hello
I have this VM
private readonly INavigationService _navigationService;
public UserActivityModel? UserActivity { get; set; }
public UserModel? User { get; set; }
private Dictionary<string, object> Answer { get; set; }
public DelegateCommand MakeAWishCommand { get; set; }
public ActivityWishResponseWishPendingViewModel(
INavigationService navigationService,
IPageDialogService pageDialogService,
IDialogService dialogService,
IDeviceService deviceService,
IEventAggregator eventAggregator) : base(navigationService, pageDialogService, dialogService, deviceService, eventAggregator)
{
_navigationService = navigationService;
Answer = new Dictionary<string, object>();
MakeAWishCommand = new DelegateCommand(async () => await MakeAWishAction());
User = LocalEnv.Instance.CurrentSession.User;
}
public override void OnNavigatedTo(INavigationParameters parameters)
{
switch (parameters.GetNavigationMode())
{
case NavigationMode.New:
LoadPage(parameters);
break;
}
}
internal async void LoadPage(INavigationParameters parameters)
{
if (!parameters.ContainsKey(AppConstants.user_activity_id)) return;
var userActivityId = parameters.GetValue<int>(AppConstants.user_activity_id);
try
{
LocalEnv.Instance.Log.Info("Get information of activity challenge");
UserActivity = await ActivityApi.GetActivityById(userActivityId);
Title = UserActivity.Activity?.Topic?.Name;
}
catch (Exception)
{
LocalEnv.Instance.Log.Error($"Error in GetActivityById in the challenge with id {UserActivity?.Id}");
}
finally
{
IsBusyList = false;
}
}
private Task MakeAWishAction()
{
throw new NotImplementedException();
}
}
}
This VM is associated with this XAML
<Frame
Grid.Row="1"
Grid.ColumnSpan="2"
Padding="0"
BackgroundColor="{x:StaticResource BackgroundColorThemeDark}"
CornerRadius="20"
IsClippedToBounds="True">
<renderers:CustomEditor
AutoSize="TextChanges"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand" />
</Frame>
<Button
Grid.Row="2"
Grid.ColumnSpan="3"
Margin="100"
BackgroundColor="{StaticResource PrimaryDark}"
Command="{Binding MakeAWishCommand}"
HorizontalOptions="Center"
IsEnabled="{Binding EnableButton}"
Style="{StaticResource ButtonCornerBase}"
Text="{i18N:Translate Send}"
VerticalOptions="EndAndExpand" />
As you can see, I have an Editor inside a frame, what I am trying to do, is to enable the button when the Editor text inside.
I have a view model base, that implements the InotifyPropertyChanged, And I am also using Fody, so I don't have to do a full property

