How do you take a SQlite result and insert it into Model Values so they can be reused?

How do you take a SQlite result and insert it into Model Values so they can be reused? Problem Description: Details in the title, code is below. How do I populate the model values from the SQlite response? //Current line returns the below response var test2 = await Database.QueryAsync<User>("SELECT * FROM User"); Return result Model … Read more

OnPlatform Conditional in .NET MAUI FlyoutItem Items Colleciton

OnPlatform Conditional in .NET MAUI FlyoutItem Items Colleciton Problem Description: In .NET MAUI, how do I use the OnPlatform element to conditionally include a ShellContent item in a FlyoutItem Items collection? This Xaml will not compile (namespaces removed for clarity) <Shell> <FlyoutItem> <OnPlatform x:TypeArguments="Items"> <On Platform="iOS"> <ShellContent Title="Map" ContentTemplate="{DataTemplate pages:MapPage}" Route="MapPage" /> </On> <On Platform="Android"> … Read more

Trying to programaticaly add custom controls to a page in MAUI

Trying to programaticaly add custom controls to a page in MAUI Problem Description: in the parent page i have a colelction view <CollectionView Grid.Row="2" Grid.ColumnSpan="2" SelectionMode="None" ItemsSource="{Binding Players}"> <CollectionView.ItemTemplate> <DataTemplate x:DataType="{x:Type contentViews:PlayerStubContentView}"> <SwipeView> <SwipeView.RightItems> <SwipeItems> <SwipeItem Text="Delete" Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:PlayersViewModel}}, Path=DeleteCommand}" CommandParameter="{Binding .}" BackgroundColor="Red"/> </SwipeItems> </SwipeView.RightItems> <Grid Padding="0.5"> <Frame> <Frame.GestureRecognizers> <TapGestureRecognizer Command="{Binding Source={RelativeSource AncestorType={x:Type … Read more

Trying to programaticaly add custom controls to a page in MAUI

Trying to programaticaly add custom controls to a page in MAUI Problem Description: in the parent page i have a colelction view <CollectionView Grid.Row="2" Grid.ColumnSpan="2" SelectionMode="None" ItemsSource="{Binding Players}"> <CollectionView.ItemTemplate> <DataTemplate x:DataType="{x:Type contentViews:PlayerStubContentView}"> <SwipeView> <SwipeView.RightItems> <SwipeItems> <SwipeItem Text="Delete" Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:PlayersViewModel}}, Path=DeleteCommand}" CommandParameter="{Binding .}" BackgroundColor="Red"/> </SwipeItems> </SwipeView.RightItems> <Grid Padding="0.5"> <Frame> <Frame.GestureRecognizers> <TapGestureRecognizer Command="{Binding Source={RelativeSource AncestorType={x:Type … Read more

Trying to programaticaly add custom controls to a page in MAUI

Trying to programaticaly add custom controls to a page in MAUI Problem Description: in the parent page i have a colelction view <CollectionView Grid.Row="2" Grid.ColumnSpan="2" SelectionMode="None" ItemsSource="{Binding Players}"> <CollectionView.ItemTemplate> <DataTemplate x:DataType="{x:Type contentViews:PlayerStubContentView}"> <SwipeView> <SwipeView.RightItems> <SwipeItems> <SwipeItem Text="Delete" Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:PlayersViewModel}}, Path=DeleteCommand}" CommandParameter="{Binding .}" BackgroundColor="Red"/> </SwipeItems> </SwipeView.RightItems> <Grid Padding="0.5"> <Frame> <Frame.GestureRecognizers> <TapGestureRecognizer Command="{Binding Source={RelativeSource AncestorType={x:Type … Read more

Maui "The current Activity can not be detected. Ensure that you have called Init in your Activity or Application class."

Maui "The current Activity can not be detected. Ensure that you have called Init in your Activity or Application class." Problem Description: I am using Xam.Plugin.Media nuget package. await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions { SaveToAlbum = true, PhotoSize = PhotoSize.MaxWidthHeight, Name = fullFileName, DefaultCamera = CameraDevice.Rear, MaxWidthHeight = 1000, AllowCropping = false }); Solution – 1 You … Read more

How to efficiently access Microsoft.Maui.Devices.Sensor.Locations in SQL Server

How to efficiently access Microsoft.Maui.Devices.Sensor.Locations in SQL Server Problem Description: This is more a design question so please bear with me. I have a system that stores locations consisting of the ID, Longitude and Latitude. I need to compare the distance between my current location and the locations in the database a only choose ones … Read more

How to efficiently access Microsoft.Maui.Devices.Sensor.Locations in SQL Server

How to efficiently access Microsoft.Maui.Devices.Sensor.Locations in SQL Server Problem Description: This is more a design question so please bear with me. I have a system that stores locations consisting of the ID, Longitude and Latitude. I need to compare the distance between my current location and the locations in the database a only choose ones … Read more

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Reject