A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
thank you sir, ive downgrade the community.toolkit.maui to version 9.0.0 and its working perfectly fine.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
im using communitytoolkit.maui behaviours to convert an event to a command, but it seems like the command in the viewmodel doesnt get called. ive set the binding context to the viewmodel. here is my code
<ContentPage.Behaviors>
<toolkit:EventToCommandBehavior EventName="Appearing"
Command="{Binding LoadBookmarksCommand}">
</toolkit:EventToCommandBehavior>
</ContentPage.Behaviors>
public partial class BookmarkViewModel : ObservableObject
{
public ObservableCollection<BookmarkProperty> BookmarksCollection { get; set; } =
new ObservableCollection<BookmarkProperty>();
private BookmarkItemService bookmarkItemService = new BookmarkItemService();
void GetBookmarks()
{
BookmarksCollection.Clear();
var bookmarks = bookmarkItemService.ReadAll();
foreach (var bookmark in bookmarks)
{
BookmarksCollection.Add(bookmark);
}
}
[RelayCommand]
void LoadBookmarks()
{
GetBookmarks();
}
}
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
thank you sir, ive downgrade the community.toolkit.maui to version 9.0.0 and its working perfectly fine.