Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 89864 articles
Browse latest View live

When does Focus event fired?

$
0
0

The official doc says:

Occurs when the element receives focus.

for example, what is a focus for a BoxView?


Found a way to make ToolBarItems Visible/Invisible..without a custom renderer

$
0
0

So from what I've seen in the API Docs (http://iosapi.xamarin.com/?link=T:Xamarin.Forms.MenuItem/*) Toolbar items don't seem to have an IsVisible property.

I was able to accomplish this by defining a Binding for the "Icon" property and settings it to null when I don't want the toolbar item to display. So far, it has worked well.

Posting here so that anyone else looking to toggle visibility of toolbar items can try it out.

Like & dislike

$
0
0

how can I migrate this part of code to my ViewModel

this reference in mi XAML

Strange permission issue when submitting an app to the App Store

$
0
0

I have created an app using XF and when submitting it to the App Store, I received an email that reads:

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSCalendarsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSPhotoLibraryUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSMicrophoneUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSAppleMusicUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSSiriUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

Best regards,

The App Store Team

But I am not using any of those permissions at all!

Like & dislike in ViewModel

$
0
0

how can I migrate this part of code to my ViewModel

this reference in my XAML page

Shell Navigation Bar Gradient

$
0
0

Is it possible through custom rendering to add a gradient to a shell's navigation bar?

Different line heights in one label.

$
0
0

I have an issue with different line heights in one label, as you can see, there is problem with lines ending with \n. If the line isn't ended without \n, but with wordwrap, line spacing is much smaller.

How to print

$
0
0
I have decided to migrate an existing WinForm application to XF.

It’s basically a very simple invoicing software for a shop and I was really excited about the performance when I started the project and managed to create iOS, Android, UWP, WPF and macOS all using the same code base (98% of the code is shared)

My project is a shared project (NOT PCL) and all I want to be able to do now is to print the invoices (not necessarily silently like POS)

I have to say that I am baffled that I can’t find a single working example after spending 12 hours on it...

I had been thinking using Shared Code would be giving me more flexibility to access native functions thanks to the #if #endif compiler directives but now I have minimised my expectations and will be the happiest man alive if I can at least print an invoice in the UWP/WPF only ...

I decided to create a PDF first to make things easier and consistent in terms of invoicing layout and even that was a big issue (using iTextSharp failed) so I ended up posting data to a WebService and then leaving PDF generation to the backend

Now, my question is how can I print that PDF using the device’s installed printer? (For now only in UWP/WPF and if I succeed I will be looking for other platforms)

Getting a NullReferenceException in Android when backing out of app

$
0
0

I'm using Xamarin Forms 4.2.0 and utilizing Xamarin.Forms Shell. Pressing the back button seems to work find when navigating through the various screens in my app, however, when I press back to exit the app when debugging I get a NullReferenceException:

09-30 14:49:52.866 D/Mono    ( 1085): Loading reference 10 of /storage/emulated/0/Android/data/com.companyname.agentconnectmobile/files/.__override__/Xamarin.Forms.Platform.Android.dll asmctx DEFAULT, looking for System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.866 D/Mono    ( 1085): Assembly Ref addref Xamarin.Forms.Platform.Android[0x799acc0e00] -> System.Runtime.Serialization[0x7935aa8d00]: 3
09-30 14:49:52.866 D/Mono    ( 1085): Loading reference 1 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.866 D/Mono    ( 1085): Assembly Ref addref System.Runtime.Serialization[0x7935aa8d00] -> System.Xml[0x799be73480]: 5
09-30 14:49:52.918 D/Mono    ( 1085): Loading reference 2 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for System.ServiceModel.Internals, Version=0.0.0.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.920 D/Mono    ( 1085): Image addref System.ServiceModel.Internals[0x7937f9df00] (asmctx DEFAULT) -> System.ServiceModel.Internals.dll[0x7935889800]: 2
09-30 14:49:52.920 D/Mono    ( 1085): Prepared to set up assembly 'System.ServiceModel.Internals' (System.ServiceModel.Internals.dll)
09-30 14:49:52.920 D/Mono    ( 1085): Assembly System.ServiceModel.Internals[0x7937f9df00] added to domain RootDomain, ref_count=1
09-30 14:49:52.922 D/Mono    ( 1085): AOT: image 'System.ServiceModel.Internals.dll.so' not found: dlopen failed: library "System.ServiceModel.Internals.dll.so" not found
09-30 14:49:52.923 D/Mono    ( 1085): AOT: image '/Users/builder/jenkins/workspace/archive-mono/2019-06/android/release/sdks/out/android-arm64-v8a-release/lib/mono/aot-cache/arm64/System.ServiceModel.Internals.dll.so' not found: (null)
09-30 14:49:52.923 D/Mono    ( 1085): Config attempting to parse: 'System.ServiceModel.Internals.dll.config'.
09-30 14:49:52.923 D/Mono    ( 1085): Config attempting to parse: '/Users/builder/jenkins/workspace/archive-mono/2019-06/android/release/sdks/out/android-arm64-v8a-release/etc/mono/assemblies/System.ServiceModel.Internals/System.ServiceModel.Internals.config'.
09-30 14:49:52.923 D/Mono    ( 1085): Assembly Ref addref System.Runtime.Serialization[0x7935aa8d00] -> System.ServiceModel.Internals[0x7937f9df00]: 2
09-30 14:49:52.923 D/Mono    ( 1085): Loading reference 0 of System.ServiceModel.Internals.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.923 D/Mono    ( 1085): Assembly Ref addref System.ServiceModel.Internals[0x7937f9df00] -> mscorlib[0x7a3039be80]: 64
09-30 14:49:52.923 D/Mono    ( 1085): Loading reference 2 of System.ServiceModel.Internals.dll asmctx DEFAULT, looking for System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.924 D/Mono    ( 1085): Assembly Ref addref System.ServiceModel.Internals[0x7937f9df00] -> System.Xml[0x799be73480]: 6
Loaded assembly: System.ServiceModel.Internals.dll [External]09-30 14:49:52.924 D/Mono    ( 1085): Loading reference 3 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123

09-30 14:49:52.924 D/Mono    ( 1085): Assembly Ref addref System.Runtime.Serialization[0x7935aa8d00] -> System[0x799acd1580]: 10
09-30 14:49:52.998 D/Mono    ( 1085): Loading reference 1 of System.Xml.dll asmctx DEFAULT, looking for System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:52.999 D/Mono    ( 1085): Assembly Ref addref System.Xml[0x799be73480] -> System[0x799acd1580]: 11
09-30 14:49:53.099 D/Mono    ( 1085): Loading reference 1 of System.ServiceModel.Internals.dll asmctx DEFAULT, looking for System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:53.100 D/Mono    ( 1085): Assembly Ref addref System.ServiceModel.Internals[0x7937f9df00] -> System[0x799acd1580]: 12
09-30 14:49:53.145 D/Mono    ( 1085): Loading reference 19 of /storage/emulated/0/Android/data/com.companyname.agentconnectmobile/files/.__override__/Xamarin.Forms.Platform.Android.dll asmctx DEFAULT, looking for System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=abc123
09-30 14:49:53.146 D/Mono    ( 1085): Assembly Ref addref Xamarin.Forms.Platform.Android[0x799acc0e00] -> System.Xml[0x799be73480]: 7
09-30 14:49:53.221 D/Mono    ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.221 D/Mono    ( 1085): Searching for 'SystemNative_Unlink'.
09-30 14:49:53.221 D/Mono    ( 1085): Probing 'SystemNative_Unlink'.
09-30 14:49:53.222 D/Mono    ( 1085): Found as 'SystemNative_Unlink'.
09-30 14:49:53.279 D/Mono    ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.279 D/Mono    ( 1085): Searching for 'SystemNative_LStat2'.
09-30 14:49:53.279 D/Mono    ( 1085): Probing 'SystemNative_LStat2'.
09-30 14:49:53.279 D/Mono    ( 1085): Found as 'SystemNative_LStat2'.
09-30 14:49:53.279 D/Mono    ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.279 D/Mono    ( 1085): Searching for 'SystemNative_Rename'.
09-30 14:49:53.279 D/Mono    ( 1085): Probing 'SystemNative_Rename'.
09-30 14:49:53.280 D/Mono    ( 1085): Found as 'SystemNative_Rename'.
09-30 14:49:53.553 D/Mono    ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.553 D/Mono    ( 1085): Searching for 'SystemNative_Link'.
09-30 14:49:53.553 D/Mono    ( 1085): Probing 'SystemNative_Link'.
09-30 14:49:53.553 D/Mono    ( 1085): Found as 'SystemNative_Link'.
09-30 14:49:53.563 D/Mono    ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.563 D/Mono    ( 1085): Searching for 'SystemNative_Stat2'.
09-30 14:49:53.563 D/Mono    ( 1085): Probing 'SystemNative_Stat2'.
09-30 14:49:53.563 D/Mono    ( 1085): Found as 'SystemNative_Stat2'.
09-30 14:49:53.564 D/Mono    ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.564 D/Mono    ( 1085): Searching for 'SystemNative_Symlink'.
09-30 14:49:53.564 D/Mono    ( 1085): Probing 'SystemNative_Symlink'.
09-30 14:49:53.564 D/Mono    ( 1085): Found as 'SystemNative_Symlink'.
09-30 14:49:53.588 W/com.companyname.agentconnectmobile( 1085): type=1400 audit(0.0:4414): avc: denied { link } for comm=54687265616420506F6F6C20576F72 name="PropertyStore.forms.tmp" dev="dm-6" ino=77573 scontext=u:r:untrusted_app_27:s0:c6,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c6,c257,c512,c768 tclass=file permissive=0
09-30 14:49:53.597 D/Mono    ( 1085): DllImport searching in: 'libmono-native.so' ('./libmono-native.so').
09-30 14:49:53.598 D/Mono    ( 1085): Searching for 'SystemNative_CopyFile'.
09-30 14:49:53.598 D/Mono    ( 1085): Probing 'SystemNative_CopyFile'.
09-30 14:49:53.598 D/Mono    ( 1085): Found as 'SystemNative_CopyFile'.
**System.NullReferenceException:** 'Object reference not set to an instance of an object.'

This is my first Xamarin application so I'm not sure if I am supposed to be handling exit on Android somehow? I haven't seen this issue on iOS.

Firebase real time update

$
0
0
Hi all, as the title said I'm trying to implement an app that gets some data from firebase in real time and constantly gets updated. So my question is can I always update the app through firebase and also do this while the phone/tablet is with it's screen shut down? Or can I use the notification service to send a pop-up to the device? The ideea behind the app is that a customer places an order and in real time I want to illuminate a led using a Bluetooth signal.

iOS 13.0 Broke MasterDetailPage on iPads?

$
0
0

I have noticed that after updating iOS to v13.0, the MasterDetailPage is broken on iPads but it's still working on iPhones and Androids.
By broken I mean the whole page is white, without content.


The only way to fix this is to update Xamarin.Forms to the latest v4.2+.

The problem is that some other packages are not compatible (XF broke something else after v4.0) so I cannot update XF yet.
The App Store is rejecting my app because it shows a white screen on iPads with iOS 13.0+....so I would have to stop targeting iPads!

Try for yourself, here is a basic sample repo with MasterDetail page (the default Xamarin Forms template with MasterDetailPage).
https://github.com/stesvis/MasterDetailTest2

The same happens with Prism MasterDetailsPage:
https://github.com/stesvis/MasterDetailTest

  • iPhones: works
  • iPad -> iOS 12.2: works
  • iPad -> iOS 13.0: white screen

Any solution for this HUGE headache?

UseWindowSoftInputModeAdjust doesn't work with ScrollView

$
0
0

I'm using Xamarin.Forms v. 4.2.0.815419
In MainActivity added
Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);

And

WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.AdjustResize

However this does not work

Integrate OAuth2 in Xamarin with WEB API

$
0
0

Hello,

I posted this in "Libraries, Components, and Plugins" and I think that was wrong.
I apologize in advance for any dumb questions or if I'm posting in the wrong location, im new to this forum.

I have a question regarding the integration between OAuth2Authenticator and Web API.
So currently I have a standard ASP.Net Web API running and I use POST/GET/PUT/DELETE methods from my Xamarin mobileapp to register users, change users etc.

I've managed to, with 0Auth2Authenticator, get a working Google and Facebook authentication. I get a access_token in return and that token is used to get profile information, works like a charm.

My only problem is HOW do i save that information in my Web API so that I can know who has registrered through social media login? I understand that some people don't want to save that information anywhere, but I would like to so I can save their settings and their activity.

I Understand that I should be using the /api/Account/RegisterExternal url of the WebAPI, but there are only tutorials, documentation and guides for that using a web application. and in thoose cases they use the customized URL combination of your web api webpage (eg: h t t p : / / WEBSITE.COM/api/Account/ExternalLogin?provider=Google&response_type=token&client_id=self&redirect_uri=REDIRECT_URL&state=SOME_STRANGE_ID_FROM_WEB_API)

Please could someone guide me to any information?

/Esse

Dark Mode

$
0
0

Hello, there is a way to force my app to use light mode? when the iPhone use dark mode some of the controls (entry and navigation bars) turns black and made me interface a little fuzzy.

thx in advance

Point conversion and scaling

$
0
0

Our UI designer provides us the designs with the dimensions in points a iPhone XS device. Please advice on the following;

  • How can these dimensions be converted to points in Xamarin?
  • How to scale down (eg : font sizes) to small screens (eg: iPhone SE)?

Navigation between shell content

$
0
0

I have three pages in my shell (1,2,3). Page 2 is a list of item. Is it possible for me to click the item in page 2 to first go to page 1 and open a new page( page 4) with the passing of a parameters?

Can i convert my app to use Shell?

$
0
0
I have an app that uses MasterDetail page with a TabbedPage.

I am wondering if it can be converted to Shell, and i have a few questions:

- can Shell tabs use ContentPages?
- would it be compatible with Prism?

Thanks!

How to Integrate map in xamarin forms?

$
0
0

Hi All,
I am new to xamarin VS2017. I need to create a map based simple application which need to have autocomplete search places, pin point current location and user can change the location if wanted. i wanted it to be working for both android and iphone.
I got struck in beginning itself whether i can go with xamarin.forms.map (or) go with google map api. Plz suggets a better solution to me. I was googling for 3 days.

Common asset folder for both android and iOS in xamarin forms app

$
0
0

While going through the source code of Tailwind Traders app(Microsoft app for highlighting Xamarin forms 4.0 features) source code, I notched that they have used a common resource folder for both android and iOS asset. Anyone has any idea as to how that's done ?

Bug? Modal dialogs do NOT prevent the dialog hidden behind them from receiving Keyboard Input

$
0
0

Hi, I have been testing a Xamarin Forms application with an Android simulator (GenyMotion), and have noticed some disturbing behavior -

When using the PushModalAsync method to display a modal login dialog, I am using the PC keyboard's tab key to tab between the entry controls on the login dialog.

What is happening though is that controls on the parent page are receiving focus! When I have focus on one of the controls (user name entry) and press tab, it should go to the password entry control, but it is not! It is instead placing focus on a control on the hidden parent page. I can tell this because even though you cannot see the hidden control, if I enter some text, and then login, I can see the text I entered on the entry control on the parent page.

I appreciate that it may not be observed on actual devices, but its very disturbing that (even with a simulator) it is possible for controls on the parent dialog to receive focus when you are displaying a modal dialog.

Surely this is a bug, and should not be possible. Has anyone else seen this bug?

Viewing all 89864 articles
Browse latest View live


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