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

GoogleMaps custom renderer in iOS -> NPE

$
0
0

I'm writing a project with a pcl and ios components. I'm following this sample:

https://github.com/xamarin/xamarin-forms-samples/blob/master/CustomRenderers/Map/Pin

Using it in conjunction with Xamarin.Forms.GoogleMaps NuGet package.

I'm facing a problem inside iOS renderer, because on row number 37 https://github.com/xamarin/xamarin-forms-samples/blob/master/CustomRenderers/Map/Pin/iOS/CustomMapRenderer.cs#L37 i will get always

var nativeMap = null

I can't understand what I'm missing

EDIT:
Debugging I get some more information. The problem seems to be Control as MKMapView casting, infact that casting returns null, Control seems to be GMSMapView type instead of MKMapView.

How to go ahead of this problem???


Setting button's IsEnabled to false does not disable button

$
0
0

I have observed that when setting a button's IsEnabled property to false, the button continues to be enabled.

This button is located at the bottom of the grid. I do not observe this behavior in other views though.

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition Height="auto" />
    </Grid.RowDefinitions>

    <Grid.ColumnDefinitions>
        <ColumnDefinition />
    </Grid.ColumnDefinitions>

    <ListView Grid.Row="0"  ItemsSource="{Binding Services}" SelectedItem="{Binding SelectedService}" HasUnevenRows="true">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <ViewCell.View>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                            </Grid.RowDefinitions>

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>

                            <Label Grid.Row="0" Grid.ColumnSpan="2"  Text="{Binding Name}" />
                            <Label Grid.Row="1" Grid.Column="0" Text="Labor:" />
                            <Label Grid.Row="1" Grid.Column="1" Text="{Binding LaborCost, StringFormat='{}{0:c}'}"  />

                            <Label Grid.Row="2" Grid.Column="0" Text="Materials:" />
                            <Label Grid.Row="2" Grid.Column="1" Text="{Binding Materials, Converter={StaticResource MaterialsToCostConverter}, StringFormat='{}{0:c}'}}" />

                            <Label Grid.Row="3" Grid.ColumnSpan="2" Text="{Binding Description}" />
                        </Grid>
                    </ViewCell.View>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

    <Button Grid.Row="1" Grid.Column="0"  Text="Details" IsEnabled="False"
            Command="{Binding ViewService}"/>

</Grid>

How to add swiping dots to Tabbed/Carousel page?

$
0
0

I'm wondering how to add dots indicating to swipe screens in either TabbedPage or CarouselPage like in the below image?

I tried adding images for that but they don't look natural so is there a real way for doing that?

My above workaround explanation in an example with 3 page:

I create 3 images each image has 3 dots one of them is highlighted:

First image highlighted dot is the first one.

Second image highlighted dot is the second one.

and etc.

I can not execute the sample of Hello, Android: Quickstart or Multiscreen

$
0
0

I have downloaded but Hello Android: Quickstart and Multiscreen. When I attempt to execute phoneword.sin I get message ONE OR MORE PROJECTS IN THESOLUTION WERE NOT LOADED CORRECTED. I get the same message from but the Quickstart and the Multiscreen Deep Dive. What must I do to get around this problem?

How to Create Nuget packages for Xamarin forms ( custom views / services)??

$
0
0

Hi all can someone please shed some light on creating Nuget packages for xamarin.forms

I'm currently looking into trying to make some Custom view controls / services's for Xamarin.Forms, has any one got helpful tips like from which starting project to setup and adding the proper config files such as the nuspec file in some step by step fashion.

I did use James Montemagno plugin https://marketplace.visualstudio.com/items?itemName=vs-publisher-473885.PluginForXamarinTemplates which i was able to generate the nuget package file but could install the nuget package in my project with an error

Could not install package ''. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework.

So james plugin is also kinda old with no VS 2017 support and Xamarin moves so fast these days is this the preferred method developers follow?? I really wanna starting contributing some open source projects but where do i start.

Also whats up with NuGetizer 3000 can i use this? https://github.com/NuGet/Home/wiki/NuGetizer-3000 - The goal of the NuGetizer 3000 project is to make it as easy as possible to create and publish a NuGet package, including bait-and-switch packages, and provide guidance to users along the way.

I'm using a window 10 machine with VS 2017 but also setup VS 2015 for Jame's plugin

Problems with the interface when rotating the device horizontally

$
0
0

Hi!

The interface of my application is divided into a header (it is a webview) and absolute content, which among other things contains a second webview.

In vertical orientation it works and looks perfect.

But when I turn the device horizontally the header stops measuring 70 and measures something like 30 ....
The header reduces the height although it has a fixed height.

Why this happen? Any solution?
Thanks!

`
<ContentPage.Content>

        <WebView x:Name="webview_header" HorizontalOptions="FillAndExpand" HeightRequest="70" BackgroundColor="Red"/>

        <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Black">
            <!-- other things -->
            <ScrollView AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" BackgroundColor="Green">
                <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Padding="0" BackgroundColor="Purple">
                    <WebView x:Name="webview" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" BackgroundColor="Blue" />
                </AbsoluteLayout>
            </ScrollView>
        </AbsoluteLayout>

    </StackLayout>
</ContentPage.Content>

`

Autocomplete Entry box in xamarin forms

$
0
0

Hi, I want to add Autocomplete entry box in my project. I have search a lot in internet but didn't find useful. how can i do this.

OpenTok Xamarin.Forms nuget Video Chat


Context Menus, built-in or custom?

$
0
0

I am trying to create a context menu control in my Xamarin.Forms app, a bit like the Apple Assistive Touch button, or like this, where the additional options are shown on tap, ideally with the sort of animation that these controls typically have. Is this something which Xamarin supports, or is it something that I could code myself on Xamarin, if so how would I do this?

Thanks.

How to create a service in xamarin.forms?

$
0
0

I want to create a application where i wanted to send message just after the call is disconnected. When the callee places a call and disconnects it, the message should automatically be sent from the application to the caller.The message content would be the text configured in the app itself. The call could be a miscall or complete call. How can i achieve this in xamarin.forms?

Content-Page OnAppearing-Event fired too early

$
0
0

Hello,

I have normal TabbedPage:

<TabbedPage.Children>
    <NavigationPage Title="Page1">
        <x:Arguments>
            <views:Page1 />
        </x:Arguments>
    </NavigationPage>

    <NavigationPage Title="Page2">
        <x:Arguments>
            <views:Page2 />
        </x:Arguments>
    </NavigationPage>

....

</TabbedPage.Children>

Expected Behaviour:
When I touch Page2, I expect to get an OnAppearing-Event.

Actual (bug?) Behaviour:
When the app starts, OnAppearing-Events are immidiatly fired for all NavigationPages (Content-Page1,Content-Page2,..).
When I touch on Page2, no OnAppearing gets fired. When I touch Page3, then OnDisappearing gets fired and afterwards, when touching Page2, I get the desired OnAppearing only directly when I open the page (so my code fails on first open of page and works on re-open).

How can I get a delayed event, that only gets fired, when I really touch the Tab-Page2.

Rg Popup has issues on Android

$
0
0

I was wondering if anyone else uses Rg.Plugins.Popup for their pop up modals in their app and use Android. The issue i'm experiencing happens with a modal that has several inputs in it with save and cancel buttons at the bottom. When tapping into a text editor input (keyboard opens up), then tapping outside on blank space it auto focuses on the next input. When hitting a button in the modal it auto focuses on the first input in the modal. Why this is an issue is because on Android if you focus on a drop down or date picker it opens its own modal for that input. If I click the save or cancel buttons the modal is no longer open meanwhile that input datepicker now opened up and will crash the app. Ill report this on Rg Popups page too, but was wondering if anyone else encountered this and if they have a work around.

After Removing Page from Stack, Again Going to Same Page By PushAsync(), controls are not clickable

$
0
0

I am implementing Video Calling functionality for that i am calling form one other app and passing parameter to my app
when i am opening my App's
1)Incoming Call Page (has Accept/Reject Button) => For first time Accept/Reject Button is working perfect.
a) when i am clicking Accept Button
i am Navigating to OnGoingCallPage and Removing IncomingCallPage from Stack.
after disconnecting call
when i am calling again i am opening IncomingCallPage and (Accept/Reject button )
my problem is Accept/Reject Button is not clickable for second time.

When I am Removing (Killing) my App from RecentTask List then Accept/Reject button clicked every time .
What i am doing mistake.

Please Help,

fixed view over NavigationPage

$
0
0

Hi,
how can I add a fixed view over NavigationPage ?

Something like

ContentPage
-StackLayout
--Label
--NavigationPage

I cannot use ToolbarItem because I don't want that this bar slide when page change

Problema em somar valores de um Listview Xamarin

$
0
0

Olá pessoal,
estou com uma dificuldade em somar os valores exibido dentro de um ListView e exibir em uma Label;

A Idea é bem simples, (exemplo) eu carrego 5 linhas do ListView com valores distintos (1 ,2, 3, 4, 5) e preciso obter a soma destes valores ( total 15 ) para informar numa Label, já utilizei um FOR mas o ListView não aceita listView.Items[i]; exatamente o ".Items".

Alguém pode ajudar em obter essa soma?

Obrigado!!


Opening file from location: AppxManifest.xml failed with error: The system cannot find the path spec

$
0
0

I've created a bare-bones Xamarin app (with shared elements, but they're not doing anything yet). It builds and runs in debug mode just fine on UWP and Android (I don't have a Mac to build it for iOS). But I've had to move it to another drive - a simple copy of the whole project directory to the new location. Now the Android version builds and debugs ok, but the UWP version gives me the error:

DEP0700: Registration of the app failed. [0x80073CF0] error 0x80070003: Opening file from location: AppxManifest.xml failed with error: The system cannot find the path specified.

How can I find out what's missing and tell Visual Studio where to look for it? (The version in the original location still works fine, but I'll need to delete that when I get the version in the new location working.)

listview is not scrolling when the keyboard is raised in android.

$
0
0

hi guys,
i am having 2 issues

1)am trying to scroll the listview automatically in 2 scenario's.
a.when the page is loaded the listview will be scrolled automatically-it's working.
b.when the bottom editor is focused then also the listview must be scrolled to the last item when the keyboard is raised.

i have written the same code when the page is loaded but it's not working.

in the ios its working fine but in android its not working.

2)In IOS ,When the editor is focused the keyboard is getting overlayed on the editor and the editor is not visible how to push that editor to the top of the keyboard.

describing these problems here am attaching the sample project link:

https://www.dropbox.com/s/5bdlwxevbhvi76l/ListviewExperiments.zip?dl=0

gps tracker in real time like uber or cabify

$
0
0

Hello guys,
I want to made an application that you can tracking people in real time like UBER or Cabify, I don't know how can I do this, my Idea is the follow

this is my idea but I dont know if this is the correct form, please can you please help me with this? anyon

Live/Hot reloading at runtime that WORKS!

Where are the XAML designer tools?

$
0
0
Years have past ;-) not really but I think this question has been asked many Times' before.

The forms previewer crash all the time. It could be seen more of a compile:designer that breaks as soon as you start adding codebehind stuff.

We need a designer for Xaml not css? I think the web guys gonna stick to other tools anyways
The live previewer very nice idea, same thing doesn't work yet.

I just need BLEND with a Visual state manager. where is the backning from the Microsoft team that dream up stuff like the Blend tools :-)
Viewing all 91519 articles
Browse latest View live


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