Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

Obtaining Exception "Xamarin.Forms.Platform.Android.Platform+DefaultRenderer"'.

$
0
0

Hi ,

I have facing the below exception issue while using the rotator click one page and move on to next page this crash occur.

This happens randomly don't know why it comes

"Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.Platform+DefaultRenderer'."

Could you please provide any solution to override this


Both binding source on Listview

$
0
0

I have this listview, but for the MenuItem I pass a comand ToRemovePersonand ( in my VM ) but there isn't binding because there is into the listview.
how I can specify the source of the command.

<ListView ItemsSource="{Binding DatasModels}" x:Name="listViewDatas"
                          IsPullToRefreshEnabled="true"
                      RefreshCommand="{Binding RefreshCommand}"
                        IsRefreshing="{Binding IsRefreshing}">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <ViewCell.ContextActions>
                                <MenuItem  Command="{Binding ToRemovePerson}" CommandParameter="{Binding .}"
                                Text="Delete" IsDestructive="True"/>
                            </ViewCell.ContextActions>

                            <StackLayout Orientation="Horizontal">
                                <Label Text="{Binding Firstname}"/>
                                <Label Text="{Binding Lastname}"/>
                                <Label Text="{Binding Company}"/>
                            </StackLayout>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
                <ListView.Behaviors>
                    <behaviors:ListViewBehavior Command="{Binding SelectedItemList}" Converter="{StaticResource SelectedItemConverter}" />
                </ListView.Behaviors>
            </ListView>

Xamarin Listview button

$
0
0

Hello Guys,
I want to show a new Page by clicking the ViewDetails button not ListviewItemclicked.
I want to pass this paramter .
I want to know how to get this Data

My Coding is

How do I integrate the Stripe API into Xamarin.Forms PCL?

$
0
0

Hello community! I noticed recently that the Xamarin Stripe component and documentation no longer exist. Can someone provide an example on how to integrate the Stripe API into a Xamarin.Forms PCL application please? I must be able to process credit card payment from users when they click a Button view. I have a page with Entry views, such as Name on Card, Credit Card Number, etc. and a Button at the bottom. Thank you!

What is the minimum version of Android that is required for Xamarin.Forms.SwipeGestureRecognizer

$
0
0

My target Framework version is Android 6.0. When i upgrade xamarin.forms to 3.4.0.1008975 then get this error:
'The "XamlGTask" task could not be initialized with its input parameters.'
Can anyone tell me what is missing.

'CarouselView' exists in both 'Xamarin.Forms.CarouselView' and 'Xamarin.Forms.Core'

$
0
0

I have issue with carouselview. after installing CarouselView from NuGet Manager giving me below error.
The type 'CarouselView' exists in both 'Xamarin.Forms.CarouselView, Version=1.0.0.0' and 'Xamarin.Forms.Core, Version=2.0.0.0

Retrieving data from an asmx web service which returns a dataset

$
0
0

I'd like to know if I can retrieve data from an asmx web service which returns a dataset. If so, any tips?

How to add a black strokes to my white text?????


Need to truncate text in Text3D with fixed Width and Height

$
0
0

I need to be able to render some text in a Text3D component(using UrhoSharp and C#) which will have a defined max width and max height. So with a predefined font type and font size, if the rendered text exceeds the assigned width and height, it should truncate the text and render with ellipsis. Something like a windows forms Graphics.MeasureString custom algorithm would be the target.

I tried with setting the Width and WordWrap property and then examining the NumChars, NumRows, RowHeight and RowSpacing to come up with some custom logic to find the number of characters that can be fit in the assigned width and then using the NumRows, RowHeight and RowSpacing to calculate the height requirement and truncate as required. But the issue is that the Width property is an integer and the max width will always be in float resulting in the logic to fail(0.019 results in width being set as 0). Why is Width for Text3D in Integer?

Does anyone has any ideas around this? Maybe I am over complicating things and it would be as simple as setting some property but I cannot figure out how.

Tabbed page on the bottom with images

$
0
0

Hi guys,
I want to create for iOS, Android and UWP a tabbed page at the bottom of the page with icons. Also, I should have a "More" button: if there are more then 4 button, to have a page with other icons.

I found this example example than as result is the following image but only for iOS.

Example

I saw BottomNavigationBarXF but there are implementations only for iOS and Android.

Is there any other components?

Deleting cached image with the same Uri

$
0
0

How do i delete cached image with the same Uri (old cached image always served after user change his profile image which has the same Uri)
I tried with FFImageLoading CachedImage.InvalidateCache(_userProfileImagePath, CacheType.All, true); and set CachingEnabled="False" with regular image
<ImageButton Command="{Binding SetPageCommand}" CommandParameter="{Binding MenuItems[8].TargetType}"> <ImageButton.Source> <UriImageSource Uri="{Binding UserProfileImagePath}" CachingEnabled="False"/> </ImageButton.Source> </ImageButton>

Picker pops up twice

$
0
0

I have a simple picker inside a list view and on my devices when I use my finger to scroll or tap it pops up twice

I have verified this on multiple devices and I know it is not my code - it's just a picker

best

JK

Xamarin Live Player vs Gorilla Player

$
0
0

Can someone tell me what is better at the current moment? Xamarin Live Player is official, but still in development. Gorilla player seems more stable. Did you test them both so you can tell me the differences?

Hi, I am facing Deployment to emulator error in Xamarin Forms

$
0
0

I am trying to build a Xamarin forms Application, It's a blank code, the code builds perfectly without error but it does not get deployed on an emulator.

If I click "Start without Debugging" then the application gets installed on my emulator or else it stays black and after building complete I get just a "Ready" output. It happened all of sudden. Visual Studio version: VS2017 15.9.6

Can anyone help me with this? It started out of nowhere.

I tried to search for mono in "Extensions and Update" to enable it but couldn't find anything installed. If I try to install mono it gives an error "Either it is not compatible or already installed"

Also in my registry, I can't find the SDK path.

I need visual studio to build and display output in emulator.!

Custom Map tiles Overlay hides my routes highlight

$
0
0

Hello everyone, I'am currently working on a Pcl project that, among other things, displays a custom map.

I have used this tutorial to customize my map :

and this one to add custom map tiles.

and finally I used this tutorial to highlight routes on the map :

My map works well, the custom tiles overlay looks nice and I managed to change the look of the pins on the map (yay!)

Now my problem is this : My highlighted routes are not visible on the map.

I know the routes are being displayed because if I zoom in or zoom out of the map, I can actually see the highlighted routes during the short time the custom tile overlay is loading and is not being displayed.

wich makes me guess that my map tiles overlay hides my highlighted routes.

I wanted to know if this was a known issue because I couldnt find anything about this problem online. I can post my code if requested.

Thanks in advance for any bit of advice or ideas :)


System.Xml.Dll assembly only loading on breakpoint

$
0
0

Hello,

I have been migrating all my project from an old version of xamarin with an old version of mono to the latest of both.
Amongst all the other issues I have encountered and found a solution, here is one I am still stuck with.

When I start my application on Debug, some part of a code sends an exception:
var source = new TraceSource(traceName);
source.Listeners.Clear();

The source.Listeners.Clear(); says the following:
System.MissingMethodException: Default constructor not found for type System.Diagnostics.FilterElements

Here comes the funny part: if I put a breakpoint on this line, and hoover the "Listeners" word, I got the error above on a little warning windows. But meanwhile in the logs of the application, the DLL loads himself (at the same moment I hoover the word):
Loaded assembly: /Users/...../System.Xml.dll [External]

And then the application runs smoothly, without errors, and the listeners work.

If I don't put the breakpoint, the application will not run properly.

Any idea on this one?

N.B.: I have migrated the application so it compiles in 64bits, retargeted a bunch of packages, etc. So Maybe I have broken something, but I have no idea what.

MacOS: Anyone having trouble with having to specify width requests?

$
0
0

Hi, I'm finding that I have to specify width and height requests for Grids and Images, when doing Xaml layout for MacOS.

This is truly a Cross-Platform project, Android, iOS, UWP, WPF, and MacOS, and Xaml that works well elsewhere has me creating specific OnPlatform Xaml just for MacOS.

Does anyone have any strategy recommendations?

Kind regards!

[FilePickerActivity] not attached to window manager xamarin forms

$
0
0

Hi, I am trying to use the CrossFilePicker to allow a user to select a file from their device and receive this error message shortly after selecting a file. The setup that I have is that file management code is per platform (Android, UWP) and is injected into my ViewModels that require file management via an Interface and AutoFac. The CrossFilePicker is only used in the Android file management code with UWP having a different implementation.

The code in question is:

    public class AndroidFilePicker : IFileManagement
    {
        public async Task<List<FileDataDto>> PickFilesAsync(string temporaryTargetFolder)
        {
            var result = new List<FileDataDto>();
            Plugin.FilePicker.Abstractions.FileData fileData = await CrossFilePicker.Current.PickFile(AndroidConstants.AllowedFileExtensions);

            if (fileData != null)
            {
                ...
            }

            return result;
        }

Would be great to hear if anyone knows why this exception may be occuring and how I could prevent this?

Develop Xamarin app for Knox platform

$
0
0

Hi, I am new to Xamarin development trying to develop a proof of concept app with Xamarin forms that will be deployed on Samsung on a knox workspace and pushed to the devices with BlackBerry bes server. I was able to create a simple app that runs on a device with no Knox that runs with no issues. Can someone direct me what is needed to accomplish this task or reference any article that outlines the steps

Should we use Reactive Extension's Observable pattern to run multiple dependent async tasks?

$
0
0

Hi All,

I have a general question regarding designing the architecture of my cross-platform solution (Xamarin.Forms and ASP.NET Core).

I have a requirement of calling multiple API endpoints (similar to a blog aggregation app) and I want to create a shared REST API wrapper library using Reactive Extension or Refit which will be consumed by both Xamarin.Forms and ASP.NET Core website. As per the Reactive Extension (Rx.NET) documentation - "An advantage of this approach (Observable) is that when you have a bunch of tasks that are not dependent on each other, you can start them all at the same time rather than waiting for each one to finish before starting the next one". But in my case, I want to start multiple API endpoints call in background but want to wait until all completes which means that the tasks are dependent here.

Does it make sense to use Rx.NET's Observable pattern here as my observer as a subscriber will not receive any notification from Observable until all tasks complete? What are the pros and cons here if I use Task Parallel library (with Task.WhenAll()) rather than Rx.NET's Observable considering I need to consume it on both mobile (X.F) and web (ASP.NET Core) platform.

Viewing all 204402 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>