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

买美国WM文凭毕业证成绩单加Q微信9105133威廉玛丽学院毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证College of William & Mary

$
0
0

买美国WM文凭毕业证成绩单加Q微信9105133威廉玛丽学院毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证College of William & Mary


买美国CWRU文凭毕业证成绩单加Q微信9105133 华盛顿天主教大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Case Western Reserve University

$
0
0

买美国CWRU文凭毕业证成绩单加Q微信9105133 华盛顿天主教大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Case Western Reserve University

买美国SMU文凭毕业证成绩单加Q微信9105133南卫理公会大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Southern Methodist University

$
0
0

买美国SMU文凭毕业证成绩单加Q微信9105133南卫理公会大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Southern Methodist University

x:Array of OnPlatform

$
0
0

Is it would works?

      <x:Array Type="{x:Type x:String}">
       <OnPlatform x:TypeArguments="x:String">
         <On Platform="Android, iOS">My string value for these platforms</On>
        </OnPlatform>
      </x:Array>

because I'm gettting the following error:

{System.InvalidCastException
  at (wrapper managed-to-native) System.Array.SetValueImpl(System.Array,object,int)
  at System.Array.SetValue (System.Object value, System.Int32 index) [0x00057] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
  at System.Array.System.Collections.IList.set_Item (System.Int32 index, System.Object value) [0x00000] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
  at Xamarin.Forms.Xaml.ArrayExtension.ProvideValue (System.IServiceProvider serviceProvider) [0x0003e] in D:\a\1\s\Xamarin.Forms.Xaml\MarkupExtensions\ArrayExtension.cs:30 
  at Xamarin.Forms.Xaml.ArrayExtension.Xamarin.Forms.Xaml.IMarkupExtension.ProvideValue (System.IServiceProvider serviceProvider) [0x00000] in D:\a\1\s\Xamarin.Forms.Xaml\MarkupExtensions\ArrayExtension.cs:37 
  at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, Xamarin.Forms.Xaml.INode parentNode) [0x00341] in D:\a\1\s\Xamarin.Forms.Xaml\CreateValuesVisitor.cs:104 
  at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x000ac] in D:\a\1\s\Xamarin.Forms.Xaml\XamlNode.cs:149 
  at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00044] in D:\a\1\s\Xamarin.Forms.Xaml\XamlNode.cs:143 
  at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00079] in D:\a\1\s\Xamarin.Forms.Xaml\XamlNode.cs:145 
  at Xamarin.Forms.Xaml.RootNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00044] in D:\a\1\s\Xamarin.Forms.Xaml\XamlNode.cs:200 
  at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydrationContext visitorContext) [0x00054] in D:\a\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:139 
  at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml) [0x00058] in D:\a\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:87 
  at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (TXaml view, System.String xaml) 

Is Xamarin compatible with a WCF and NetTcpBinding ?

$
0
0

Hi, I have a Xamarin app consuming a WCF. It works perfectfly with HttpBinding. Is it possible to use a NetTcpBinding also ?

What is equivalent to LayerDrawable.SetLayerInsetRight in versions before 23?

$
0
0

I am developing custom renderer for android and using LayerDrawable.SetLayerInsetRight method and works fine but that method is added in API level 23 and I am wondering what is equivalent to it in versions before 23?

Cache used by FFImageLoading and Xamarin.Forms.Image/UriImageSource?

$
0
0

In my project I need to use both FFImageLoading and Xamarin.froms.Image since I am using Mr.Gestures (And that is available only for Xamarin.forms as far as I know). On the start of the app I would like to store all images that will be used in cache.

Will I have to instantiate both a CachedImage and a Xamarin.Froms.Image like this:
uriImageSource.Uri = new Uri(imageUrl); Xamarin.Forms.Image image.Source = uriImageSource; // ensuring image is truly downloaded. FFImageLoading.Forms.CachedImage cachedImage = new FFImageLoading.Forms.CachedImage() { Source = imageUrl};

...To download the images to respective cache. Or would it be enough to download it once - with a Xamarin.Forms.Image, or cacheImage. Can FFImageLoading cachedImage load an image that was downloaded to cache by UriImageSource (and vice versa). The images are needed to be displayed anywhere both with CachedImage and Xamarin.Forms.Image.

On a side not I also wonder about the first line - setting a UriImageSource object to url - if is enough to download the image? Or if it also has to be set to an image object (second line) as well to be downloaded.

why should we use OpenJdk? Slow?

$
0
0

I recently changed from java jdk to open jdk. I dont know even the reason why should i do it but just wanted to try. debugging became very slow for me. Is there any good reason why we should use open jdk instead java jdk? Does anyone else experience slow debugging?


Lorem Ipsum when a new archive is made

$
0
0

Whenever i create a new archive my app i get lorem ipsum text in comment section. when i close visual studio for mac ,then it is gone.

  1. Why i am getting lorum ipsum text on first time?
  2. Is there a place to provide something meaningful for each build in this comment section?
  3. is it a bug in vs that on first time i am getting some random text while after restart it is gone?

How to resolve Localisation Exception Sequence contains no matching element

$
0
0

Hi,
I wanted do localisation for 3 language i.e English (UK), Chineese, Portuguese .Its working for chineese and Portuguese ,when i click on English (UK) it shows Exception like "Sequence contains no matching element" Please help.What can be done

Setting culture in app causing serialization error at API level

$
0
0

My mobile language(culture) is set to NL in which decimal values are represented with "," rather than " ."
Am sending some decimal values to API which are calculated in backend and on confirming are set to usual decima values i.e 0.434 etc .
However the APi returns me the response

{"ResponseStatus":{"ErrorCode":"SerializationException","Message":"Unable to bind to request 'Report'","Errors":[{"ErrorCode":"SerializationException","FieldName":"AverageAccelerationUp","Message":"'0,000' is an Invalid value for 'AverageAccelerationUp'"},{"ErrorCode":"SerializationException","FieldName":"ObservedNominalSpeedUp","Message":"'0,000' is an Invalid value for 'ObservedNominalSpeedUp'"},{"ErrorCode":"SerializationException","FieldName":"DoorOpeningTime","Message":"'0,8' is an Invalid value for 'DoorOpeningTime'"}]}}

Works fine whien the culture is set to en

UWP ToolbarItem TextColor

$
0
0

Hi

I have a Xamarin.Forms app targeting iOS, Android and UWP. When I add some toolbaritems (secondary) and start the UWP on my Windows10 machine. The menu appears (when I cklick on the 3-dots-button), but the text is in white color.

This is because my ApplicationBar (with the title) has a blue background color and a white text.

I know, I can't change the color directly on the toolbaritem. But I thought about a renderer...

But how? Can anybody help me out?

My Renderer:

public class UwpBasePageRenderer : PageRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<Page> e)
        {
            base.OnElementChanged(e);

            if (e.OldElement != null || Element == null) return;

            Loaded += OnLoaded;
        }

        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            var mypanel = ContainerElement as Panel;

            // Something like this...
            // mypanel.ApplicationBar.TextColor = Black;

        }
    }

How to create shared frame layout to reuse it in other xaml pages!

$
0
0

I want to create a shared control to use this structure of frame inside my other xaml files:

<Frame
Padding="1"
BackgroundColor="Black
CornerRadius="7"
HasShadow="False">

                <Frame
                    Margin="2"
                    Padding="5"
                    BackgroundColor="White"
                    CornerRadius="5"
                    HasShadow="False">
    </Frame>

//My Other xaml control goes here.

</Frame

My doubt is how i can create this structure of frames in seperate xaml file to reuse it other xaml files!!

Xamarin Forms Listview Example

$
0
0

I am fairly new to xamarin and I am trying to create a list view, using xamarin forms and mvvmcross.
I am trying to follow a tutorial I found online, I can't give the link yet.
This gave an error because he, set the binding context to his viewmodel.
But my viewmodel has parameters, I used a prebuilt template, and I can't pass them from the page code.

His code:

public partial class CarsPage : ContentPage {

    public CarsPage() {

        InitializeComponent();

        // Connecting context of this page to the our View Model class
        BindingContext = new CarsViewModel(); // it crashes on this line in my code.
    }

}

My viewmodel code:

    private MvxObservableCollection<VoorwerpItem> voorwerpen;
    public MvxObservableCollection<VoorwerpItem> Voorwerpen
    {
        get { return Voorwerpen; }
        set
        {
            Voorwerpen = value;
        }
    }


    public MainViewModel(IMvxNavigationService navigationService, IMvxLogProvider mvxLogProvider, Services.IAppSettings settings, IUserDialogs userDialogs)
    {
        this.navigationService = navigationService;
        this.mvxLogProvider = mvxLogProvider;
        this.settings = settings;
        this.userDialogs = userDialogs;

        this.log = mvxLogProvider.GetLogFor(GetType());

        Voorwerpen = new MvxObservableCollection<VoorwerpItem>()
        {
             new VoorwerpItem() { Name = "Fiets E", Type = "fiets" }
        };

    }

I have search a lot online trying to find a example of a listview with forms and mvvmcross that works.
However I have been unsuccesfull so far.
How can I have a listview with mvvmcross?
Any example or derication is much appreciated.
I am sorry for not being able to give an better question.

Persisting data locally (Device cache)

$
0
0

Hi,

Is there a way how you can persist some trivial data locally, such as personId or cartvalue so that when the app is switched off, the value can be retrieved again?

I have been playing around with Application.Current.Properties ["ProfileId"] but the value is lost once the application is closed.

Thanks
Shaun


How to make a multi-steps registration page with multi ContentView?

$
0
0

In the app I'm working on, there's a multi-steps registration, 4 steps:
to accomplish it, I'm thinking to have a single page to host a content view of the registration step, when it passes the validation requirements I remove it and inject the next content view.

This is an example to simplify my need:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:XamApp"
             x:Class="XamApp.MainPage">

    <StackLayout>
        <local:Register1/>
    </StackLayout>
</ContentPage>

and the Register1 looks like this:

    <ContentView xmlns="http://xamarin.com/schemas/2014/forms" 
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:XamApp"
                 x:Class="XamApp.Register1">
        <ContentView.Resources>
            <ResourceDictionary>
                <local:IntToBoolConverter x:Key="intToBool"/>
            </ResourceDictionary>
        </ContentView.Resources>
        <ContentView.Content>
            <StackLayout>
                <Label Text="Page 1" FontSize="Large"/>
                <Entry x:Name="txtName" Placeholder="Name"/>
                <Button Text="Next" IsEnabled="{Binding Source={x:Reference txtName},
                                        Path=Text.Length,
                                        Converter={StaticResource intToBool}}"
                        Clicked="Button_Clicked"/>
            </StackLayout>
        </ContentView.Content>
    </ContentView>

There are two problems:

1- I don't know how to handle the data (view model) between steps, to have only one object through all steps (Shall I use DI? if yes , then how in MVVMLight?)
2- How to to inject the content view into the main registration page dynamically in an MVVM fashion ?

Generate token from credit card Stripe.Net

$
0
0

Since Stripe.Net doesn't work anymore in the PCL side, we need to use DependencyServices<>. However, when I'm trying to generate a token from credit card information, it seems like... It's missing in the doc, I just can't find anything on the web or in the doc, is that normal?

I would like to achieve something like that :

public string CardToToken()
{
    var card = new Card()
    {
        Number = "4242424242424242",
        ExpiryMonth = 12,
        ExpiryYear = 16,
        CVC = 123
    };

    try
    {
        token = await Stripe.CreateToken(card);
    }
    catch (Exception ex)
    { 
        return null;
    }

    return token;
}

So then I can just simply send it to my server. Any idea to achieve something that easy? That's the last point I need to finish for my project...

This example is in my Android side.

Thank for any help...

Learning Resources for MVVMLight with Xamarin.Forms?

$
0
0

I'm looking for good resources and documentation for using MVVMLight with Xamaring.Forms, but I'm struggling, there're few of them and they don't fill the gab and the official web site seems outdated. We are already using it in our projects, but there's a mess in the code due to the lack of knowledge of how to use MVVMLight and its locator and IoC container. I'm thinking to migrate to MVVM Cross because it has a very nice documentation. but I don't want to take this step before knowing more about the library we already using and I think it's powerful and suit our needs.
any help?

Unable to build any Xamarin.Forms app

$
0
0

For a few days I cannot build anymore. Even a new empty Forms project (the one that displays « Welcome to Xamarin.Forms! ») displays the LaunchScreen.storyboard tab and 3 error messages:

ibtoold[8369:648873] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SimServiceContext serviceContextForDeveloperDir:error:]: unrecognized selector sent to class 0x11396dc00'

It looks like this has begun after Xcode 10.0 was installed on my Mac (High Sierra 10.13.6, no pending update in the AppStore). I use Visual Studio Community 7.6.6 (build 17), no pending update in the stable channel. I cannot work anymore.

Any idea how to progress?

Button text inside a Grouped Listview header is not binding to group property.

$
0
0

Hi I am trying to dynamically changed the button text inside Groupheader in GroupListview but its always empty. Below is the code snippet.

                      <Button  Grid.Row="0" Grid.Column="3" Text="{Binding **ButonText**}" WidthRequest="175" 
                                      BackgroundColor="White" 
                                      Command="{Binding AddImages}" 
                                      CommandParameter="{Binding Source={x:Reference Item}, Path=BindingContext}"
                                      BindingContext="{Binding Source={x:Reference GroupedView},Path=BindingContext}"      />  

But when i remove the binding Context from Button than Text is displayed properly but than Command does not work.

Thanks in Advance.

Viewing all 91519 articles
Browse latest View live


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