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

Weird error while using MSBuild to get APK

$
0
0

Hi,

I am trying to make an APK from cmd line via this command:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" /t:SignAndroidPackage /p:Configuration=Release C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln

It starts building but ultimately finishes with this message:

C:\prj\Demo\Xamarin2\WiFiManager>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" /t:SignAndroidPackage /p:Configuration=Release C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln

Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 11/23/2018 3:56:18 PM.
Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" on node 1 (SignAndroidPackage target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (1) is building "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Android\WiFiManager.Android.csproj" (2) on node 1 (SignAndroidPackage target(s)).
RedirectMonoAndroidSdkPaths:
SOFTWARE\Xamarin\VisualStudio\15.0_15059c6d\Android
_CreatePropertiesCache:
Creating directory "obj\Release\MonoAndroid81\".
_SetLatestTargetFrameworkVersion:
Found Java SDK version 1.8.0.
Found Java SDK version 1.8.0.
_ValidateAndroidPackageProperties:
PackageName: WiFiManager.WiFiManager
PrepareForBuild:
Creating directory "bin\Release\".
Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Android\WiFiManager.Android.csproj" (2) is building "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj" (3:2) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\netstandard2.0\".
Creating directory "obj\Release\netstandard2.0\".
C:\Program Files\dotnet\sdk\2.1.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1004: Assets file 'C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj]
Done Building Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj" (default targets) -- FAILED.
Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Android\WiFiManager.Android.csproj" (2) is building "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj" (4:2) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\netstandard2.0\".
Creating directory "obj\Release\netstandard2.0\".
C:\Program Files\dotnet\sdk\2.1.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1004: Assets file 'C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj]
Done Building Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj" (default targets) -- FAILED.
Done Building Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Android\WiFiManager.Android.csproj" (SignAndroidPackage target(s)) -- FAILED.
Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (1) is building "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj" (4:3) on node 1 (SignAndroidPackage target(s)).
C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj : error MSB4057: The target "SignAndroidPackage" does not exist in the project.
Done Building Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj" (SignAndroidPackage target(s)) -- FAILED.
Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (1) is building "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj" (3:3) on node 1 (SignAndroidPackage target(s)).
C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj : error MSB4057: The target "SignAndroidPackage" does not exist in the project.
Done Building Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj" (SignAndroidPackage target(s)) -- FAILED.
Done Building Project "C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (SignAndroidPackage target(s)) -- FAILED.

Build FAILED.

"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (SignAndroidPackage target) (1) ->
"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Android\WiFiManager.Android.csproj" (SignAndroidPackage target) (2) ->
"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj" (default target) (3:2) ->
(ResolvePackageAssets target) ->
C:\Program Files\dotnet\sdk\2.1.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1004: Assets file 'C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj]

"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (SignAndroidPackage target) (1) ->
"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Android\WiFiManager.Android.csproj" (SignAndroidPackage target) (2) ->
"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj" (default target) (4:2) ->
C:\Program Files\dotnet\sdk\2.1.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1004: Assets file 'C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj]

"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (SignAndroidPackage target) (1) ->
"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj" (SignAndroidPackage target) (4:3) ->
C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager\WiFiManager.csproj : error MSB4057: The target "SignAndroidPackage" does not exist in the project.

"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.sln" (SignAndroidPackage target) (1) ->
"C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj" (SignAndroidPackage target) (3:3) ->
C:\prj\Demo\Xamarin2\WiFiManager\WiFiManager.Common\WiFiManager.Common.csproj : error MSB4057: The target "SignAndroidPackage" does not exist in the project.

0 Warning(s)
4 Error(s)

Time Elapsed 00:00:02.94

This target, however, exists in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets"

What am I doing wrong? How can I build a signed APK from cmd line?


Linking C# to additional Objective C header file.

$
0
0

Hi guys, I have created a UI on Mac OS recently (Not phone Apps), and I am trying to link it to an additional Objective C code.
The source of this approach is really limited as all I found was about phone apps development. Hence I am trying to verify whether my concept is do-able or not. My Approach is as below :

My solution consist of Objective C and C#, which is linked internally when I created a new solution. These are done in the background by developers of these templates, where C# is the main sequence of the whole User Interface operations. Now I have created an Objective C file (externally), with all the functions to be called in its header file. I would love to link my UI (C# and Objective-C) to this Objective C file, the similar way developers used to link C# to Objective C.

This is the only link related to the subject that I am looking for, unfortunately it is mainly about phone Apps development.
https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-objective-c/index

Below are small parts of my code /:

UI code:

MainViewController.designer.cs (Visual Studio for Mac)

using Foundation;
using System.CodeDom.Compiler;

namespace Main
{
    [Register ("MainViewController")]
    partial class MainViewController
    {
        [Outlet]
        AppKit.NSButton btnConnect { get; set; }

        [Action ("btnSubWindow:")]
        partial void BtnPopOut (AppKit.NSButton sender);
    }

    void ReleaseDesignerOutlets ()
        {
            if (btnConnect != null) {
                btnConnect.Dispose ();
                btnConnect = null;
            }
        }
}

MainViewController.m (Xcode)

#import "TestLauncherViewController.h"

@implementation TestLauncherViewController

@synthesize btnConnect = _btnConnect;
- (IBAction)btnSubWindow:(NSButton *)sender {
}

@end

MainViewController.h (Xcode)

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>


@interface TestLauncherViewController : NSViewController {
    NSButton *_btnConnect;
@property (nonatomic, retain) IBOutlet NSButton *btnConnect;
- (IBAction)btnSubWindow:(NSButton *)sender;

@end

From here, we know that Objective-C has been linked to C#, and ready to be altered from C#.

Below are part of my externally created Objective C file:

Addition.h

@interface Addition : NSObject{
    int     progress;
    Status  state;
}
-(instancetype)initWithIP:(char*)ipaddress andUIdelegate:(id)del;
-(void)startToRun;
-(int)Multiplication;
@end

I am trying to use C# to access this Objective C header file to search for the entry point of any functions that I wish to call.
Please tell me if my concept is doable or not.

If do-doable :
Please provide me some guidance to achieve this approach.
Thank you in advance.

How to verify Phone number?

$
0
0

I want to verify phone number at the time of sign up. I want to send verification code at given mobile number at the time of sign up and then verify this code for further process.
How to achieve this functionality in Xamarin.Forms App.
Could any one please put in right direction to achieve it or any sample code.

Thanks in advance..

Unable to change ListView.ItemTemplate in code behind in iOS of a Xamarin.Forms app

$
0
0

First I thought it was due to ToolbarItem with Order="Secondary" was not functional in iOS. Unfortunately I didn't put breakpoint and debugged it when I posted the above thing.

But after putting the breakpoint and debugging I found that the setting ItemTemplate in an event was not effective. The pros may tell me if it is a bug.

First, the postings by @NMackay and @ClintStLaurent in this thread confirmed that the way that I was accessing the StaticResource in the code is correct.

Then I found this post on StackOverflow which hinted me what may be wrong. It was mentioned that one has to refresh the ListView several times before the chanted ItemTemplate is effective. And I found that I will have to pull-to-refresh as many times as the number of rows visible. Still the new Itemtemplate is not applied to the top most item.

My code is as below:

    <ContentPage.Content>
        <StackLayout>
            <ListView x:Name="ItemsListView"
                      ItemsSource="{Binding ToDoPlusItems}"
                      VerticalOptions="FillAndExpand"
                      HasUnevenRows="true"
                      RefreshCommand="{Binding LoadItemsCommand}"
                      IsPullToRefreshEnabled="true"
                      IsRefreshing="{Binding IsBusy, Mode=OneWay}"
                      CachingStrategy="RecycleElement"
                      ItemTemplate="{StaticResource ItemTemplateNonFramed}">
                <ListView.GestureRecognizers>
                    <TapGestureRecognizer Tapped="GstrDoubleTapListItem_Tapped"
                                          NumberOfTapsRequired="2" />
                </ListView.GestureRecognizers>
            </ListView>
        </StackLayout>
    </ContentPage.Content>


        <ToolbarItem Text="Show Abridged"
                     Clicked="ShowAbridged_Clicked"
                     Order="Secondary" />
        <ToolbarItem Text="Show More"
                     Activated="ShowMore_Clicked"
                     Order="Secondary" />


        private void ShowAbridged_Clicked(object sender, EventArgs e)
        {
            ItemsListView.ItemTemplate = (DataTemplate)this.Resources["ItemTemplateNonFramed"];
        }

        private void ShowMore_Clicked(object sender, EventArgs e)
        {
            var template = this.Resources["ItemTemplateFramedShort"] as DataTemplate;
            ItemsListView.ItemTemplate = template;
        }

How to open specific page after clicking on notification when the app is closed using app center

$
0
0

Hi,

Kindly let me know How to open specific page after clicking on notification when the app is closed using app center push notification?

Is there any File/Image Upload Control in xamarin forms

$
0
0

Hi,

Is the any control for File/Image Upload in xamarin forms

When you click the button, the same page is opened multiple times. How can I fix this?

The application could not be started. Ensure that the application has been installed to the target d

$
0
0

this one again!!!!

The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).

Additionally, check Build->Configuration Manager to ensure this project is set to succcsfully
for this configuration.

[1]
I have deleted previiouse APK from device end reassure no remaining other previews APK that might exist with the package or app name on the device.
try to change the app/package name...
[2]
tried the adb command prompt to delete the previous apk on cash..
[3]
manually clean and rebuild..
[4]
reboot the device
[5]
BUT: reopen Visual Studio on administrative mode - works!!

it works but in my case, it's taking a very long time to start work again on my project until everything compiled this and that...

so: if you have a different way to solve this issue and you would like to share.. it will be awesome


Platform dependent ListView.CachingStrategy does not work

$
0
0

I try to set the CachingStrategy on my listview per platform like this:

    <ListView.CachingStrategy>     
        <OnPlatform x:TypeArguments="ListViewCachingStrategy" iOS="RetainElement" Android="RecycleElement" />   
    </ListView.CachingStrategy>

And it results in the following error:

Position 54:10. Cannot assign property "CachingStrategy": Property does not exist, or is not assignable, or mismatching type between value and property

I also tried this:

<x:Arguments>
    <ListViewCachingStrategy>
        <OnPlatform x:TypeArguments="ListViewCachingStrategy" iOS="RetainElement" Android="RecycleElement"/>
    </ListViewCachingStrategy>
</x:Arguments>

Same result. Any ideas?

CachingStrategy OnPlatform axml

$
0
0

Hello, I would like to choose the Caching Strategy for each platform.
My code is as follows but does not work:

<ListView> <ListView.CachingStrategy> <OnPlatform x:TypeArguments="x:String" iOS="RetainElement" Android="RecycleElement" /> </ListView.CachingStrategy> <ListView.ItemTemplate> <DataTemplate> <ViewCell> ... </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView>

How can I do it?

Thank you.

OKTA SSO integration with SAML and WS-Federation

$
0
0

In our Xamarin.forms app, we want to support SSO with OKTA. We were able to implement SSO feature using "OpenId Connect" but we also want to use SSO with SAML 2.0 and WS-Federation

My question here is can we integrate OKTA SSO with SAML or WS-Federation in Xamarin.Forms? If 'Yes' any help link is appreciated here.

Assign picture to Image control from gallery and Keep it assigned before load the server.?

$
0
0

I have a list view of employee page. Click on each employee display detail page where I can load a picture to image box for each employee to save when I have internet connection. When I go back to listview I lose the image that I have assign for the previous employee. How to keep that image attached to image control (box)

Add Watermark on Video Recorder

$
0
0

Hello All, i want to add company watermark in both iOS and android.i am use plugin.media for record video.
if anyone have suggestion for complete this task

Debugging Session issues.

$
0
0

A number of versions ago I started noticing odd debugging to device behaviours, I'm wonder if someone here can shed light on my situation. I'm debugging my Xam Forms PCL project to a Sony Xperia Android device. On the device I use SQLite to store some local data for the app. In the past, no matter how many times I unplug my device and plug it back in - the SQLite data source always persisted between debugging sessions. Recently I've started noticing this data being cleared whenever I unplug and replug in the device... Its frustrating as I have to keep re-entering credentials each time. If I leave the device plugged in it does keep the sqlite details for multiple debug sessions, but once I go for a break - unplug the phone and then re-plug it in - my local data source vanishes?

Furthermore - after initial plug-in and on first debug session - it is taking the Visual Studio 2017 8 minutes....YES 8 MINUTES to start the app... Once it has started this delay shortens drastically, but once I replug it in - its again 8 minutes for the first debug session.... Wasting lots of my time....

Anyone else experienced this? Any suggestions of how to find the cause of the problem also welcomed...

how to loading images from gallery?

$
0
0

I'm planning an app for cross-platform and i can not loading images from gallery.


Sliding Panel like native Google/Apple Maps

$
0
0

Hello,

I am looking for a sliding panel that slides up from bottom and is draggable, similar to what native maps provide on iOS and Android platforms. I would really appreciate if someone can help. I tried DKSlidingPanel but its very hard to customize it (since it has extra UI bits that we don't need).

Thanks

AP

Xamarin.Forms vs Flutter

$
0
0

Hi all
Thomas Burkhart has posted an interesting small review to Flutter (a relative new challenger to .forms) including his personal compare between .forms and Flutter.

As the link was included in the “Weekly Xamarin” newsletter and there also already were articles to Flutter published in the visuals studio magazine (links see below), I think, it’s O.K. to publish this thread here...

As I think, this is interesting for many users, I post the link here:
https://www.burkharts.net/apps/blog/flutter-the-new-kid-on-the-block/?utm_campaign=Weekly+Xamarin&amp;utm_medium=email&amp;utm_source=Weekly_Xamarin_150

Further, also Aloïs Deniel (another Xamarin user) has posted detailed information’s to Flutter a longer time ago here:
https://aloisdeniel.github.io/flutter-introduction/

I think, both postings together will give a good overview to Flutter (from the point of view of Xamarin users).

Link #1 to article in visual studio magazine:
https://visualstudiomagazine.com/articles/2017/12/04/flutter-challenges-xamarin.aspx

Link #2 to article in visual studio magazine:
https://visualstudiomagazine.com/articles/2018/03/01/flutter-xamarin.aspx

Link to a further “high level” comparison Xamarin / Flutter and React native:
http://blog.novoda.com/react-native-flutter-xamarin-a-comparison/

@ThomasBurkhart and @AloisDeniel
First, many thanks for your good work! :smile:

@ThomasBurkhart:
I can fully agree with your findings regarding the “Xamarin tool-chain”.
My personal opinion (without testing Flutter):

  • Looks very promising and interesting (especially “It just works”, fast build time, very fast start-up).
  • Negative points for me are: it seems that there is no integration in VS professional (MS will know the reason for), no direct interface to the device functions, future not secured, no direct support for build iOS on a windows machine

I will definitely keep an eye on Flutter and - as soon as my nerves are completely destroyed with Xamain.Forms - give it a try.

Thanks again

Maybe, also other users want to share their opinions here....?

Messaging Center called twice in xamarin forms

$
0
0
MessagingCenter.Subscribe<string>(this, "LocationName", (value) =>
                {
                    FullPathName.Text = value;
                });

While I set a break point and notice that This MessagingCenter.Subscribe called twice.
How to solve this?

Using declarative style C# instead of XAML - should Xamarin redirect XAML efforts elsewhere?

$
0
0

Introduction

Miguel tweeted:
"I should have never added Xaml and instead invented our own ...", expressing regrets about having to deal with XAML (standardization) problems.

My response was:
"I would applaud dropping XAML altogether. Advancements in C# (declarative syntax) have eliminated any advantages of a separate markup language for years. Why would you want to hand-code an object serialization format? Why waste time on duplicating dev tools for features that c# already offers?"

David expressed an interest to see how I have been creating Xamarin Forms markup in declarative style C#, instead of in XAML, for the past few years. So I write this post to provide a concrete example, and share the reasoning behind my remark (which was deliberately lacking nuance - it is Twitter after all).

Redirecting Xamarin IDE team effort

Why do I spend time on this? In the past years I only experienced advantages from using declarative C# instead of XAML. Given that the core challenge for the Xamarin IDE teams remains to improve the developer productivity, I would love to see some of the effort now being spent on (imo redundant) XAML tooling to be redirected towards reducing IDE bugs and speeding up the dev cycle, i.e. Live Player.

I recently investigated Google's Flutter (build beautiful native apps in record time), which by design has no separate language for markup and which offers hot reload - which is like a Xamarin Live Player without any limitations and a refresh time of 400-600 ms (I checked on devices and emulators). This is what I want from Xamarin!

This is the competition Xamarin is facing today. Some developers are already switching from Xamarin to Flutter because of developer tooling productivity, which apparently can be more important than language or framework or experience. As a Xamarin veteran, I get why they do this. I feel that unless there is a significant team increase, Xamarin needs to focus and redirect existing effort towards developer productivity, meaning less IDE bugs and faster development cycle.

Example
.
Here is an unabridged example of a simple registration code page in a production app I wrote:

Content = new Grid { 
    RowSpacing = 0, 
    RowDefinitions = { new RowDefinition { Height = GridLength.Auto }, new RowDefinition {}},
    Children = {
        PageHeader.Create(PageMarginSize, nameof(vm.RegistrationTitle), returnToPreviousViewCommandPropertyName: nameof(vm.CancelEnterRegistrationCodeCommand), centerTitle:true),

        new ScrollView { Content = new Grid {
            RowDefinitions = {
                new RowDefinition { Height = 170 },

                new RowDefinition { Height = 75 },
                new RowDefinition { Height = GridLength.Auto },
                new RowDefinition { Height = GridLength.Auto }
            },
            RowSpacing = 0,

            ColumnDefinitions = {
                new ColumnDefinition { Width = 160 },
                new ColumnDefinition { }
            },

            Children = {
                new Label {
                    Margin = fieldNameMargin, LineBreakMode = LineBreakMode.WordWrap, 
                    HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.Center, HorizontalTextAlignment = TextAlignment.Center, 
                }.SetFontSize(WspFontSizes.Size15)
                 .SetColRow(0, 2, 0, 1)
                 .Bind(nameof(vm.RegistrationPrompt)),

                new Label { Text = "Registration code", VerticalOptions = LayoutOptions.End, Margin = fieldNameMargin }.SetFontSize(WspFontSizes.Size13)
                .SetColRow(0, 1, 1, 2),
                new Label { HorizontalOptions = LayoutOptions.End, VerticalOptions = LayoutOptions.End, Margin = fieldNameMargin }.SetFontSize(WspFontSizes.Size13)
                .SetColRow(1, 2, 1, 2)
                .Bind(nameof(vm.RegistrationCodeValidationMessage)),

                new Entry {
                    Placeholder = "E.g. 123456", HeightRequest = 44, Keyboard = Keyboard.Numeric, 
                    BackgroundColor = WspColors.White.ToColor(), TextColor = WspColors.Gray1.ToColor(), Margin = fieldMargin }.SetFontSize(WspFontSizes.Size15)
                .Bind(nameof(vm.RegistrationCode), BindingMode.TwoWay)
                .Id(AId.RegistrationCodePage_CodeEntry)
                .SetColRow(0, 2, 2, 3),

                new Button {
                    Text = "Verify",
                    Margin = PageMarginSize,
                    HeightRequest = 44,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    TextColor = WspColors.White.ToColor(),
                    BackgroundColor = WspColors.ColorValueAccent.ToColor()
                }.SetFontSize(WspFontSizes.Size13)
                 .Id(AId.RegistrationCodePage_VerifyCodeButton)
                 .Bind(Button.IsVisibleProperty, nameof(vm.CanVerifyRegistrationCode))
                 .Bind(nameof(vm.VerifyRegistrationCodeCommand))
                 .SetColRow(0, 2, 3, 4),
            }
        }}.SetColRow(0, 1)
     }
 };

Nothing advanced is going on here, I use standard C# language features to reuse controls (e.g. PageHeader.Create method ) and to simplify data binding (.Bind extension methods). In my eyes the above reads similar to equivalent XAML.

Which is not very surprising given that XAML is at its heart just an object serialization format in XML. In other words, XAML does what the new keyword in C# does.

Now, C# is designed for humans; while XML is better for tools such as visual designers. As a matter of fact, that was the vision for (WPF) XAML: that human designers could use a tool (Blend) to create a UI that developers could consume. However, I experienced how that vision, even in the best possible time and scenario, failed to deliver (I Built a WPF app for Windows tablet together with a XAML book authoring, leading designer, who was a master in Blend, when that was THE tool. The UI was beautiful and totally unmaintainable). So even if there would come an ultimate visual designer tool for Xamarin Forms, equivalent to the best that Blend ever was, it would still fail for the same reasons. Time to move on, like Flutter?

So, anyone (Xamarin devs and Xamarin team) wants to chime in on either XAML versus C# or redirecting Xamarin IDE efforts?
I'm really curious how Xamarin devs (especially experienced ones) see this.

Thanks!

Apk deployment doesn't include last code-modifications

$
0
0

Hello,
In a xamarin-forms I've made some modifications to the code, to forms and to the version number in the proprerties of the project.
When I make the apk, the new version number is taken, but when I deploy the new apk, the forms
are still in an old version.

during debuggin via usb, the modifications are taken.

  • I've uninstalled the apk, db etc from the smartphone.
  • I've deleted the bin/obj, cleaned the project, deleted the appdata/xamarin
  • I tried also on a other clean smartphone but the result is the same.

Have You same ideas?
Thanks very much

Microsoft Visual Studio Community 2017 Versione 15.9.4 VisualStudio.15.Release/15.9.4+28307.222
Microsoft .NET Framework Versione 4.7.03056
Edizione installata: Community
ADL Tools Service Provider 1.0
Gestione pacchetti NuGet 4.6.0
Microsoft JVM Debugger 1.0
Microsoft MI-Based Debugger 1.0
Microsoft Visual Studio Tools per contenitori 1.1
MLGen Package Extension 1.0
Mono Debugging for Visual Studio 4.13.12-pre (9bc9548)
MySQL for Visual Studio 1.2.8
Pacchetto di Microsoft Visual Studio VC 1.0
Pacchetto di Strumenti Application Insights per Visual Studio 8.14.11009.1
Pacchetto host dell'adattatore di debug di Visual Studio Code 1.0
ProjectServicesPackage Extension 1.0
Servizio di linguaggio JavaScript 2.0
SQL Server Data Tools 15.1.61810.11040
SQLite & SQL Server Compact Toolbox 4.7
Strumenti C# 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Componenti di C# usati nell'IDE. A seconda delle impostazioni e del tipo di progetto, potrebbe essere usata una versione diversa del compilatore.
Strumenti comuni di Azure 1.10
Strumenti di Microsoft Azure 2.9
Strumenti di Microsoft Azure Service Fabric per Visual Studio 2.4
Strumenti di recapito continuo Microsoft per Visual Studio 0.4
Strumenti di Workflow Manager 1.0 1.0
Strumenti TypeScript 15.9.20918.2001
Strumenti Visual Basic 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
ToolWindowHostedEditor 1.0
Visual Studio Tools per app di Windows universale 15.0.28307.208
Visual Studio Tools per contenitori 1.0
Visual Studio Tools per Unity 3.9.0.3
VisualStudio.Mac 1.0
Xamarin 4.12.3.77 (d15-9@e3f40b477)
Xamarin Designer 4.16.13 (45a16efd4)
Xamarin Templates 1.1.128 (6f5ebb2)
Xamarin.Android SDK 9.1.4.2 (HEAD/8255f42fc)
Xamarin.iOS and Xamarin.Mac SDK 12.2.1.12 (65ec520)

Viewing all 91519 articles
Browse latest View live


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