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

ContextAction Command from custom ViewCell

$
0
0

I have a custom ViewCell which gets selected by a Tempalte Selector.
Now i want that the Command from the ContextAction is executed in the corresponding page ViewModel,
but i don't now how to get the reference to MyPageName.

This is my custom ViewCell:

<?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
          xmlns:local="clr-namespace:MyApplication.Converters;assembly=MyApplication"
             x:Class="MyApplication.Pages.Custom.CustomCell">
    <ViewCell.ContextActions>
                                <MenuItem 
                                    Command="{Binding Path=BindingContext.OnSettingsCommand, Source={x:Reference Name=MyPageName}}"
                                    CommandParameter="{Binding .}"
                                    Icon="settings_white.png"
                                    Text="More"/>
                                <MenuItem 
                                    Command="{Binding Path=BindingContext.OnDeleteCommand, Source={x:Reference Name=MyPageName}}" 
                                    CommandParameter="{Binding .}"
                                    Icon="delete.png"
                                    IsDestructive="True"
                                    Text="Delete"/>
                            </ViewCell.ContextActions>
    <ViewCell.View>
        <StackLayout 
                                Orientation="Horizontal" 
                                Padding="10"
                                Spacing="10">
            <StackLayout.Resources>
                <ResourceDictionary>
                    <local:DateConverter x:Key="dateConverter"/>
                </ResourceDictionary>
            </StackLayout.Resources>
            <Image Source="{Binding Image}" />
            <StackLayout Orientation="Vertical" HorizontalOptions="StartAndExpand"
                                             VerticalOptions="Center">
                <Label 
                                            Text="{Binding Title}"  
                                            TextColor="{StaticResource Dark}"
                                            VerticalOptions="End"
                                            Font="Medium, Bold"/>

                <Label 
                                            Text="{Binding CreationDate, Converter={StaticResource dateConverter}}"  
                                            TextColor="{StaticResource grayDark}" 
                                            FontSize="Small" />
            </StackLayout>
            <StackLayout Orientation="Vertical" VerticalOptions="Center">
                <Image Source="{Binding ImageConnectionTypeStatus}"/>
                <Image Source="{Binding ImageSignalStrength}"/>
            </StackLayout>
            <Image Source="arrow_right.png"/>
        </StackLayout>
    </ViewCell.View>
</ViewCell>

Does anybody have an idea ?


Accessibility in XF

$
0
0

We have to stay in XF core 2.0.0 but I need to be able to have extra props on buttons, images, labels, etc... for the screen readers (talkback and voiceover) to read instead of the caption or text.
BTW, I'm new to Xamarin.
I've been reading up on bindable properties, but haven't found a tutorial/article that covers it completely.

Xamarin.Android does not support running the previous version while deploying solution- deploy fails

$
0
0

My Xamarin PCL project was working fine since I downloaded Android SDK Platform 27 and updated all NuGet packages.
When try to deploy solution to my device (running Android 7.1) I get this output error:

Build Failed: Xamarin.Android does not support running the previous version. Please ensure your solution builds before running or debugging it.

Build log when debugging this project:
2>Starting deploy Xiaomi Redmi 4A ...
2>Deploying Xiaomi Redmi 4A ...
2>Build started.
2>Project "MobileApp.Android.csproj" (Install target(s)):
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect.apk" "bin\Debug\\com.admir.instantcollect-Signed.apk"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect-arm64-v8a.apk" "bin\Debug\\com.admir.instantcollect-arm64-v8a-Signed.apk"
2>"zipalign.exe" exited with code 1.
2>Done building project "MobileApp.Android.csproj" -- FAILED.
2>Build FAILED.
2>Build started.
2>Project "MobileApp.Android.csproj" (Install target(s)):
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect.apk" "bin\Debug\\com.admir.instantcollect-Signed.apk"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\27.0.2\zipalign.exe 4 "C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\obj\Debug\android\bin\com.admir.instantcollect-arm64-v8a.apk" "bin\Debug\\com.admir.instantcollect-arm64-v8a-Signed.apk"
2>"zipalign.exe" exited with code 1.
2>Done building project "MobileApp.Android.csproj" -- FAILED.
2>Build FAILED.
2> 2>Deploy failed on Xiaomi Redmi 4A ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I have tried to build/clean-rebuild solution and it builds successfully. Here is the build output log:

1>------ Build started: Project: MobileApp.Android, Configuration: Debug Any CPU ------ 1> No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding </assemblyBinding> 1> MobileApp.Android -> C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\MobileApp\MobileApp.Android\bin\Debug\mobileapp.android.dll 1> No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. 1> No way to resolve conflict between "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" and "System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" arbitrarily. 1> No way to resolve conflict between "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. 1> Consider app.config remapping of assembly "mscorlib, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Xml, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Core, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.5.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Runtime.Serialization, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "6.0.0.0" [C:\Program Files\IIS\Microsoft Web Deploy V3\Newtonsoft.Json.dll] to Version "11.0.0.0" [C:\Users\DAFPC\documents\visual studio 2017\Projects\MobileApp\packages\Newtonsoft.Json.11.0.2\lib\netstandard2.0\Newtonsoft.Json.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Xml.Linq, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "3.5.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll] to Version "4.0.0.0" [] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2245,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding ...</assemblyBinding> ========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

  • I have set the Target framework to Android 8.1 latest platform.
  • Target Android version: Use compile using SDK version.
  • Minimum Android version: Android 4.4.

I have tried to change the target platform to 7.1 but the situation gets even worse
I get the same error when using any AVD emulator.
Could anyone explain me why do i get this error, and what can I do to solve it.

Show image from /var/mobile/Containers/Data/Application/.... path

$
0
0

I am trying to show the image from this location

/var/mobile/Containers/Data/Application/B78AC09D-DFB1-4D10-9F27-07C26D2B838C/Documents/Sample/sudhir_1.jpg

below is my code:

            Image img1 = new Image(); 
            img1.Source = ImageSource.FromFile("/var/mobile/Containers/Data/Application/B78AC09D-DFB1-4D10-9F27-07C26D2B838C/Documents/Sample/sudhir_1.jpg");
          //  img.Source = ImageSource.FromResource("/var/mobile/Containers/Data/Application/B78AC09D-DFB1-4D10-9F27-07C26D2B838C/Documents/Sample/sudhir_1.jpg");

I tried both options FromFile and FromResource, but nothing worked, but when I moved the image to app/resource folder or trying to access the image from the web-url it showing fine without any issue.

Any ideas how to show the image file from the local physical path (e.g. /var/mobile/Containers/Data/Application/B78AC09D-DFB1-4D10-9F27-07C26D2B838C/Documents/Sample/sudhir_1.jpg )

Thanks

Shell, load all tabbed pages at once. Forms 4

$
0
0

I'm using the prerelease of Xamarin Forms 4, and am trying out App Shell.

I have my pages setup like this for bottom tab navigation:

    <ShellItem>
        <ShellSection Title="Stats" Icon="tab_feed.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.StatsPage}" />
        </ShellSection>
        <ShellSection Title="Upcoming" Icon="tab_about.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.UpcomingPage}" />
        </ShellSection>
        <ShellSection Title="By Month" Icon="tab_about.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.ByMonthPage}" />
        </ShellSection>
        <ShellSection Title="By Community" Icon="tab_about.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.StatsPage}" />
        </ShellSection>
        <ShellSection Title="Recent" Icon="tab_about.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.StatsPage}" />
        </ShellSection>
    </ShellItem>

My issue is, each page is loaded after you click on the tab, and then also reloads when going back to the tab. I'm hoping to somehow load all of these pages at once and just switch between them, the same way TabbedPage works. Is there any way to do this with AppShell?

Thanks

Reproduce carousel view behaviour/animation/transition to a horizontal scroll view.

$
0
0

Hey developers,
I have so far tried to use a carousel view due to its ease of use and of course its performance. But I tried to show the tail of each UI elements (let's say we've a bunch of cards) whatever the position is as shown in the picture. I've googled a lot and posted another question in this forum but since then I changed the project UI a little bit so I ignored the given solution and now I am on my own again, I resolved it (show the next card's tail or/and the previous), I'll write down the structure I used in XAML but first let me highlight my requirements.
I want to reproduce the behaviour, animation/transition on swiping of the carousel view to my view, because I am actually using a horizontal scroll view with a Flex layout inside.
Here is the structure :

Now I've tried two options :
1- Use of Scrolled event in the scroll view but that hasn't been a great option because it fire the events (animation or transition) after the scroll is done, in my case it should fire the event since scrolling started.
2- Use of SwipeGestureRecognizer on Scrollview, FlexLayout and BoxView : couldn't get a stable behaviour on the 2 first attempts but when I used a BoxView I couldn't get each StackLayout (the StackLayout is my card) inside the BoxView (It wasn't built for that).

Here is my UI after I used a horizontal scroll view :

here is the behaviour I wanted to reproduce to my view :
https://media.giphy.com/media/l0NwH3XDSYhQ6l4TC/giphy.gif

CSharp.Core.Targets error after upgrade

$
0
0

I was wondering whether anyone else had experienced this problem since upgrading VS Mac to 7.6 (Build 2190)?

One of my long-standing projects now fails to compile for iOS, giving the following error:

Microsoft.CSharp.Core.targets(5,5): Error: System.ComponentModel.Win32Exception (0x80004005): ApplicationName='mcs.exe', CommandLine=' /noconfig @"/var/folders/6q/ffh5pvbn6893pr9k07k_lfh40000gn/T/tmpb5a5800afc524eb08fc930d8d554803d.rsp"', CurrentDirectory='', Native error= Cannot find the specified file

I've done the usual stuff like cleaning out the Obj and Bin directories and uninstalling and reinstalling VS. It clearly looks like this package is failing because it can't find a file, but I'm unsure how to fix it?

Any suggestions on how to fix?

Timer multiple call

$
0
0

Hi :)
I'm facing a problem with timer. I tried to make a countdown (from 60s to zero) and everything works fine when I first call the method, but when I call it second time, it goes twice as fast and so on... How to fix it?
method Casomira simply means Countdown
Here is my code:

This didn't work: timer set to null, timer autoreset...
tried to find it everywhere


How to tell if android app is in the background or foreground

$
0
0

How can I detect if my Android app is in the background or foreground please?

This is to only send push notification when the application is in the background. I need to perform this check in :

public class MyFirebaseMessagingService : FirebaseMessagingService

Shell - Add page with constructor argument

$
0
0

I'm trying to use the new Shell for Forms 4.0

I have some pages that I would have added in the past like this new GenericPage("link");

Is there a way I can do that with Shell in xaml?

This is what I have now:

    <ShellItem x:Name="RepSpotlight">
        <ShellSection Title="Stats" Icon="tab_feed.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.StatsPage}" />
        </ShellSection>
        <ShellSection Title="Upcoming" Icon="tab_about.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.UpcomingPage}"  />
        </ShellSection>
        <ShellSection Title="By Month" Icon="tab_about.png">
            <ShellContent ContentTemplate="{DataTemplate local:Spotlight.ByMonthPage}" />
        </ShellSection>
    </ShellItem>

I'd love to be able to do something like this:

<ShellSection Title="Stats" Icon="tab_feed.png">
<ShellContent ContentTemplate="{DataTemplate local:Spotlight.GenericPage("stats")}" />
</ShellSection>

Or maybe something like:

<ShellSection Title="Stats" Icon="tab_feed.png">
<ShellContent ContentTemplate="{DataTemplate local:Spotlight.GenericPage}" parameter="stats" />
</ShellSection>

Is anything similar to this possible? How would I go about doing it?

Thanks!

run adb as root by Visual Studio

$
0
0

I have a problem to debug my application because I can't run adb as root by Visual Studio.

My application does some stuffs when the device boot, by a BroadcastReceiver on Android.Content.Intent.ActionBootCompleted.
I want to test what happens without reboot the device.
I know I can use the following command:
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED
But it works only if I start asb server by root.
When I start adb by Visual Studio, running my application, it starts by normal user.
If a restart adb in root mode, by the command "adb root", Visual Studio detach from the device, and I can't debug my application.

How can I run adb as root with Visual Studio, to debug my application when a BroadcastReceiver on Android.Content.Intent.ActionBootCompleted happens?

Thanks

Consume System.Drawing.Common package in Xamarin Android app?

$
0
0

My rendering code is now ported to .Net Standard 2.0 assemblies for portability.
Next step is to consume said assemblies in a Xamarin Android app.

However I do not seem to be able to consume for example the System.Drawing.Graphics type in my Xamarin code, even though I have added a reference to the System.Drawing.Common package.

Am I attempting the impossible? Must anything System.Drawing.Common be completely encapsulated in my .NET Standard assemblies? Or is there a viable workaround?

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

Resource Dictionary for UWP/macOS and fonts

$
0
0

Hi guys,
I want to use a custom font for my app. I copied the font files in:

  • iOS: under Resources - Build Action BundleResource / Copy to Output Directory: Do not copy
  • Android: under Assets - Build Action Androd Asset / Copy to Output Directory: Do not copy
  • UWP: under Assets/Fonts - Build Action Content / Copy to Output Directory: Do not copy

I have two problems here. First is the UWP error:

Position 11:25. No property, bindable property, or event found for 'UWP', or mismatching type between value and property

The second is how to show my custom font.

Visual Studio 2017

My Xamarin.Forms version is 3.4.0.1029999

Hybrid app built with XamForms, accepted on iTunes Store

$
0
0

Just FYI really. We had a AngularJS based web app, the whole SPA deal. We packaged it up using Xamarin.Forms using a WebView with a custom renderer for the web view for both iOS and Android (customer hasn't requested WinPhone yet). The iOS renderer was very very easy. The Android renderer was 20x the work because the HTML tag that we use for allowing file uploads is severely broken on Android and they only fixed it in Lollipop. Even PhoneGap still hasn't come up with a workaround for that. We managed to get it working using a JavaScript callback interface into our custom renderer and some other bespoke code.

Anyway, this app got accepted on both app stores. Surprised me. This app doesn't even pretend to look like a true iOS native app either.


How to subscribe an event without setting Control.Delegate to null in a Xamarin.iOS custom renderer

$
0
0

I need to extend the Xamarin.Forms ListView to have an async method for scroll the list view to top. Create a control and the custom renderer to subscribe the scrolling ended event inside the OnElementchanged override.

Major code:
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ListView> e)
{
...
//Without settings Delegate to null, I am getting "Event registration is overwriting existing delegate..." error

Control.Delegate = null;

//Below line is actually override the Delegate, and cause some problems (for example the Grouping for the list view is not working )
Control.ScrollAnimationEnded += OnScrolledToTop;
...

}

My questions is how should I do in the custom renderer without setting Control.Delegate to null in this Xamarin.iOS custom renderer?

Many thanks.
Kevin Hu

How long do I need to wait before placing links in forum a post?

$
0
0

I get this message when trying to submit a post: "You have to be around for a little while longer before you can post links."

UWP crashing after latest vs2017 update

$
0
0

After updating to the latest release of VS2017 I keep getting an error when I try to debug my UWP XF applications with an error saying "Unable to activate Windows Store app ……. The …..exe process started but the activation request failed with error 'Operation not supported. Unknown error: 0x80040904'.

I have another computer with the version prior to latest and it can build and run my projects with no issue.

Manual clean builds have not fixed the issue.

Side loading release builds do build but won't install properly.

A new vanilla uwp project builds fine.

The XF version is 3.4.0.1029999

A brand new XF project also has no issues.

how to add user's location marker on custom map

$
0
0

Hellow! How to add user's location marker on my custom map?

I have made my map by the toutorial

docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/map/customized-pin

It's work correctily with my custom pin, but the property
IsShowingUser=true
doesn't work

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.!

Viewing all 204402 articles
Browse latest View live


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