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

How to use RowDefinitionCollection to dynamically add BoxViews to a Grid

$
0
0

Hi,

I am very new to Xamarin and C# so this question may be silly. My aim is to create a GridLayout that displays images in 3 columns similar to Instagram as well as a search bar above it. For now I am using an integer value to specify how many BoxViews should appear on screen. I have created a grid for a search bar and a grid for the images in xaml and I am using C# for the behaviour of the image grid. The issue is that only one BoxView is appearing.

Thanks :)

XAML code


<Grid.RowDefinitions>


</Grid.RowDefinitions>

    <!--Where the search bar will go-->
    <BoxView BackgroundColor="Aqua" Grid.Row="0"/>

        <SearchBar ></SearchBar>

        <!--Where the images will go-->
    <BoxView BackgroundColor="Gray" Grid.Row="1"/>
    <Grid x:Name="imageGrid" RowSpacing="0" Grid.Row="1">

    </Grid>

</Grid>

C# code

public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();

        int colMaximum = 3;
        int numberOfImages = 15;

        //To add three columns
        for (int i = 0; i < colMaximum; i++)
        {
            imageGrid.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = new GridLength(120, GridUnitType.Absolute)
            });
        }

        //To add an array of rows
        imageGrid.RowDefinitions = new RowDefinitionCollection();

        for (int myCount = 0; myCount <= numberOfImages / colMaximum; myCount++)
        {
            imageGrid.RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(120, GridUnitType.Absolute)
            });

            //To add a new box view for each
            for (int newcol = 0; newcol <= colMaximum; newcol++)
            {
                for (int newrow = 0; newrow <= numberOfImages / colMaximum; newrow++)
                {
                    imageGrid.Children.Add(new BoxView() { BackgroundColor = Color.Red });
                }
            }
        }
    }
}

}


facebook Login with Xamarin.Forms: You are not logged in. Please log in and try again.

$
0
0

Hi All, I am implementing Facebook Login in Xamarin.Forms. I am using Xamarin.Auth to achieve this. Everything is set up but I am getting this error when app launches. Find below screenshots for error and My facebook App settings. Help please.





Listview on iOS 9 not filling screen width - issue with custom ViewCell

$
0
0

In iOS8 a simple Listview would have separator lines that filled the width (especially in landscape mode)
In iOS9 the Listview separator lines no longer fill the full width on a landscape iPad mini.

(first attached image is a simple list view with the ItemsSource set to an array of 3 strings)

This causes me a problem as I have custom ViewCells and they are left aligned on the screen and so appear out of alignment with the separator lines.

(see second attached image. I've used the code fragment below to have a custom ViewCell)

Here is a very short sample program.
Note in the custom ViewCell I don't bother to get the proper list contents. For now I just hard code a label which is enough for now.

Any ideas on how to fix this layout so it looks like iOS8 did with seperators filling the screen.

Thanks

UPDATE... Tried XamStudio Alpha (with Xam.iOS 8.13.xx) and Beta (with Xam.iOS 9.xx) and XamForms 1.4.4 and 1.5.0. Nothing helped.

    using System;

    using Xamarin.Forms;

    namespace ListViewBug2
    {
        public class App : Application
        {
            public App ()
            {

                ListView listview = new ListView();
                listview.ItemsSource = new String[]{"one","two","three"};
                listview.ItemTemplate = new DataTemplate(typeof (CustomCell));


                // The root page of your application
                MainPage = new ContentPage {
                    Content = new StackLayout {
                        VerticalOptions = LayoutOptions.Center,
                        Children = {
                            new Label {
                                XAlign = TextAlignment.Center,
                                Text = "Welcome to Xamarin Forms!"
                            },
                            listview,
                        },
                        Padding = new Thickness(0,20,0,0),
                    }
                };
            }

        }

        public class CustomCell : ViewCell {
            // Constructor
            public CustomCell() {
                Label myLabel = new Label();
                myLabel.Text = "custom list item";  // Hard code for now
                View = myLabel;
            }
        }
    }

ContextAction MenuItem icon not showing in iOS

$
0
0

I'm developing PCL based solution using Xamarin.Forms. I added ContextAction to listview. I have delete MenuItem with trash icon in ContextActions. The trash icon not showing in iOS not platform.But in android its working fine. the iOS not support MenuItem icon?
My XAML code is

        <ViewCell.ContextActions>
                <MenuItem Text="Edit" x:Name="MenuEdit" />
                <MenuItem Clicked="OnDeleteMenu" Icon="dustbin.png" Text="Delete" IsDestructive="true" CommandParameter {Binding .}" />
    </ViewCell.ContextActions>

i am using latest Xamarin.Forms.Please Anyone give the solution

Thanks,
Mahabaleshwar Hegde

Multi Select Inside a ListView using Xamarin Form.

$
0
0

Dear All,
We Want to Select Multiple Item Inside a List View and Save this Data. How to achieve this. please Suggest any Example in Xamarin Form.

Implementing INotifyPropertyChanged in xamarin.forms

$
0
0

I am doing a cart in xamarin.forms, in my cart page there is a list view with data. Each of the cell containing a button to select the count of item and amount. In the cart view there is a label for grant total, my problem is the grant total is not updating while deleting a item from the cart . The calculation method is on item adding view cell . i know that i need to implement inotifyproperty for this, but i don't know how to do it

I have a base view model which inherit inotifyproperty which contain the event also
public class BaseViewModel : INotifyPropertyChanged{ private double _price; public double Price{ get { return _price ; } set{_price =value;OnPropertyChanged("Price");} } protected virtual void OnPropertyChanged(string propertyName){ if (PropertyChanged != null { PropertyChanged(this, new PropertyChangedEventArgs(propertyName));}}
and my view model
public BaseViewModel(){ App.Instance.ViewModel = this; TempList = TempList ?? new ObservableCollection<cm_items>(); this.Title = AppResources.AppResource.Cart_menu_title; this. Price = CartCell.price;}
my calculation method
public static double Calculate_price(){ App.Instance.ViewModel.Price = price; price = 0; var s = App.Instance.ViewModel.TempList; var itm_cnt = App.Instance.ViewModel.TempList.Count; for (int i = 0; i < itm_cnt; i++){ var val1 = s[i].cnt; var val2 = s[i].item_price; price += Convert.ToDouble(val1 * val2); } return pri

Cannot debug in UWP only

$
0
0

Hi, I cannot find a solution for that. I got a small xamarin forms project and I can set breakpoints and debut in IOS simulator and Android simulator. But If I choose UWP-x86-Local Machine, the project start but all my breakpoints are ignored (no symbols have been loaded for this document). I delete the BIN and OBJ folder of my UWP project, clean and rebuild, same problem....

I am on VS2017 Xamarin.forms 2.4

Any suggestion?

Does Device.StartTimer affect the phone battery and does it work in the background of iOS?

$
0
0

I use the following Device.StartTimer(TimeSpan.FromSeconds(30), IsActivityTimerReset); in our Xamarin forms app. It's my understanding that when an app is put into the background on Android that the timer still runs, BUT when an app is put into the background on iOS the timer will stop running. Is that correct? Also when it runs in the background how much of a "hit" is it on the phone's battery. Probably hard to tell but all the call does is confirm the user is still logged in and if not it re-authenticates the user. It's basically a keep me logged in feature. Thanks for any information you can provide.


xamarin forms DisplayAlert

$
0
0

hey developer.

i think i have an easy problem but have no idea how to do it

this is my code. (my question follows)

    async void OnSelection(object sender, SelectedItemChangedEventArgs e)
    {
        if (e.SelectedItem == null)
        {
            return;
        }
        var action = await DisplayAlert("Alert!", "What would you like to do?", "To Profile", "Cancel");

    }

how do i navigate the user to a different scene when he presses "To profile".

thank you in advance!

Setting Width to * cause error Input string was not in a correct format

$
0
0

I was having this page working yesterday, but now whenever I build the solution in VS, I got this error:

Input string was not in a correct format

it disappears when I replace every * with a numeric value in every occurrence of:
<ColumnDefinition Width="*"/>

How to reload a page in Xamarin.Forms

$
0
0

In my app, I have a page, and first, before the page appears, I check if there's an internet connection(because I need to download some data from a server), and if there's no internet connection, I create a button and a label(inside of a ContentPage), which can be pressed when the internet connection will be available (to download what I need). I want to refresh the entire page, and delete the button and the label with "No internet connection", and create dynamically my Carousel pages.

When the button is pressed I send a Message like this:
MessagingCenter.Send(this, "RefreshSchedulePage");
and I'm subscribing like this:
MessagingCenter.Subscribe<SchedulesPage>(this, "RefreshSchedulePage", async (sender) =>
{
Navigation.InsertPageBefore(new SchedulesPage(), this);
await Navigation.PopAsync();
});

The problem is that, my page has some some sort of refresh, but it displays a white page (without the button and the label) instead of what is supposed to display. When I press click on the menu and I reenter the Schedules Page, it will display what I need, but I want this to be done automatically, without reaccessing that page.

XAML Preview is not working when styles are declared in C# code

$
0
0

I've declared a set of global styles in the App.cs constructor like this:

var signUpEntryStyle = new Style(typeof(Entry)) {
    Setters = {
        new Setter { Property = Entry.HeightRequestProperty, Value = 40 },
        new Setter { Property = Entry.PlaceholderColorProperty, Value = SignUpColors.BlueCurious },
        new Setter { Property = Entry.HorizontalOptionsProperty, Value = LayoutOptions.FillAndExpand }
    }
};

Resources = new ResourceDictionary();
Resources.Add("SignUpEntryStyle", signUpEntryStyle);

But when I open a XAML page that uses this style, the XAML previewer shows the message: An exception occurred while rendering the control, explaining that it couldn't find the StaticResource. However, the code is compiled successfully and the app runs fine.

How can I fix this problem when the XAML code doesn't recognize the styles defined in C# code?

[Android] Can't use Theme

$
0
0

When I try to set a Theme like this:

<style name="Theme.Splash" parent="android:Theme">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowNoTitle">true</item>
</style>

I get the following exception in my main Activity at LoadApplication(new App());:

[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] System.NullReferenceException: Object reference not set to an instance of an object
[MonoDroid] at Xamarin.Forms.Platform.Android.Platform.UpdateActionBarBackgroundColor () <IL 0x00010, 0x00085>
[MonoDroid] at Xamarin.Forms.Platform.Android.Platform.set_CurrentNavigationPage (Xamarin.Forms.NavigationPage) <IL 0x000f2, 0x0057f>
[MonoDroid] at Xamarin.Forms.Platform.Android.Platform.UpdateActionBar () <IL 0x0006a, 0x0023f>
[MonoDroid] at Xamarin.Forms.Platform.Android.Platform.SetPage (Xamarin.Forms.Page) <IL 0x000c0, 0x003df>
[MonoDroid] at Xamarin.Forms.Platform.Android.FormsApplicationActivity.InternalSetPage (Xamarin.Forms.Page) <IL 0x000be, 0x003d7>
[MonoDroid] at Xamarin.Forms.Platform.Android.FormsApplicationActivity.SetMainPage () <IL 0x0000c, 0x0004b>
[MonoDroid] at Xamarin.Forms.Platform.Android.FormsApplicationActivity.LoadApplication (Xamarin.Forms.Application) <IL 0x0002e, 0x0014b>
[MonoDroid] at Project.Android.MainActivity.OnCreate (Android.OS.Bundle) [0x00036] in e:\Eigene Datein\Development\Apps\Project\Android\MainActivity.cs:34
[MonoDroid] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/1353/86274adf/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2380
[MonoDroid] at (wrapper dynamic-method) object.165b91f2-2116-4c6b-87e4-833b72fcb287 (intptr,intptr,intptr) <IL 0x00017, 0x0001f>
[mono]
[mono] Unhandled Exception:
[mono] System.NullReferenceException: Object reference not set to an instance of an object
[mono]   at Xamarin.Forms.Platform.Android.Platform.UpdateActionBarBackgroundColor () [0x00000] in <filename unknown>:0
[mono]   at Xamarin.Forms.Platform.Android.Platform.set_CurrentNavigationPage (Xamarin.Forms.NavigationPage value) [0x00000] in <filename unknown>:0
[mono]   at Xamarin.Forms.Platform.Android.Platform.UpdateActionBar () [0x00000] in <filename unknown>:0
[mono]   at Xamarin.Forms.Platform.Android.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x00000] in <filename unknown>:0
[mono]   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.InternalSetPage (Xamarin.Forms.Page page) [0x00000] in <filename unknown>:0
[mono]   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.SetMainPage () [0x00000] in <filename unknown>:0
[mono]   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.LoadApplication (Xamarin.Forms.Application application) [0x00000] in <filename unknown>:0
[mono]   at Project.Android.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00036] in e:\Eigene Datein\Development\Apps\Project\Android\MainActivity.cs:34
[mono]   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/1353/86274adf/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2380
[mono]   at (wrapper dynamic-method) object:165b91f2-2116-4c6b-87e4-833b72fcb287 (intptr,intptr,intptr)
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
[mono-rt]   at Xamarin.Forms.Platform.Android.Platform.UpdateActionBarBackgroundColor () [0x00000] in <filename unknown>:0
[mono-rt]   at Xamarin.Forms.Platform.Android.Platform.set_CurrentNavigationPage (Xamarin.Forms.NavigationPage value) [0x00000] in <filename unknown>:0
[mono-rt]   at Xamarin.Forms.Platform.Android.Platform.UpdateActionBar () [0x00000] in <filename unknown>:0
[mono-rt]   at Xamarin.Forms.Platform.Android.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x00000] in <filename unknown>:0
[mono-rt]   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.InternalSetPage (Xamarin.Forms.Page page) [0x00000] in <filename unknown>:0
[mono-rt]   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.SetMainPage () [0x00000] in <filename unknown>:0
[mono-rt]   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.LoadApplication (Xamarin.Forms.Application application) [0x00000] in <filename unknown>:0
[mono-rt]   at Project.Android.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00036] in e:\Eigene Datein\Development\Apps\Project\Android\MainActivity.cs:34
[mono-rt]   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/1353/86274adf/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2380
[mono-rt]   at (wrapper dynamic-method) object:165b91f2-2116-4c6b-87e4-833b72fcb287 (intptr,intptr,intptr)

Tested on emulator Android 4.1.1 with newest Xamarin.Forms.

Realm + Listview with caching strategy issue ?

$
0
0

Hello everyone,

I recently encountered an issue with a simple xamarin.forms app (iOS only for now), using Realm as local database.

I created a page with a listview (with caching strategy to RecycleElement) displaying a list of RealmObject. Everything was fine until i put a delete context actions on the cell of my listview.

The problem was : When i deleted an item, then i added a new one:

  • The displayed informations in the cell was from the deleted item
  • I couldn't click on it and go to the detail page because of this error : "attempted to access detached row".

I struggled to find a solution, i even found a bugzilla from 2016 about it and heard they fixed it.

Then i tried to remove the caching strategy from the listview and come back to the default one (RetainElement). And the problem disappeared.

So i just wanted to share that for everyone who has or will struggle with this. And i've some questions:

  • Is this issue is not one and should error due to the Recycle Strategy ?
  • Is this a Realm or a Xamarin issue ?
  • Can this be avoid with another way ?

Thanks,

Best regards,

Armand

Offline Files synchronization with Xamarin forms and Azure Cloud

$
0
0

Hi, I explain my situation please recommend me some method. I'm creating an offline sync app using Azure as cloud and xamarin forms.

Aim of App:

  1. Capture an image, writing description for an image
  2. Storing it in the local database and when the internet is available it should sync it with Azure SQL database.

Things I have done:

  1. I'm using IMobileServiceSyncTable which saves a record locally without image and if the internet available it syncs local records with Azure SQL database table. This works fine.

Problem which I'm facing:

  1. I did some research and found a library Microsoft.Azure.Mobile.Server.Files which links images or files with a record and this library sync both images or files in Azure blob storage and description of the image in SQL Table. But we can't achieve it. Facing many errors. I think this library was deprecated

Others Recommendations

  1. Using different library to store images to blob storage and Can insert URL in SQL database

What's your suggestion? Thank in Advance


Customize an autocomplete viewcell

$
0
0

I am trying to find a way to build a custom autocomplete dropdown using a custom renderer, and the requirements are that it displays an image and a label. For the time being I am only building for android and in the near future I will be building it for iOS.

On Android, I created a custom renderer that uses a MultiAutoCompleteTextView. I noticed that there is a method called Adapter.SetDropDownViewResource(). Is there anyway I can get a DataTemplate from the resource dictionary and get its id? I have looked at the source code on github but couldn't figure out how the resource dictionary is implemented on each platform.

Could not retrieve image or image data was invalid

$
0
0

I am getting images using an api and displaying in android. Now I have done Login operation using Third party authentication in my web project so project url has changed. Protocol become http to https. so for https protocol i am not able to display that images. What should i do..? Is there any settings in Xamarin form project..?

Can I use the C# generated in PaintCode in a Xamarin.Forms application?

$
0
0

I wanted to make sure before I start implementing an application in Xamarin.Forms that I can use PaintCode for the image assets. I know that PaintCode can be used with Xamarin.iOS and Xamarin.Android projects but I am having a hard time finding anything regarding Forms with PaintCode.

Thanks!

SIGABRT while debugging async methods

$
0
0

These methods used to work fine, but iOS rejected our latest App version because an unspecified error.

While debugging, they work fine, unless you go step by step after a breakpoint. After said methods finish, we get this exception:

´=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================´

We cannot progress and send the app to the store unless this gets corrected.

A brief example of one of our async methods:

async Task chargeLists () {
//Hide main screen
scroll.IsVisible = false;
//Show hidden screen with an ActivityIndicator and a "Loading" text
overlay.IsVisible = true;
await Task.Run (() => {
//Do something while thinking
});
//Hide creen with an ActivityIndicator
overlay.IsVisible = false;
//Show main screen
scroll.IsVisible = true;
}

This method is used in the first screen and is called by:

protected override async void OnAppearing () {
try {
await chargeLists ();
base.OnAppearing ();
} catch (Exception ex) {
Debug.WriteLine (string.Format ("Error: {0}", ex.Message));
}
}

protected override async void OnDisappearing () {
try {
await chargeLists ();
base.OnDisappearing ();
} catch (Exception ex) {
Debug.WriteLine (string.Format ("Error: {0}", ex.Message));
}
}

Please and thank you for your help.

Performance and layout in ListView with DataTemplate containing images

$
0
0

Hi everyone,

I’m currently making an app for iOS and Android using Xamarin Forms. The whole app is working fine except one menu which is giving me some hard time. It’s a list of pictures, shown in a card view style, with a title and a text. Nothing really crazy.
The goal is to get this (it's a screenshot from my app using random pictures). I just registered to the forum so I can't post links but it's there if you remove the spaces :
us.v-cdn.net/5019960/uploads/editor/e8/vnuwb14gedoy .jpeg

Doing this menu, I faced many problems. Every time I tried a new approach, I faced new problems.

Performance :
On iOS, my list view is fine, and never lags, even with many pictures (approximately 30 right now, but I plan to add more). But on Android, it starts to lag and the picture stop showing after I add "too many" (more than 10 is enough to have the menu completely not working). The pictures are embedded in the app, I thought maybe reducing size would help. I've made them "800" max (height or width) but that didn't help. I then thought that the layout was "too complicated". I made a test with a ListView containing only this in the data template :

<StackLayout Orientation="Vertical">
       <Image HorizontalOptions="Fill" Source="{Binding ImageSource}" Margin="0" Aspect="AspectFit"/>
</StackLayout>

And it still lags.. I guess that the layout is not an issue. So my question is : is really Android not capable of showing a list of 10/20 pictures side by side using a data template ?!
I've then tried using a third party (FFImageLoading). I have better results. But it's completely destroying the layout on iOS...

Bugs
I have many bugs (render bugs). I tried to solve all of them but still, in that screenshot above, there are already 2 I can see directly :

  • Title 3 is fine, when Title 4 is few pixels above the picture when it shouldn't
  • The place reserved for the description is bigger (2/3 lines) when it should be like the description of image 4

Layout
How I did, and 2 main ways I tried :
The current way (from the screenshot) is this :

<Frame Style="{StaticResource CardStyle}" Padding="0">
    <StackLayout>
        <Image HorizontalOptions="Fill" Source="{Binding ImageSource}" Margin="0" Aspect="AspectFit"/>
        <Frame HasShadow="false" Padding="0" Margin="0,-50,0,0" HeightRequest="45" CornerRadius="0" BackgroundColor="{StaticResource TranslucidFrameBackgroundColor}"
               HorizontalOptions="FillAndExpand">
            <Label Text="{Binding Title}" Margin="10" Style="{StaticResource LightLabelStyle}" FontSize="18" VerticalTextAlignment="Center"/>
        </Frame>
        <Label Text="{Binding Text}" Margin="5"/>
    </StackLayout>
</Frame>

I hate the "-50" margin which I had to put on the title's frame. That's why I sometimes get few pixel up or down and it's not always perfectly aligned with the photo.
I can't explain myself why the description (last label) is not always having a perfect size (or at least always the same, when the text is the same)...

Of course you will say "you should use a Grid and not a StackLayout, the render will be better, you won't need the -50, and the performance is better with Grid than StackLayout when you use images on Xamarin" (I read that everywhere in the forum at least).
Well, guess what :smiley: that's what I did first and it was a disaster !

I give you the code I used :

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

    <Image Grid.Row="0" HorizontalOptions="Fill" Source="{Binding ImageSource}" Margin="0" Aspect="AspectFit"/>
    <Frame Grid.Row="0" VerticalOptions="End" HasShadow="false" Padding="0" Margin="0" HeightRequest="45" CornerRadius="0" BackgroundColor="{StaticResource TranslucidFrameBackgroundColor}"
           HorizontalOptions="FillAndExpand">
        <Label Text="{Binding Title}" Margin="10" Style="{StaticResource LightLabelStyle}" FontSize="18" VerticalTextAlignment="Center"/>
    </Frame>
    <Label Grid.Row="1" Text="{Binding Text}" Margin="5"/>
</Grid>

I very much prefer this version of the template. It's much more clear and precise and doesn't need some weird margin to make it work.
But look at the result :
us.v-cdn.net/5019960/uploads/editor/cy/v2ifoy4xpy2k .jpeg

From what I understand, iOS (not Android), using Xamarin Forms at least, gets the size of the grid using the original picture, not the "resized to fit the screen" size of the picture... So my grids are huge and we don't even see the cards anymore. The gaps between 2 pictures gets bigger and bigger every time you add a picture...
I saw some tweaks about forcing resize using code behind but I really don't want to do that as I find it plain ugly.

Can anyone tell me, I'm "new" to Xamarin Forms, I come from many years developing using WPF / xaml : is there no way to do such a simple template using Xamarin Forms ? I saw maaaaany threads on the forums (here and stackoverflow) concerning this particular subject (pictures in data template). I tried many other solutions but didn't want to pollute this already huge question. I tried forcing a fixed size, but I hope you guessed it, that's not what I want to do as my pictures can be portrait or landscape, big or small..

Please don't ask me if I put "HasUnevenRows" to true (yes I did :wink: ).

Please, please, please help me :blush: Find a solution, tell me "omg you're so stupid you just forgot * add something here * and it would work" : that would make me so happy :smiley:

Viewing all 77050 articles
Browse latest View live


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