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

How to design beautiful UI for E-Commerce App in Xamarin.Forms?

$
0
0

Hi Folks,
How are you doing? I am going to develop an Ecommerce Xamarin.Forms App that I expect to look similar to the one in the picture above. I need your help in designing its UI for Items catalog Page. From the picture, I guess to have a MasterDetailPage , a master page for categories of products and a Detail page for Items of Respective category.

App will fetch data from Sql Azure Database hosted on Microsoft Azure via Asp.Net Web API and I want UI to be automatically updated (New boxes, Item templates or in simple words, Items to be added /shown in the page upon screen refresh) if database has got some new products/items in it. Problem that I have is that I am not sure how to make these products boxes, divide them in 2 columns and two products in each row as shown in the picture.

Kindly guide me on how can I achieve this and which UI controls should I use?
Thanks :smile:


Guidance on making application more responsive on Android devices

$
0
0

Hi,
I have an Xamarin.Forms application and would like to make it more responsive, because when I run it on several Android emulators it looks different depending on resolutions setted on each device. Any suggestions? I mostly use Grid Layout.

Best,
Tomasz Kowalczyk

Hamburger menu not available on Signed APK

$
0
0

Hi,
When i create a signed APK and upload is to my device the Hamburger menu that I created in Xamarin Forms is not visible.
It is visible in the other none signed APK.

Please advise.

how to align images ?

$
0
0

Hello guys I have two images in my xaml but these image are not aligned
I want to align my images like this

But I have my images like this

Could Anyone can explain me how can I do this?
My xaml code is this:

    <StackLayout VerticalOptions="Center">

        <StackLayout Orientation="Horizontal" VerticalOptions="End">
            <Image Source="tamalito.png" Aspect="AspectFit" ></Image>
            <Image Source="tamalito.png"  ></Image>
        </StackLayout>

        </StackLayout>

how to use Sqlite in Shared project

$
0
0

hey
as i mentioned in the title
how to use Sqlite in Shared project
all what i have found is tutorials for PCL projects only
please help

Which event is fired when back button is pressed while keyboard is open in android?

$
0
0

Hi All,

OnBackButtonPressed() is not hitting when pressing back button while keyboard is open.

Need to unfocus the entry when keyboard hides usin back button.

Any help is appreciated.
Thanks

How to count the time of a running app till app does not close using stopwatch?

$
0
0

i want to count the time of app to its running state to close state..

How can I access Navigation from within a ViewCell?

$
0
0

Let's say that I have a custom ViewCell for a ListView, where each cell contains a button. When a user clicks that button I'd like to be able to push a new page onto the navigation stack. The problem is that because I'm not inside the ContentPage, but in a ViewCell, I don't have access to the Navigation property.

The cells themselves are also managed automatically through the ListView, so as far as I know I don't have a way to pass the parent ContentPage through the constructor, right?

Is there a way to access the Navigation features from the ViewCell? Or do I need to somehow restructure my ListView to pass the ContentPage through to each ViewCell?


Could not connect to the debugger after Mac Update

$
0
0

Hello,
After I have update my iOS version on my mac, i can't deploy a debug app on the android emulator now. Do you know a solution ?
ERROR : "Could not connect to the debugger"
Thanks.

Error About XamlC

$
0
0

Hi.. I'm updated to xamarin.forms packages 2.3.4.247 version when I try to build the app it becomes error the result is "The target "XamlC" does not exist in the project."
Can someone help?

Showing wrong current location in Xamarin forms Geolocator

$
0
0

Hi everyone, I am using Geolocator plugin for getting current device location but it shows wrong result. Now I am in India but it shows San Francisco. Can you please suggest what wrong I have done. Thank you advance.

code :

var locator = CrossGeoLocator.Current;

locator.DesiredAccuracy = 50;

var position = await locator.GetPositionAsync(1000);

When I verified finally getting coordinates it's belongs to San Francisco.

How to set selectedindex to zero in xaml after itemssource binding from viewmodel to picker?

$
0
0

I would like to set a default value in the Picker. So far I know the "Title" is automatically used but I would like to show one of the options, the Picker shows, e.g. the first one.
I would like to have a xaml solution.
Is there a way to specify the default value in a Picker?

I used this

if I set picOne.SelectedIndex=0;
it is working, but I want to make it work in xaml.

Download and display images from sharepoint (X.Forms PCL)

$
0
0

Hi there !

I'm currently developping an app based one Sharepoint REST API and Microsoft Graph. My app is composed mainly with a Tabbed Page, and on the first tab I want to display News from sharepoint. To do so I want to get images from the news, but using the url of the images as Image Source returns me "forbidden" error. So, I decided to find a way to download those images. I've been looking for a way for few days now, and found nothing...

Does anyone knows a way to do that, or why do I have a forbidden access error ?

I bring some precisions, I'm using an HttpClient to authenticate to the tenant with REST API :

       client = new HttpClient();
       Uri mUri = new Uri(App.ReturnUri);
       client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
       var data = await DependencyService.Get<IAuthenticator>()
                     .Authenticate(App.LoginAuthority, App.RestResourceUri, App.ClientId, mUri);
       App.AuthenticationResult = data;
       client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", App.AuthenticationResult.AccessToken);

From that, I hope someone knows if there is a way to download images, or to access to url in order to use them as Source. I succeeded in retrieving URLs but not displaying images, knowing that I can retrieve any other data from sharepoint

Thanks for any help,

Getting "ResolveLibraryProjectImports" task failed unexpectedly in release mode

$
0
0

In debug mode its working fine but in release mode i am getting this error.

Severity Code Description Project File Line Suppression State
Error The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.Open(String path, FileMode mode)
at Xamarin.Tools.Zip.ZipEntry.DoExtract(IntPtr zipFile, String destinationPath, FileMode outputFileMode, EntryExtractEventArgs args)
at Xamarin.Tools.Zip.ZipEntry.Extract(String destinationDir, String destinationFileName, FileMode outputFileMode)
at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String destination, Action2 progressCallback) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Smart_Hire.Android

can anyone please help me out with the issue.

Thanks in advance

Acr.Barcodes

$
0
0

I've installed last Acr.Barcodes package from nuget, but when I try to use it the camera does not turn on (I see only the red line).
If I download source from github, it works fine.
Someone has the same problem?
Alessandro


MVVM Light - How to use the selectedIndexChanged event in viewModel

$
0
0

Hi !
I try to use the selectedIndexChanged event in my viewModel but when i write this :

I have the following error :
"No Property of name SelectedIndexChanged found"

Anyone can help me ?
Thanks !

App not deployed Problem with debugging also without debugging

$
0
0

App not being deployed unable to find the reason
Please help ASAP

  Assembly System.Diagnostics.Tools[0xad994f00] added to domain RootDomain, ref_count=1
    07-22 19:52:16.322 D/Mono    ( 3003): AOT: image 'System.Diagnostics.Tools.dll.so' not found: dlopen failed: library "/data/app/App9.Android-1/lib/x86/libaot-System.Diagnostics.Tools.dll.so" not found
    07-22 19:52:16.322 D/Mono    ( 3003): AOT: image '/usr/local/lib/mono/aot-cache/x86/System.Diagnostics.Tools.dll.so' not found: dlopen failed: library "/data/app/App9.Android-1/lib/x86/libaot-System.Diagnostics.Tools.dll.so" not found
    07-22 19:52:16.322 D/Mono    ( 3003): Config attempting to parse: 'System.Diagnostics.Tools.dll.config'.
    07-22 19:52:16.322 D/Mono    ( 3003): Config attempting to parse: '/usr/local/etc/mono/assemblies/System.Diagnostics.Tools/System.Diagnostics.Tools.config'.
    07-22 19:52:16.322 D/Mono    ( 3003): Assembly Ref addref App9[0xad994d80] -> System.Diagnostics.Tools[0xad994f00]: 2
    07-22 19:52:16.323 D/Mono    ( 3003): Assembly Ref addref System.Diagnostics.Tools[0xad994f00] -> System[0xaed54720]: 9
    07-22 19:52:41.692 D/Mono    ( 3003): [0x9cf3f930] worker finishing
    07-22 19:53:05.773 D/Mono    ( 3003): [0x9d0fd930] worker finishing
    07-22 19:53:13.194 D/Mono    ( 3003): [0x9d1fe930] worker finishing

xaml parse failed with exception

$
0
0

i tried to load resource programmatically.
But the XAML load failed with parse exception - Xamarin.Forms.Platform.UWP.FormsPresenter

empty toolbox in both xamarin studio and visual satudio 2013 unsing xamarin forms

$
0
0

I have an empty toolbox in both xamarin studio and visual satudio 2013 unsing xamarin forms.

I am editing a xaml file and there are no controls in the toolbox.

Also in xamarin studio I do not get any kind of 'designer' view... only XML view...

in visual studio I get an error trying to view the 'design' view. It is not rendering the view... so it makes it impossible to see what is laid out etc...

Any reason why?

I find it unusable without a toolbox... how does others get around this?

HttpClient in xamarin.forms PCL assembly cannot be referenced

$
0
0

I am trying to do a facebook sign in page for my android platform, however I keep getting this error. I tried installing the Nuget package httpClient also but to no avail. I also tried referencing using Windows.Web.Http;

The error:
The Type 'IAsyncOperationWithProgress<,>'is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows.Foundation.FoundationContract, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.

My Code:
public async Task GetFacebookProfileAsync(string accessToken)
{
var requestUrl = "https://graph.facebook.com/v2.10/me/" + "?fields=name,picture,cover,age_range,devices,email,gender,is_verified" + "&access_token=" + accessToken;
var httpClient = new HttpClient();
var userJson = await httpClient.GetStringAsync(requestUrl);
}

Viewing all 91519 articles
Browse latest View live


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