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

Why do I get a GenerateResourceSource task failed unexpectedly?

$
0
0

I'am using VS 2015 with Xarmin as an extension
and I'am using Xarmin.Forms shared for my apps.

Anytime I trying running the code on my phone i get this

Severity Code Description Project File Line Suppression State
Error The "GenerateResourceDesigner" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'App2iOS.exe, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'App2iOS.exe.dll'
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(String fullName, ReaderParameters parameters)
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(String fullName)
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.GetAssembly(String fileName)
at Xamarin.Android.Tasks.GenerateResourceDesigner.c__AnonStorey0.<>m__0(String ass)
at System.Linq.Enumerable.WhereSelectListIterator

2.MoveNext()
   at Xamarin.Android.Tasks.ResourceDesignerImportGenerator.CreateImportMethods(IEnumerable
1 libraries)
at Xamarin.Android.Tasks.GenerateResourceDesigner.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() App2.Droid

I don't quite get why App2.Droid is referencing the App2IOS.exe.dll or why thier connected. The two projects aren't being referenced to each so I don't quite get it. I've tried deleting my obj folders and my bin folders for both projects but I still get this error.

Thank you in Advance!


[SQLiteNET] Database not returning any items (.Count).

$
0
0

Hi guys,

I've got an issue where I've been following the guide on working with a local database, as well as the associated repo.

I've managed to connect to the database and add items to it, but it would seem as if the list that I'm returning from the database always has a count of 0.

As mentioned the database adds items just fine. In the following snippet I'm adding the result of a HTTP Get-request in the form of a deserialized JSONarray (currently a List<Foundation>):

        protected override async void OnAppearing()
        {
                base.OnAppearing();
                App.Database.Tester();
                var result = await App.Database.GetItemsAsync();
                Debug.WriteLine("Debugger: " + result.Count);
                ListView lv = lvResults;
                // Reset the 'resume' id, since we just want to re-start here
                lvResults.ItemsSource = result;
        }

Sorry for the ugly code. As mentioned above the count is always 0. Even if I've run through saving all the items:

            var result = await GetAllFoundationsAsync();

            for (var i = 0; i < result.Count; i++)
            {
         Debug.WriteLine(result[i].ToString()); //overridden, so shows a few values of each foundation in a pretty-string.
                 await App.Database.SaveItemAsync(result[i]);
            }

after which I can see that the output shows me each individual result and add it to the database with no visible error.

After having added all the items I then see if the code in onAppearing() will give me anything; but it still does nothing. So I've stepped through the code both from a default perspective (without saving anything before-hand) and after having saved them to the database.

Below you will see my database and object-classes. Before that I want to mention that I've stepped through the whole project and have not encountered any issues; the breakpoints get invoked in both onAppearing and in the database-class (both in the SaveItemsAsync and in GetItemsAsync), but either the database is truly empty, or I'm doing something wrong somewhere else...

This is the foundation class:

using System;
using SQLite;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;

namespace App3
{
    public class Foundation
    {
        [PrimaryKey, AutoIncrement]
        public int? ID { get; set; }
        public int? FoundationID { get; set; }
        public String TrackUnit { get; set; }
        public String TrackLocation { get; set; }
        public Decimal? PlannedNorthing { get; set; }
        public Decimal? PlannedEasting { get; set; }
        public Decimal? PlannedRecos { get; set; }
        public Decimal? PlannedBearing { get; set; }
        public Decimal? PlannedLevel { get; set; }
        public Decimal? PlannedOverallDepth { get; set; }
        public String PlannedExcavationDim { get; set; }
        public Decimal? ActualNorthing { get; set; }
        public Decimal? ActualEasting { get; set; }
        public Decimal? ActualRecos { get; set; }
        public Decimal? ActualBearing { get; set; }
        public Decimal? ActualLevel { get; set; }
        public Decimal? ActualOveralDepth { get; set; }
        public String ActualExcavationDim { get; set; }
        public Decimal? WaterTableLevel { get; set; }
        public Decimal? BoltProjection { get; set; }
        public Decimal? NonEffectiveDepth { get; set; }
        public Boolean? Orienation { get; set; }
        public Boolean? ReBarCorrectlyInstalled { get; set; }
        public DateTime? InstallationDate { get; set; }
        public String PermitToDigIssued { get; set; }
        public String TestCubeReference { get; set; }
        public Boolean? FoundationAcceptable { get; set; }
        public String Comments { get; set; }
        public Decimal? ActualOverallDepthMiniPile1 { get; set; }
        public Decimal? ActualOverallDepthMiniPile2 { get; set; }
        public Decimal? ActualOverallDepthMiniPile3 { get; set; }
        public Decimal? ActualOverallDepthMiniPile4 { get; set; }
        public Decimal? ActualOverallDepthMiniPile5 { get; set; }
        public Decimal? ActualOverallDepthMiniPile6 { get; set; }
        public Boolean? AllocationOfBinders { get; set; }
        public Boolean? ConfirmMiniPile1Dimension { get; set; }
        public Boolean? ConfirmMiniPile2Dimension { get; set; }
        public Boolean? ConfirmMiniPile3Dimension { get; set; }
        public Boolean? ConfirmMiniPile4Dimension { get; set; }
        public Boolean? ConfirmMiniPile5Dimension { get; set; }
        public Boolean? ConfirmMiniPile6Dimension { get; set; }
        public int? ExcavationType { get; set; }
        public Boolean? OrientationAlongTrack { get; set; }
        public Boolean? OrientationPerpendicular { get; set; }
        public int? PileHeadHits { get; set; }
        public Boolean? ShutterRemovalAcceptable { get; set; }
        public Boolean? WorksCompletionAccetable { get; set; }
        public String AllocationsList { get; set; }
        public String AllocatedList { get; set; }
        public String Chainage { get; set; }
        public String StructureNo { get; set; }
        public int? StructureNoID { get; set; }
        public int? WireRunID { get; set; }
        public String EngineerName { get; set; }
        public Byte[] EngineerSignature { get; set; }
        public DateTime? EngineerDate { get; set; }
        public String SupervisorName { get; set; }
        public Byte[] SupervisorImage { get; set; }
        public DateTime? SupervisorDate { get; set; }
        public DateTime? BaseLineInstallationDate { get; set; }
        public DateTime? PlannedInstallationDate { get; set; }
        public int? ActualAllocationID { get; set; }
        public Decimal? PlannedBoltProjection { get; set; }
        public int? PlannedAllocationID { get; set; }
        public Decimal? PlannedEffectiveDepth { get; set; }
        public Decimal? PlannedNonEffectiveDepth { get; set; }
        public Byte[] BoltOrientationSignOff { get; set; }
        public Byte[] ReBarSignOff { get; set; }
        public Byte[] ConstructionMgrSignOff { get; set; }
        public Boolean? WorkSiteTidy { get; set; }
        public Boolean? OutstandingWorks { get; set; }
        public Boolean? RedesignRequired { get; set; }
        public String RedesignComments { get; set; }
        public int? MapToID { get; set; }
        public int? MappingTypeID { get; set; }
        public Decimal? PlannedTopOfRailLevel { get; set; }
        public Decimal? ActualTopOfRailLevel { get; set; }
        public Decimal? PlannedOverallPileLength { get; set; }
        public Decimal? ActualOverallPileLength { get; set; }
        public Decimal? PlannedNoOfSections { get; set; }
        public Decimal? ActualNoOfSections { get; set; }
        public Byte[] RedesignSignOff { get; set; }
        public String Finalcomments { get; set; }
        public Boolean? NcrRaised { get; set; }
        public String NcrComments { get; set; }
        public int? Version { get; set; }
        public DateTime? Created { get; set; }
        public String CreatedBy { get; set; }
        public int? OLEStatusLKID { get; set; }
        public int? OriginalID { get; set; }
        public String TypeDescription { get; set; }
        public int? SortOrder { get; set; }
        public Boolean? WPPComplete { get; set; }
        public Boolean? SettingOutComplete { get; set; }
        public Boolean? BuriedServicesComplete { get; set; }
        public Boolean? TrialHoleComplete { get; set; }
        public Boolean? AFCComplete { get; set; }
        public Boolean? NoOpenTQ { get; set; }
        public String ColorCode { get; set; }
        public String DrawingRevision { get; set; }
        public String AllocationRevision { get; set; }
        public Decimal? PlannedElevation { get; set; }
        public Decimal? ActualElevation { get; set; }
        public Decimal? PileDiameter { get; set; }
        public Decimal? BoomLength { get; set; }
        public String Revision { get; set; }
        public Decimal? PileElevation { get; set; }
        public Decimal? RailElevation { get; set; }
        public Decimal? RailOffset { get; set; }
        public Decimal? TrackLevel { get; set; }
        public Decimal? TroughLevel { get; set; }
        public Decimal? GroundLevel { get; set; }
        public Decimal? SettingOutRECOS { get; set; }
        public Decimal? DistanceFromTrough { get; set; }
        public String Topography { get; set; }
        public String DeVeg { get; set; }
        public String Obstruction { get; set; }
        public String BuriedServiceComments { get; set; }
        public Boolean? StatusComplete { get; set; }
        public Decimal? FrontFaceProtrusion { get; set; }
        public Decimal? RearFaceProtrusion { get; set; }
        public Decimal? RotationA { get; set; }
        public Decimal? RotationB { get; set; }
        public Decimal? ActualBoomLength { get; set; }
        public Decimal? ActualPileDiameter { get; set; }
        public String TQNumber { get; set; }
        public int? ConstructionStatusID { get; set; }
        public String ConstructionStatusDescription { get; set; }
        public Decimal? SettingOutEasting { get; set; }
        public Decimal? SettingOutNorthing { get; set; }
        public int? PackNoID { get; set; }
        public String PackNo { get; set; }
        public String AllocationCode { get; set; }
        public String Road { get; set; }
        public String Kilometerage { get; set; }
        public Decimal? Mileage { get; set; }
        public Decimal? Yards { get; set; }
        public String ExcavationTypeDescr { get; set; }
        public int? OLEStructureNoMapID { get; set; }

        public string Summary
        {

            get {
                Debug.WriteLine("Getting Summary");
                return String.Format("Id: {0}, Added by {1}", ID, EngineerName);}
        }

        public override string ToString()
        {
            var out_string = string.Format("ID: {0},@Engineer Name: {1},@Signature: {2},@Date: {3}", ID, EngineerName, EngineerSignature, EngineerDate);
            out_string.Replace("@", Environment.NewLine);
            return out_string;
        }
    }

    public class FoundationObject
    {
        public Foundation[] foundations { get; set; }
    }
}

And this is the database-class:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    using System.Threading.Tasks;
    using SQLite;

    namespace App3
    {
        public class FoundationsDatabase
        {

            readonly SQLiteAsyncConnection db;

            public FoundationsDatabase(string dbPath)
            {
                db = new SQLiteAsyncConnection(dbPath);
                db.CreateTableAsync<Foundation>().Wait();
            }

            public Task<List<Foundation>> GetItemsAsync()
            {
                var data = db.Table<Foundation>().ToListAsync();
                Debug.WriteLine("DATA: " + data);
                return db.Table<Foundation>().ToListAsync();
            }

            public void Tester()
            {
                Debug.WriteLine("QUERY: " + db.QueryAsync<Foundation>("SELECT * FROM [Foundation]"));
            }

            public Task<List<Foundation>> GetItemsAsync(int id)
            {

                return db.Table<Foundation>().Where(i => i.ID == id).ToListAsync();

            }

            public Task<int> SaveItemAsync(Foundation item)
            {
                if (item.ID != 0){
                    return db.UpdateAsync(item);
                } else{
                    return db.InsertAsync(item);
                }
            }

            public Task<int> DeleteItemAsync(Foundation item){
                return db.DeleteAsync(item);
            }
        }
    }

CachedImage FFImageLoading for Xamarin.Forms

$
0
0

https://github.com/molinch/FFImageLoading or https://github.com/daniel-luberda/FFImageLoading/ (new Forms features)

DEMO: https://github.com/daniel-luberda/FFImageLoading/tree/master/samples/ImageLoading.Forms.Sample

Caching support

The library automatically deduplicates similar requests: if 100 similar requests arrive at same time then one real loading will be performed while 99 others will wait. When the 1st real read is done then the 99 waiters will get the image.

Both a memory cache and a disk cache are present.

By default, on Android, images are loaded without transparency channel. This allows saving 50% of memory since 1 pixel uses 2 bytes instead of 4 bytes in RGBA (it can be changed).

WebP support

WebP is supported on both iOS and Android.

Downsampling

Downloaded images can be automatically downsampled to specified size (less memory usage). DownsampleHeight and DownsampleWidth properties

Retry

Downloads can be repeated if not succeeded: RetryCount and RetryDelay properties.

Placeholders support

  • LoadingPlaceholder

  • ErrorPlaceholder

image image

After this pull it'll also support Transformations!
https://github.com/molinch/FFImageLoading/pull/47

Transformations support

It doesn't modify original source images. Example:

  • RoundedTransformation

  • CircleTransformation

  • GrayscaleTransformation

image image

... and some more features. Feel free to test it. Not all features are on nuget yet (older version).

How to bind a Command to ListView.ItemTapped

$
0
0

Hi,

I did quite some googling now but did not find an answer. How do I bind a Command to the ItemTapped event of a ListView in Xaml?

Best
Thomas

Forms Android Bug

$
0
0

Hey guys!

I'm having a really bad time with a bug that only affects android.

I have a ListView, the cells within the listview is a custom viewCell. The ViewCell has a label and an entry.

When I focus the entry i'm specting to see only once, but after shifting the focus over the entries things get werid and for example:

for the very first time, If I focus the third element, I see that the third element is focused but if i switch to another entry, lets say the fifth element, the log output is

    [0:] Focused ->3 //very first time
    09-27 09:56:18.335 W/EGL_emulation(17852): eglSurfaceAttrib not implemented
    09-27 09:56:18.335 W/OpenGLRenderer(17852): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9a99d4a0, error=EGL_SUCCESS
    09-27 09:56:20.542 E/Surface (17852): getSlotFromBufferLocked: unknown buffer: 0xaee74e20
    [0:] Unfocused ->3 //switching to fifth element
    [0:] Focused ->5
    [0:] Unfocused ->5
    [0:] Focused ->3
    [0:] Unfocused ->3
    [0:] Focused ->5
    09-27 09:56:20.586 W/EGL_emulation(17852): eglSurfaceAttrib not implemented
    09-27 09:56:20.586 W/OpenGLRenderer(17852): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9a7dc020, error=EGL_SUCCESS
    [0:] Unfocused ->5
    [0:] Focused ->3
    [0:] Unfocused ->3
    [0:] Focused ->5

Why is that happening?

I created a demo here

Any ideas people?

App crashing on Windows Phone when deplyed in Release mode

$
0
0

Hi,

We have developed a Xamarin Forms app supporting Android, iOS and Windows Phone. The app is working on all three OS when deployed in Debug mode. It's also working on Android and iOS when deployed in Release mode. It crashes immediately after displaying Splash screen on Windows Phone 8.1/10 when deployed with Release mode but strangely all works fine when deployed using Debug mode.

Any idea from experts here?
Is there any way to get see the app log to diagnose the crash reason?

Thank you,
Deepak Sakpal

Appearance in the iOS part of a Xamarin.Forms app

$
0
0

I'm trying to set the styling of an iOS app built in Xamarin.Forms. I would like to test out iOS styling. I have the code below. My button has a green background, but I can't get the text color of the buttons to be red. I'm just trying to test out if this work, and it doesn't seem to inspite of

https://developer.xamarin.com/guides/xamarin-forms/platform-features/ios/theme/#uiappearance

    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
    UIButton.Appearance.BackgroundColor = UIColor.Green;
    UIButton.Appearance.TintColor = UIColor.Red;
    UIButton.Appearance.SetTitleColor(UIColor.Red, UIControlState.Normal);

        global::Xamarin.Forms.Forms.Init();
        LoadApplication(new App());
    return base.FinishedLaunching(app, options);
    }

Any ideas on this are appreciated. Thanks!

Switch in UWP

$
0
0

I am adding an UWP project into xamarin.Forms.

I found that the switch is different from that in iOS and Android. There is a text like "On" or "Off" behind the control.

How to hide that?


Editor Effect app keeps crashing

$
0
0

Hello,

I've created an effect to set the background and text colors in a XF editor control. But everytime I try to use it, the app just crash on startup, running XF stable 2.3.3.180.

The effect looks like this (iOS):
`public class EditorColorEffect : PlatformEffect
{

    protected override void OnAttached ()
    {

        ((UITextView)Control).BackgroundColor = UIColor.LightGray;
        ((UITextView)Control).TextColor = UIColor.DarkGray;
    }

    protected override void OnDetached ()
    {

    }
}`

AppCompat does not resize screen with keyboard.

$
0
0

Given a simple ContentPage with an Editor at the bottom and a list as the first item (Stack with list and Editor), I cannot get the page to be the correct size.

I can put the stack into a scrollview or not, with the Android option AdjustResize set or not, and anyway I do it, the screen pushes the Toolbar or Tabs off the top, unable to be seen.

This does not happen when using FormsApplicationActivity, just the FormsAppCompatActivity.

Any ideas on how to get a user interface that is similar to how traditional chat applications look? Sample project included.

Xamarin Forms - Bluetooth (Acr.Ble) issue with scanning progress

$
0
0

I have a Portable solution where the code for Blutooth runs (no MVVM yet) and am using ACR.BLE component for this

When i start the scan process, the IAdapter.IsScanning property is always false.
I have tried it with the bluetooth device paired and unpaired

namespace Xam.Ble.Test1
{
    public partial class MainPage : ContentPage
    {
        private List<IDevice> bleDevices, Devices;
        private IDisposable conn;
        private PermissionStatus mPermissionStatus;
        private IAdapter adapter;


        public MainPage()
        {
            InitializeComponent();
            bleDevices = new List<IDevice>();
            Devices = new List<IDevice>();

            this.adapter = BleAdapter.Current;

            this.LblMessage.Text = this.adapter.Status.ToString();

            this.ScanDevicesAsync();
        }

        private void ScanDevicesAsync()
        {
            this.adapter.WhenStatusChanged().Subscribe(status =>
            {
                this.LblSubscription.Text = this.adapter.Status.ToString();
            });
            this.adapter.WhenScanningStatusChanged().Subscribe(scan =>
            {
                this.LblMessage.Text = "Scanning: " + scan.ToString();
            });

            if (this.mPermissionStatus != PermissionStatus.Granted)
            {
                this.GetPermissionAsync();
            }

            if (this.mPermissionStatus != PermissionStatus.Granted)
            {
                this.LblPermission.Text = "Permission issue";
            }
            else if(this.mPermissionStatus == PermissionStatus.Granted)
            {
                this.DoScanDevices();
            }
        }

        private async void ButtonConnect_Clicked(object sender, EventArgs e)
        {
            //Vibrate this first
            CrossVibrate.Current.Vibration(100);

            //Bluetooth via
            // https://github.com/aritchie/bluetoothle

            if (this.mPermissionStatus != PermissionStatus.Granted)
            {
                this.GetPermissionAsync();
            }
            if (this.mPermissionStatus != PermissionStatus.Granted)
            {
                await DisplayAlert("Location Denied", "Can not continue, try again.", "OK");
                return;
            }

            if(this.adapter.IsScanning == false)
            {
                // this.adapter.IsScanning is always false
                this.LblMessage.Text = "Not Scanning";
                conn = this.adapter.Scan()
                                .Subscribe(scanResult =>
                                {
                                    bleDevices.Add(scanResult.Device);
                                    this.LblMessage.Text = "Devices found: " + this.bleDevices.Count().ToString();
                                });

            }
            else
            {
                this.LblMessage.Text = "Scanning in progress...";
            }
        }

        private void ButtonDisConnect_Clicked(object sender, EventArgs e)
        {
            if (conn != null)
                conn.Dispose();
        }

        private void ButtonLEDOnOff_Clicked(object sender, EventArgs e)
        {
            //Nothing
        }

        private async void GetPermissionAsync()
        {
            if(this.mPermissionStatus != PermissionStatus.Granted)
            {
                if (await CrossPermissions.Current.ShouldShowRequestPermissionRationaleAsync(Permission.Location))
                {
                    await DisplayAlert("Need location", "Gunna need that location", "OK");
                }
                AskLocationPermissionAsync();
            }
        }
        private async void AskLocationPermissionAsync()
        {
            var results = await CrossPermissions.Current.RequestPermissionsAsync(Permission.Location);
            mPermissionStatus = results[Permission.Location];
        }

        private void DoScanDevices()
        {
            conn = this.adapter.Scan().Subscribe(scanResult =>
            {
                Devices.Add(scanResult.Device);
                this.LblAdditional.Text = "Device found: " + scanResult.Device.Name;
            });
        // adding a breakpoint here shows that the adapter.IsScanning = false
        }
    }
}

The application never returns any devices and nothing happens. Ive set the permissions on the Android side of the application
compiling for Android API Level 23
Have i missed anything else here?

Xamarin.Forms Feature Roadmap

$
0
0

This roadmap outlines our anticipated feature releases.

Are there things you don't see here that you feel strongly deserve a spot? Make your voice heard and open a proposal on the Xamarin.Forms Evolution forum.

Primary Focus

Quality is top of the list. This means stability and performance first and foremost. Xamarin.Forms has been swiftly adopted as a preferred tool for delivering production apps in addition to rapid prototypes. Our focus and priorities are to support the Xamarin.Forms community in those areas. In the release schedule below, we've highlighted how and where we are making those investments.

A Note About Bugs

As this thread is primarily about the feature roadmap, we anticipate the important question "what about ___ bug"?! Improving quality by addressing bugs is huge priority and ongoing focus for the team, in addition to improve our communication across the board.

Disclaimer

We cannot predict the future and how everything will shake out. Things will change. Timing may be adjusted due to priority changes, in pursuit of quality standards, or any number of other really good reasons that we will strive to proactively and openly communicate.

The Features Roadmap

Milestone Release Date
2.3.3 December 2016
2.4.0 February 2017
2.5.0 May 2017

2.3.3 - December 2016

Native View Declaration - Feature
Native view declaration allows you to add bindable iOS, Android, and Windows views directly to XAML. Rather than having to write a custom renderer, you can simply add the control directly to XAML with no additional configuration. This not only works with stock platform controls, but custom controls as well.

Platform-Specifics - Feature
Platform-specifics allow you to take advantage of native functionality that is only available on select platforms that Xamarin.Forms targets from shared code.

UWP Blur Support (3rd party nuget) - Feature
Adds the UWP blur platform-specific.

2.4.0 - February 2017

Bindable Picker - Feature
Adds data binding to the Picker control, specifically the following properties:

  • ItemSource

  • SelectedItem

https://github.com/xamarin/Xamarin.Forms/pull/515

Accessibility (A11y) Support - Feature
Proposal
Adds accessibility support to Xamarin.Forms by exposing the underlying accessibility features on iOS, Android, and Windows 10.

CarouselView v1 Stable - Feature
CarouselView was introduced at Xamarin Evolve 2016 and has been in prerelease ever since. v1 brings stability and performance improvements.

Xamarin.Forms for macOS Preview - Feature
Xamarin.Forms is coming to macOS, joining iOS, Android, Windows, and Tizen as target platforms for Xamarin.Forms.

Fast Renderers - Performance
Optimize built-in and custom view renderers to streamline view creation and improve performance.

Startup Time Improvements - Performance
Improve the startup and initialization time for Xamarin.Forms apps.

Compiled Native Views - Enhancement, Performance
Bring native view declaration to XAMLC, so users don't have to opt-out of XAMLC in PCLs where pages use native view declaration.

OnIdiom Support for Desktop (UWP) - Enhancement
Developers have lots of options when it comes to configurability based on operating system (Android, iOS, UWP, etc.), version (9, 10, etc.), and idiom (mobile or tablet). This adds Desktop as an OnIdiom for UWP developers.

https://github.com/xamarin/Xamarin.Forms/pull/420

XAMLC Enhancements - Enhancement, Performance
Approaching full support for currently supported XAML features. Compile time support for all value providers.

Deprecation of iOS 6/7

Deprecation of WP8

2.5.0 - May 2017

Xamarin.Forms Embedding - Feature
Embed Xamarin.Forms into a native Xamarin.iOS, Xamarin.Android, or Windows 10 app.

Xamarin.Forms for macOS - Feature
Xamarin.Forms is coming to macOS, joining iOS, Android, Windows, and Tizen as target platforms for Xamarin.Forms.

MenuPage - Feature
Alternative to the MasterDetail page, but rendered as a platform-specific menu that makes creating flyouts easy.

Cut down on GPU overdraw for Android - Performance
Try to avoid overdraw on Android where possible to improve performance.

Reduce native views created - Performance
Cut down on backing native views created for Xamarin.Forms, as noted by Miguel in #42948.

Layout Compression - Performance
LayoutCompression allows multiple layers of Xamarin.Forms layouts to be packed into a single native one.

Prism-Like URI Navigation Routing - Enhancement
Navigate to a page using Uri navigation, similar to what Prism does.

NavigationService.NavigateAsync("ListPage/DetailPage?id=1");

Single DLL - Enhancement
Ship Xamarin.Forms as a single DLL to improve startup performance and assist the linker.

Open Source Contributions

As noted above, the Xamarin.Forms Evolution forum is the place to start.

Has anyone made a Picker with bindable items?

$
0
0

Has anyone extended the Picker control to expose a Bindable property ItemSource that when set, goes and adds the items to the Items property?

Is it that simple or am I being naive?

Has anyone managed to do this?

(PS. why isn't this is the framework yet, every time I have to add the items in code behind a little part of me dies)

Visual Studio 2015 Community - How to Upgrade XForms From 2.0.... to 2.3.3....

$
0
0

Hi there!
Is there a step by step tutorial about how to upgrade Xamarin Forms to 2.3.3. release?

Many thank for any kind of help.

Best regards,
Ciro.

Xamarin Forms and Estimote SDK?


Is there a security vulnerability in the Xamarin account store?

$
0
0

In Android, the AccountStore class is inherited by the concrete class AndroidAccountStore. In the reflected code, the implementation in all projects contains the line:

`private static readonly char[] Password = "<Redacted>".ToCharArray();`

I believe this means that any other app that knows the name of my app can access my user’s account details from a Xamarin app they have written. The password, though redacted here, is effectively public, and this means that I can’t store a user’s confidential details on their device without them being discoverable by other Xamarin apps on the device.

Errors when adding GooglePlayServices Base.

$
0
0

Hello,

I am trying to add the GooglePlayServices.Base package to my project but I keep getting errors when doing this. This is my error:

Attempting to gather dependency information for package 'Xamarin.GooglePlayServices.Base.32.961.0' with respect to project 'SNIP', targeting 'MonoAndroid,Version=v6.0'
Attempting to resolve dependencies for package 'Xamarin.GooglePlayServices.Base.32.961.0' with DependencyBehavior 'Lowest'
Unable to find a version of 'Xamarin.Android.Support.v4' that is compatible with 'Xamarin.Android.Support.Animated.Vector.Drawable 23.3.0 constraint: Xamarin.Android.Support.v4 (= 23.3.0)', 'Xamarin.Android.Support.Design 23.3.0 constraint: Xamarin.Android.Support.v4 (= 23.3.0)', 'Xamarin.Android.Support.v7.AppCompat 23.3.0 constraint: Xamarin.Android.Support.v4 (= 23.3.0)', 'Xamarin.Android.Support.v7.MediaRouter 23.3.0 constraint: Xamarin.Android.Support.v4 (= 23.3.0)', 'Xamarin.Android.Support.v7.RecyclerView 23.3.0 constraint: Xamarin.Android.Support.v4 (= 23.3.0)', 'Xamarin.Android.Support.Vector.Drawable 23.3.0 constraint: Xamarin.Android.Support.v4 (= 23.3.0)', 'Xamarin.Forms 2.3.3.175 constraint: Xamarin.Android.Support.v4 (= 23.3.0)', 'Xamarin.GooglePlayServices.Basement 32.961.0 constraint: Xamarin.Android.Support.v4 (>= 24.2.1)'.

Anyone knows how to fix this?

Best regards,
Luca Panjer

WebView and meta viewport tag support

$
0
0

Hello,

I have a WebView whose html content sets the viewport using a meta tag:

<meta name="viewport" content="width=400"/>

And I'm working in an android app but use the Xamarin.Forms paradigm.

To get an Android.Webkit.WebView to enforce the meta tag, I read I must set the flags LoadWithOverviewMode and UseWideViewPort.

I did just that in a purely Xamarin.Android app and it works fine.

Now to get this done in a Xamarin.Forms app I wrote a custom renderer for the WebView and in the OnElementChanged I set those flags on theControl property and this does not work.

What am I doing wrong ?

My code is here : https://gist.github.com/doc212/b8833d30ae96b482d5dc or below.

Thanks!

Xamarin.Forms app:

namespace TestXPF
{
    public class App : Application
    {
        public App ()
        {
            string html = @"
            <html>
<head><meta name='viewport' content='width=400'/></head>
<body style='margin:0'>
<div style='width:200px; background-color:red'>200px</div>
</body>
</html>
";
            // The root page of your application
            MainPage = new ContentPage {
                Content=
                        new WebView () {
                    Source = new HtmlWebViewSource()
                    {
                        Html = html
                    }
                }
            };
        }
    }
}

Custom WebViewRenderer:

[assembly:ExportRenderer(typeof(WebView), typeof(TestXPF.Droid.WebViewRenderer))]
namespace TestXPF.Droid
{
    public class WebViewRenderer : Xamarin.Forms.Platform.Android.WebViewRenderer
    {
        protected override void OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs<Xamarin.Forms.WebView> e)
        {
            base.OnElementChanged (e);
            Control.Settings.LoadWithOverviewMode = true;
            Control.Settings.UseWideViewPort = true;
        }
    }
}

Pure Xamarin.Android solution:

namespace DroidTest
{
    [Activity (Label = "DroidTest", MainLauncher = true, Icon = "@drawable/icon")]
    public class MainActivity : Activity
    {
        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            WebView v = new WebView(this);

            v.Settings.LoadWithOverviewMode = true; v.Settings.UseWideViewPort = true;

            string html = @"
            <html>
<head><meta name='viewport' content='width=400'/></head>
<body style='margin:0'>
<div style='width:200px; background-color:red'>200px</div>
</body>
</html>
";
            v.LoadData (html, "text/html", "utf-8");

            // Set our view from the "main" layout resource
            SetContentView (v);
        }
    }
}

Convert iOS and Android app to Xamarin App

$
0
0

Hi all ,

Currently my participants ask about how to convert Existing iOS and Android app to Xamarin/Xamarin.Forms app?
Is that possible to convert all? Any tools to convert?

Xamarin backs down when the phone enters inactive (Screen off) - PushModalAsync

$
0
0

I commented, I am currently developing an application with Xamarin Forms where I navigate between pages through Navigation.PushModalAsync. When the phone is put down (the screen turns off or crashes), turn on the screen and the application back to the previous page. Is this a bug or is it my code problem? Can you help me please.

App.xaml.cs:

public App()
{
InitializeComponent();

        MainPage = new UASMobileCross.Configuration();
}

Configuration.xaml.cs.

private async void btnAccept_Clicked(object sender, EventArgs e)
{
await Navigation.PushModalAsync(new Login());
}

Viewing all 91519 articles
Browse latest View live


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