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

Binding From list to labels and buttons from list

$
0
0

Hi , Im binding from my ViewModel to my view a list , but the client requested specific design , can I instead of binding to a list , bind data to labels and buttons that i have created by my self ! see picture to understand more what i mean .
thanks



How to remove gaps in the splash with 9 patch images?

$
0
0

Dear,

After update my xamarin forms android app to use targetSdkVersion 27 (I don't remember surely but think that before was 16) my splash screen is shown with two rectangles and I don't found the cause, someone already dealed with this issue?

Xamarin.Forms CardsView nuget package

$
0
0

Hi all) I've released new package for Xamarin.Forms (Something like Tinder's CardsView)
Maybe, someone will be interested in it

nuget.org/packages/CardsView/ -- nuget
github.com/AndreiMisiukevich/CardView -- source and samples

StripeView in Xamarin Forms

$
0
0

I did a little research and it seems braintree and stripe are suitable for app payments.
braintree has no official xamarin bindings but there's a Stripe component by Xamarin for Android and iOS.
is it possible to use this component in Xamarin.Forms (and it's StripeView UI) ?

Native linking failed error in xamarin for GoogleSign

$
0
0

I am following this tutorial for GoogleSign in my project. https://www.pujolsluis.com/google-client-plugin-for-xamarin/ .Works fine in android. But getting Native linking failed errors while rebuild in ios.

Native linking error: clang: error: no such file or directory: '/Users/cybasetechnologies/Library/Caches/Xamarin/mtbs/builds/login2.iOS/0f92dcc98e9717a0d2643ed70077af70/obj/iPhone/Debug/mtouch-cache/FirebaseInstanceID'
Native linking error: clang: error: no such file or directory: '/Users/cybasetechnologies/Library/Caches/Xamarin/mtbs/builds/login2.iOS/0f92dcc98e9717a0d2643ed70077af70/obj/iPhone/Debug/mtouch-cache/FirebaseNanoPB'
Native linking failed. Please review the build log.
Native linking error: clang: error: no such file or directory: '/Users/cybasetechnologies/Library/Caches/Xamarin/mtbs/builds/login2.iOS/0f92dcc98e9717a0d2643ed70077af70/obj/iPhone/Debug/mtouch-cache/FirebaseCoreDiagnostics'
Native linking error: clang: error: no such file or directory: '/Users/cybasetechnologies/Library/Caches/Xamarin/mtbs/builds/login2.iOS/0f92dcc98e9717a0d2643ed70077af70/obj/iPhone/Debug/mtouch-cache/FirebaseAnalytics'
Native linking error: clang: error: no such file or directory: '/Users/cybasetechnologies/Library/Caches/Xamarin/mtbs/builds/login2.iOS/0f92dcc98e9717a0d2643ed70077af70/obj/iPhone/Debug/mtouch-cache/GoogleSignIn'
Native linking error: clang: error: no such file or directory: '/Users/cybasetechnologies/Library/Caches/Xamarin/mtbs/builds/login2.iOS/0f92dcc98e9717a0d2643ed70077af70/obj/iPhone/Debug/mtouch-cache/FirebaseCore'

Deleted bin and obj folders in both mac and visualstudio; clean and rebuid; still error persists.Please help..

How to remove gaps in the splash with 9 patch images?

$
0
0

Dear,

After update my xamarin forms android app to use targetSdkVersion 27 (I don't remember surely but think that before was 16) my splash screen is shown with two rectangles and I don't found the cause, someone already dealed with this issue?

Xamarin.Forms CardsView nuget package

$
0
0

Hi all) I've released new package for Xamarin.Forms (Something like Tinder's CardsView)
Maybe, someone will be interested in it

nuget.org/packages/CardsView/ -- nuget
github.com/AndreiMisiukevich/CardView -- source and samples

CarouselView implementation, CardsView nuget package


UI Tests with B2C login

$
0
0

I have created an app which uses MS B2C login. This all works fine. However, i am now trying to create UI tests for my app - but I cant interact with the login screen shown by B2C. B2C loads in a separate browser window and then returns the authentication result to my app by a redirect URL - but since the window is not part of my app - the UI tests fail to find the controls to enter in the username and password. When i query using app.tree in the REPL nothing is returned when the login screen is showing.

TouchView | TouchImage | TouchFadeView | TouchColorView package

$
0
0

Hi all, let me introduce new plugin for Xamarin.Forms development.

https://github.com/AndreiMisiukevich/TouchEffect

This plugin allows developers to create UI-responsive controls/layouts with touch effect (fade control, change image source, change background color)

I will appreciate any feedback)

Application has horrible performance on Obi sf.

$
0
0

A client of my has a test phone called Obi sf1 with qualcomm msm8939 processor and android 5.0.2. My app performs well on most devices but I noticed a noticeable performance dip on that phone. The basic stuff starting with an entry and scroll do not work. There are not stuff running on background or any ui blocking tasks. Can some one please help me with this stuff ?

How number of text field will be added depending on number of button click

$
0
0

If i press once Button means one text field will be added.If i press twice means again new text field will be added.How can i do it any suggestion please?

Nested ListView in Xamarin.Forms (ListView inside another ListView)

$
0
0

I have created a nested ListView in Xamarin.
But unfortunately, the binding works only with the Parent ListView and NOT with the Child List - sub ListView.

I tried to verify if there is any error with my Binding, and my binding works well with the sub List, if i make it as parent.
Any help on this binding, or approach for nested ListView bindings in Xamarin with samples would be much helpful.

Is there full support for xamarin form platforms wpf

$
0
0
I am developing wpf application using xamarin forms. I am facing lot of issues while implmentating the every feature. For example camera functionality is not supported to xamarin form platforms wpf.
When I used native wpf camera, the camera UI is showing another window.
Is it possible to make camera functionality in xamarin forms platforms wpf.

Thanks in advance

Xamarin.Forms built from source missing UWP WindowsPage

$
0
0

Hello, I'm trying to build Xamarin.Forms to debug some binding exceptions I was getting while migrating PCL to .NET Standard.

I followed the instructions at "Debugging Xamarin Open Source Frameworks: Part 1 – Xamarin.Forms". The machine is Windows 10 Version 10.0.17134 Build 17134, building source code from github with tag release-3.3.0-sr1.2 (commit 9e72c50). The compile completes just fine, and I made the local nuget repository and linked it to the solution.

I get just one compile error:

\obj\x86\Debug\MainPage.g.i.cs
namespace MyProject.NETCore.UWP
{
partial class MainPage : global::Xamarin.Forms.Platform.UWP.WindowsPage
{

Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'UWP' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?) MediView.Mobile.NETCore.UWP C:\git\MEDIVIEW\MediView.Mobile.NETCore\MediView.Mobile.NETCore.UWP\obj\x86\Debug\MainPage.g.i.cs 13 Active

I've tried cleaning, rebuilding, unlinking, linking directly, nothing seems to help. The Xamarin.Forms.Platform DLL is in the nuget package. Any idea why it wouldn't be recognized?

Thanks!


Upgrade Xamarin.Forms to 3.2.0.839982 Broke build Value cannot be null. Parameter name: type

$
0
0

Hi

Unfortunately, the latest forms update has totally broken my project (thankfully I have a backup). It seems that every time I update forms it breaks my application in some way.

I have tried the various suggestions online such as deleting obj and bin folders for the project and, and removing the [XamlCompilation(XamlCompilationOptions.Compile)] from the code-behind, to no avail. Still wont build.

Anyone have any idea how to solve this - I am guessing it has effected like everyone using forms...

App.xaml : error : Value cannot be null.
3>App.xaml : error : Parameter name: type
3>PopupViews\PopupErrorPage.xaml : error : Value cannot be null.
3>PopupViews\PopupErrorPage.xaml : error : Parameter name: type
3>PopupViews\PopupPatientEventActivitySelector.xaml : error : Value cannot be null.
3>PopupViews\PopupPatientEventActivitySelector.xaml : error : Parameter name: type
3>PopupViews\PopupPatientEventCompletedViewer.xaml : error : Value cannot be null.
3>PopupViews\PopupPatientEventCompletedViewer.xaml : error : Parameter name: type
3>PopupViews\PopupPatientEventList.xaml : error : Value cannot be null.
3>PopupViews\PopupPatientEventList.xaml : error : Parameter name: type
3>PopupViews\PopupPatientEventSymptomSelector.xaml : error : Value cannot be null.
3>PopupViews\PopupPatientEventSymptomSelector.xaml : error : Parameter name: type
3>Views\AppDormantPage.xaml : error : Value cannot be null.
3>Views\AppDormantPage.xaml : error : Parameter name: type
3>Views\ConnectionStatusPage.xaml : error : Value cannot be null.
3>Views\ConnectionStatusPage.xaml : error : Parameter name: type
3>Views\PatientEventPage.xaml : error : Value cannot be null.
3>Views\PatientEventPage.xaml : error : Parameter name: type
3>XamlControls\ProteusConnectionStatusControl.xaml : error : Value cannot be null.
3>XamlControls\ProteusConnectionStatusControl.xaml : error : Parameter name: type
3>XamlControls\SpacelabsLogoControl.xaml : error : Value cannot be null.
3>XamlControls\SpacelabsLogoControl.xaml : error : Parameter name: type

Maps on UWP gives a black page with map controls

$
0
0

Hi!

I'm having a issue with adding a map view in my app, i got it working on Android but in UWP i get a black page with some zoom controls on the side and i have no idea what the issue can be.

The code is basically from the example code provided on the map control page on Xamarin:

var map = new Map(
MapSpan.FromCenterAndRadius(new Position(latitude, longitude), Distance.FromMiles(0.3)))
{
    IsShowingUser = false,
    HeightRequest = 100,
    WidthRequest = 960,
    VerticalOptions = LayoutOptions.FillAndExpand,
    Pins =
    {
        new Pin
        {
            Label = "Launch Site",
            Type = PinType.Generic,
            Position = new Position(latitude, longitude)
        }
    }            
};

Any suggestions or ideas are much appreciated!

How to pass parametres through command?

$
0
0

Hi there! :smile:

i've made some docs research about how to pass parameters though command but end up with example below. My goal is to pass string parameter though command from list view to new page as new background image but i ended with Unhandled Exception while trying to achive this. I don't understand x:refenrece to well for now so for any time spend for explanation of this i would be very appreciate.

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.

Code for new page with parameter passed by

public partial class Page1 : ContentPage
{
    public WasteModel wasteModel;
    public Page1()
    {
        InitializeComponent();

        //BackgroundImage = wasteModel.WasteMainBackground;

        ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.FromHex("#586d82");
        InfoImageButton.Clicked += InfoImageButton_Clicked;
    }

    private async void InfoImageButton_Clicked(object sender, EventArgs e)
    {
        await Navigation.PushAsync(new PageInfo());
    }
}
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="AppDemo.Page1"
         xmlns:vm="clr-namespace:AppDemo.ViewModels"
         NavigationPage.HasNavigationBar="True"
         BackgroundImage="{Binding WasteModel.WasteMainBackground}"
     >

MainPage code

<ListView x:Name="wastesListView"
              ItemsSource="{Binding Wastes}"
              HasUnevenRows="True" 
              Margin="10,20,5,150" 
              SeparatorVisibility="None"
              BackgroundColor="Transparent"

              >
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="3*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <ProgressBar x:Name="progressBar"
                                    Grid.RowSpan="2" Grid.Row="0" Grid.Column="0"
                                     BackgroundColor="Transparent"
                                     ProgressColor="#614c96"
                                     Progress="{Binding WasteCounter}"                                         
                                     />
                        <ImageButton x:Name="iconButton"
                                     Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" 
                                     WidthRequest="100"
                                     HeightRequest="100"
                                     Aspect="AspectFit"
                                     BackgroundColor="Transparent"
                                     Source="{Binding WasteIcon}"
                                     Command="{x:Binding Source={x:Reference wastesListView}, Path=BindingContext.NavigateCommand}"
                                     CommandParameter="{x:Binding .}">
                        </ImageButton>
                    </Grid>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
</StackLayout>

MainViewModel code:

    public class MainViewModel : BaseViewModel
{
    public WasteModel waste;
    readonly IPageServices _pageServices;
    readonly IWasteService wasteService;

    public ICommand NavigateCommand { get; }
    public MainViewModel(IPageServices pageServices)
    {
        this._pageServices = pageServices;

        Wastes = GetWastes();
        NavigateCommand = new Command(NavigateToNextPage);

    }


    public string WasteBackroundImage => waste.WasteMainBackground;
    public string WasteIcon => waste.WasteIcon;
    public double WasteCounter
    {
        get { return waste.WasteCounter; }
        set
        {
            if (WasteCounter != value) return;
            WasteCounter = value;
            OnPropertyChanged("WasteCounter");
        }
    }

    public ObservableRangeCollection<WasteModel> Wastes { get; }
    public ObservableRangeCollection<WasteModel> GetWastes()
    {
        var WasteList = new ObservableRangeCollection<WasteModel>()
        {
            new WasteModel()
            {
                WasteCounter=.2,    WasteIcon="cup.png",   WasteMainBackground="background1.png"
            }


        };
        return WasteList;
    }

    void NavigateToNextPage(object obj)
    {
        var page = new Page1();
        page.BindingContext = waste.WasteMainBackground;
        _pageServices.PushAsync(page);
    }

Again i would very appreciate for any help with this . Thank you in advance :smile:

ListView Localization

$
0
0

I have been localizing a Xamarin Forms app at work. It has been going exceedingly well and localizing with the RESX files is smooth and simple...

until I got to the one and only ListView in the app

The app has menu options to change the language on-the-fly. We are not relying on the culture info setting of the device. Localization is within the app only.

Example:
To assign localized button text I would use the button's x:Name and assign the resource
ie: HelloButton.Text = AppResource.HelloButtonText

I wanted to iterate through the ListView and change all the button, label and placeholder text to the current language on-the-fly. This is what I wanted to do:

foreach(var item in MyListView.Items)
{
Button helloButton = item.FindByName("HelloButton");
helloButton.Text = AppResource.HelloButtonText;
}

I read ListView doesn't implement IEnumerable or ICollection so the Items property does not exist.
So how to loop through a ListView to change all the buttons label text?

(Currently looking at a DataTemplateSelector class to build both a French and English data template and swap it out programmatically, but I'd rather not if there is another way)

Context menu

$
0
0
 public override bool CanPerform(Selector action, NSObject withSender)
        {
            if (action == new Selector("Action1") || action == new Selector("Action2") || action == new Selector("Action3"))
            {
                return true;
            }
            return false;
        }

selector action not catch copy, lookup,share. this reason not customize context menu. The customized menu adds up after these menus.
is this bug? or any solution?

Viewing all 91519 articles
Browse latest View live


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