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

client server address function best practice

$
0
0

I am creating an app that is not specific to one user or company, so say my app uses a companies api for a Management system & there can be many instances in different companies. So my app would be able to apply there endpoint or ip address. This is also an issue for when I am testing I constantly have to change my ip addresses as well for different locations.

So say my login screen has the usual Username & Password, i would also like to enter an URL so my the app can hit the clients server to get access to there data.

What are people's thoughts on this functionality?

I have also seen where the ip address is saved so on next login it can automatically hit that server then user can enter details.

So I am think a db that stores Connection instances so that people can move to different locations/branches and have a list of different Connections.cs (ie).
Probably assuming there is some sort of internet connection checking happens as well.
I am just new to mobile dev, and want to approach this type of implementation the best practice possible.

Thank you!
B


FlexLayout Improvements

$
0
0

I was hoping to use the new FlexLayout control to display data in a flowing grid (left to right and then down). The new control seems interesting but is missing some basic features and I was wondering if there are any thoughts on improving the control in upcoming releases.

I would suggest the following features and would hope that the community adds or votes on this discussion.

ItemsSource (bind a list of items to the layout)

DataTemplate

MaxRowsOrColumns. Set the maximum row or column count (depending on Direction) before another row/column is added.

Thank you.

How to resolve ArgumentException: Failed to parse PList data type

$
0
0

After updating Visual Studio to 15.6 today on my Windows PC, and updating Visual Studio and XCode on the Mac, I am getting the following when trying to build my app for iOS. Does anybody know how to resolve this?

AggregateException: One or more errors occurred.
MessagingRemoteException: An error occured on client Build490752 while executing a reply for topic xvs/Build/4.9.0.752/execute-task/MyApp.iOS/e164987002fIBTool
ArgumentException: Failed to parse PList data type:
ArgumentException: Must specify valid information for parsing in the string.

zoom and pan

$
0
0

is it possible to make zoom and the same time drag the image in xaml and cs

Xamarin.Firebase.Auth documentation?

$
0
0

Whenever I try and google documentation for this NuGet package, I just get references to the old component documentation. But since components are now deprecated, the link just goes to a generic page on migrating to NuGet packages. Anyway, is there some place I can find documentation for this package? Or is it like a nearly 1 to 1 correlation with the respective native iOS and Android API documenation provided by the Firebase docs? Mostly I'm looking for the one time set up stuff that I have to do to my project, stuff that would not be covered (obviously) by the Firebase docs. Thanks.

What is the best way to do video conferencing in Xamarin Forms?

$
0
0

I'm looking at how to do video conferencing in IOS and Android,

Is there any SDK to do this? Or should it be done natively on each plataform?

Which is the best route?

I searched in the forum, but found only very old answers. And nothing concrete about the operation.

If someone has done something like this, please share it with us.

Thank you all

Index '1' is greater than the number of rows '0'. (XF 240-Pre1 iOS)

$
0
0

Just updated to 240-pre1 and now I cannot add items to an observable collection bound to a ListView with Uneven Rows and Groups. Have only tried iOS so far.

ObservableCollection<Group> groupedItems = new ObservableCollection<Group>();
listView.ItemsSource = groupedItems;
                        Group group1 = new Group("Text", "Text2");
                        groupedItems.Add(group1);

                        Group group2 = new Group("Text", "Text2");
                        groupedItems.Add(group2);   ***** Crash here *********

The stack trace is emense. Here is the first portion.
" at Xamarin.Forms.Platform.iOS.ListViewRenderer.UpdateItems (System.Collections.Specialized.NotifyCollectionChangedEventArgs e, System.Int32 section, System.Boolean resetWhenGrouped) [0x0006b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:509 \n at Xamarin.Forms.Platform.iOS.ListViewRenderer.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\ListViewRenderer.cs:300 \n at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Core\\TemplatedItemsList.cs:758 \n at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnCollectionChangedGrouped (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000d5] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedItemsList.cs:785 \n at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e, System.Boolean fixWindows) [0x00008] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Core\\TemplatedItemsList.cs:962 \n at Xamarin.Forms.Internals.TemplatedItemsList2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedItemsList.cs:955 \n at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:233 \n at Xamarin.Forms.ListProxy+<>c__DisplayClass33_0.b__0 () [0x00018] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:206 \n at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x000a0] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:225 \n at Xamarin.Forms.ListProxy+WeakNotifyProxy.OnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00031] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ListProxy.cs:394 \n at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.18/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 \n at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.12.0.18/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 \n

Am I doing something wrong? Thanks.

How to create horizontal "listview" can select item

$
0
0

I created a custom scrollview based on the article below, but it is only viewable. I would like to create a "horizontal listview" or something like that, can select items such as a list of persons in which you can select the person to see details. Can anyone help me? Or is there any other way to create something like that? Sorry my bad english.
Here is the article I have referenced: http://www.fabiocozzolino.eu/a-little-and-simple-bindable-horizontal-scroll-view/

Thank in advanced.


How To Create Login

$
0
0

Hi,
how to create a login page using xaml and cs files and after successful login it will display either on top left corner the words "Hi, [insert the user's Name]" something like that

Populating ScrollView problem!

$
0
0

Hi guys!

i have a problem to add anything into the scrollview. if you cant find anything wrong in this code feel free to give me a lead! I get the following error = target of get_children is NULL (NULLRefrenceException)

.xaml file

<ContentPage >
   <ScrollView>
      <StackLayout x:Name="PostList">


      </StackLayout>
   </ScrollView>


</ContentPage>

.xaml.cs file

PostList.Children.Add(new Xamarin.Forms.BoxView { BackgroundColor = Color.Black });

Open my app from a url and read value from that url

$
0
0

Hi,

I want to open my app when tapping on a url and read the value appended to the url. For example, I need to get string "123" in my code by opening my app with url "myapp://open?code=123".

I add some code to manifest inside application tag :

<activity android:name="com.companyname.appname.MainActivity" android:label="appname">
        <intent-filter>
            <data android:scheme="https" android:host="appname" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
    </activity>

I am testing this feature by tapping a demo url from my phone. But always open google chrome when tapping the demo url.
Thanks in advance :)

If I paste something in an Entry, it doesn't fire Trigger

$
0
0

Hi guys,
I have an Entry with some Triggers. One of them is checking is an email is valid. The problem is that a user pastes an email, the Entry doesn't fire the Triggers.

How can I update an Entry in this case?

I tried to prevent Cut, Paste or Copy but it doesn't work.

iOS

[assembly: ExportRenderer(typeof(Entry), typeof(EntryCustomRenderer))]
namespace MyProject.iOS.Renderers
{
    /// <summary> 
    /// Entry extra renderer. 
    /// </summary> 
    public class EntryCustomRenderer : EntryRenderer
    {
        [...]

        public override bool CanPerform(ObjCRuntime.Selector action, Foundation.NSObject withSender)
        {
            if (action.Name == "paste:" || action.Name == "copy:" || action.Name == "cut:")
                return false;

            return base.CanPerform(action, withSender);
        }
    }
}

Android

Callback

namespace MyProject.Droid.Renderers
{
    public class Callback : Java.Lang.Object, ActionMode.ICallback
    {
        public bool OnActionItemClicked(ActionMode mode, IMenuItem item)
        {
            return false;
        }

        public bool OnCreateActionMode(ActionMode mode, IMenu menu)
        {
            return false;
        }

        public void OnDestroyActionMode(ActionMode mode)
        {
        }

        public bool OnPrepareActionMode(ActionMode mode, IMenu menu)
        {
            return false;
        }
    }
}

EntryRender

public class EntryCustomRenderer : EntryRenderer
{
    protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
    {
        base.OnElementChanged(e);
        [...]

        // prevent copy/paste
        Control.CustomSelectionActionModeCallback = new Callback();
    }
}

Thanks in advance

LoginFlow

$
0
0

I tried to follow the sample of Login created by xamarin how come my App bar(the top blue horizontal bar) is being doubled what I mean doubled is that there is another App bar on top how to make it only one App bar im using MasterDetailPage

XAML Label Text: Binding + DynamicResource (String Format?)

$
0
0

Hello,

is there a way to bind the Text Property (in XAML) of a Label to a Binding + DynamicResource? Maybe with string format?

for example I tried something like this:
<Label Text="{DynamicResource resource, Binding binding, StringFormat='Resource: {0} and Binding: {1}"} />
But one cannot declare a binding if a dynamic resource is set, same problem if trying it vice versa (eg. no dynamicresource if binding already set)

  • or with a value converter that returns the binding string to "binding string + dynamic resource"? (Creating a valueconverter for this seems too overwhelming)
  • in code this might work with string.Format(...)

Xamarin Forms licensing

$
0
0

Hi,
Is it possible to develop a payment app(using an Open source platform) on Visual Studio Community (Forms)?
This is a small team of developers, but i´m not sure if it´s possible to keep it Open source once we enter in the world of Xamarin


MapClick

$
0
0

What is the best way to handle a simple map click using a custom renderer for android ? I'm trying to simply subscribe to MapClick event, maybe i'm missing something because that does'nt works.

Thanks

How to hide the title bar in a MasterDetailPage.Master

App crashing when listview scrolling

$
0
0

Recently I just implemented a listview with a custom cell and a custom selector in Xamarin.Forms, my custom cell have two text binding properties and the selector just pick the correct custom cell based on a condition, I fill the listview with several amount of data (+100), it looks like it works correctly, but when I scroll down/up the screen, the app just crashes. I have tried to use CachingStrategy with RecycleElement and RetainElement but the problem remains. Does anyone have the same issue? I'm stuck.

dropdown list getting hide

$
0
0

I developed a dropdown (ComboBox) Custom Control using three different controls Label (Which will show the Title), and Image (To show dropdown Image) and a List (To display content of drop down) and packaged as NuGet to use in my actual app.
Now, when I am using this dropdown inside the Stack Layout the List of Dropdown is getting hide below the other control. So to resolve that issue i am currently using dropdown control inside Absolute layout which is working fine but I am feeling its not a standard or good approach, Can someone guide me what will be the best approach to use my custom drop down control without absolute layout so that it will not get hide below any other conntrol

Image container

$
0
0

Is it possible to use an image container like div or iframe just like in html?

Viewing all 91519 articles
Browse latest View live


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