Can some one help me how to generate .ipa file from visual studio xamarin form, i couldn't able to get the .ipa file, Please help me with few step by step process to generate .ipa file and install in device.
Visual studio to MAC
Dynamically add CarouselPage's ContentPages
Hi,
I have below CarouselPage and I would like to ask how can I dynamically add its ContentPages? because the images are populated from database so it can be 10 or 20 or 100 or any number as per database query.
<?xml version="1.0" encoding="UTF-8"?>
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Nasser.Gallery"
Title="آلبوم الصور">
<ContentPage>
<Image Source="http://www.nasseralkhalifa.bh/english/images/news/i-img-photogallery-news455-big04.jpg" />
</ContentPage>
<ContentPage>
<Image Source="https://i.pinimg.com/236x/70/fd/c4/70fdc41af3ac962b768b48886fe35127.jpg" />
</ContentPage>
<ContentPage>
<Image Source="http://www4.pictures.zimbio.com/gi/Sheikh+Nasser+bin+Hamad+al+Khalifa+Dubai+International+v5_eWw6Oevgl.jpg" />
</ContentPage>
<ContentPage>
<Image Source="http://nbhtriplecrown.bh/img/HH-Sheikh-Nasser-Bin-Hamad-Al-Khalifa.jpg" />
</ContentPage>
<ContentPage>
<Image Source="https://data.whicdn.com/images/40713716/large.jpg" />
</ContentPage>
</CarouselPage>
Thanks,
Jassim
TapGestureRecognizer not working properly in single click for StackLayout and Grid.
Hi All,
I have used TapGestureRecognizer for stacklayout and grid in my code and when click it works properly in other device except Samsung S6 galaxy. While double click it works fine.
Code Snippet:
<StackLayout.GestureRecognizers>
</StackLayout.GestureRecognizers>
Am using Xamarin Forms- 2.4.0.282 version. Could you please help me to resolve this?
Regards,
Cheran
Xamarin Auth on UWP - Exception third time presenter.Login(...) is used
I use the Presenter-way, in a Xamarin Forms Project.
Using microsofts oauth-page as a test.
1: Click login button
2: presenter.Login(_auth);
3: OnError() { (sender as OAuth2Authenticator).OnCancelled(); }
Repeat Three times => Unhandled exception.
--- Stack trace --------------
at Xamarin.Auth.WebAuthenticatorPage.auth_Error(Object sender, AuthenticatorErrorEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Xamarin.Auth.Authenticator.<>c__DisplayClass30_0.b__0()
at Plugin.Threading.UIThreadRunInvoker.<>c__DisplayClass0_0.b__0()
--- end of trace -----------
However, only on UWP. Works (unlimited times) on Android and iOS.
See attached solution
Moljac might have a fix for this?
Regards Andreas Brosten
Listview scrolling is geting stucked too much in Android
When i scroll Listview, its scroll is not smooth, it stucks too much in Android but a little les in iOS
ListView ScrollTo Event is not working
ListView ScrollTo Event is not working when animation is false.
ListViewBookmarks.ScrollTo(list.Find((v) => v.Index == item.Index), ScrollToPosition.End, true);
When i change enum to ScrollToPosition.MakeVisible, then it also doesn't work.
Bots army
Xamarin.Forms - DisplayAlert with Italic font attribute
Hi, I need to display an alert with some part of the message in italics and the other part normal, something like this:
var title = "Title";
var body = "This part in Italic. This part normal.";
Application.Current.MainPage.DisplayAlert(title, body, "OK");
With the part that says: "This part in Italic." in italics and the other one in normal text.
Is it possible to do? If yes, how?
Thanks in advance!
Is it possible to DisplayAlert when OnBackButtonPressed ?
So I am trying to Display an Alert when the back button is pressed and get the user to confirm whether they were sure.
E.g:
protected override bool OnBackButtonPressed()
{
var tcs = new TaskCompletionSource<bool>();
Device.BeginInvokeOnMainThread(() =>
{
var displayAlert = DisplayAlert("Discard Page?", "You are about to discard this page, Would you like to continue?", "Yes", "No");
displayAlert.ContinueWith((sender) =>
{
tcs.SetResult(sender.Result);
});
});
return tcs.Task.Result;
}
But this just hits the DisplayAlert
line and hangs my application.
To work in Android this method needs to be wrapped in BeginInvokeOnMainThread
. I'm guessing it hangs because it blocks the main thread because it is not async. But I can't make this method async because of the OnBackButtonPressed method...
Is what I'm trying to achieve possible?
Application resources
Hi guys,
I have a question about Application Resources. I should change the style of my application. I tried to follow the instruction on https://developer.xamarin.com/guides/xamarin-forms/xaml/resource-dictionaries/ but nothing changed in my application.
I removed App.cs and I created a new ContentPage and I changed it like that:
App.xaml
<?xml version="1.0" encoding="UTF-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:theme="clr-namespace:Xamarin.Forms.Themes;assembly=Xamarin.Forms.Theme.Light"
x:Class="myInventories.App">
<Application.Resources>
<ResourceDictionary>
<Color x:Key="PageBackgroundColor">Yellow</Color>
<Color x:Key="HeadingTextColor">Black</Color>
<Color x:Key="NormalTextColor">Blue</Color>
<Style x:Key="LabelPageHeadingStyle" TargetType="Label">
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="HorizontalOptions" Value="Center" />
<Setter Property="TextColor" Value="{StaticResource HeadingTextColor}" />
</Style>
<Style TargetType="Entry">
<Setter Property="HorizontalOptions" Value="Fill" />
<Setter Property="VerticalOptions" Value="CenterAndExpand" />
<Setter Property="BackgroundColor" Value="Yellow" />
<Setter Property="FontAttributes" Value="Italic" />
<Setter Property="TextColor" Value="Blue" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
App.xaml.cs
public partial class App : Application
{
public App()
{
MainPage = new StartPage();
}
public static Page GetMainPage()
{
return new RootPage();
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
I was expecting the background application Yellow. What is wrong? Thank you in advance.
Entry problem
Hey Developer, im having some issues with an Entry wich i set to keyboard="Numeric"
here's my code.
private void slidrSales_ValueChanged(object sender, ValueChangedEventArgs e)
{
EntrySalesValue.Text = slidrSales.Value.ToString("f2");
}
private void EntrySalesValue_TextChanged(object sender, TextChangedEventArgs e)
{
slidrSales.Value = Convert.ToDouble(EntrySalesValue.Text);
}
above you see my code to make my Slider.value scale with the EntrySalesValue.text.
when testing/debugging i found an error wich i have no idea how to fix.
whenever i backspace the (numeric) entry to 0 and then press backspace again. the application crashes.
how can i let a user safely remove all numbers from the entry without crashing the application?
Show Label visibility inside a List View
Dear All,
We have a ListView. Inside a list we have 2 Labels and 1 Image. 1st Label Visibility is always True and Second Label Visibility is show On Off according to image Click. how to achieve this. Please Suggest.
GLOBAL STYLES IN PRISM XAMARIN FORMS
How do I use global styles?
UWP and sqlite-net-pcl errors 1.4.118
Hello,
I have too many problems with the package sqlite-net-pcl.
I used the 1.4.118 version and I have this issue: https://github.com/praeclarum/sqlite-net/issues/627
- So I have downgrade the version to 1.3.3 but this version does not support iOS 11. It's a problem.
- In second, I have update to the 1.5.166-beta but:
on iOS:
An inconsistency between the local application and the remote build was detected for PropertyManager.iOS. Rebuild the application and try again. For more information, check the logs
on UWP:
DependencyService.Get () error CS0103: The name 'DependencyService' does not exist in the current context
my IFileHelper.cs:
using GestionnaireCopropriete.Database;
using GestionnaireCopropriete.UWP;
using System.IO;
using Windows.Storage;
using Xamarin.Forms;
[assembly: Dependency(typeof(FileHelper))]
namespace GestionnaireCopropriete.UWP
{
public class FileHelper : IFileHelper
{
public string GetLocalFilePath(string filename)
{
return Path.Combine(ApplicationData.Current.LocalFolder.Path, filename);
}
}
}
If necessary, I have PCLStorage.
PS: I have add UWP with: https://developer.xamarin.com/guides/xamarin-forms/platform-features/windows/installation/universal/
Thanks for your help,
Is there a code coverage tool available for Visual Studio Mac?
I'm writing unit tests for my code and I realized that I can't see code coverage. Now the problem is that every tool that I find is for Windows or it costs too much for me. Does anyone have a solution?
HttpClient post / get to PHP API
I am using HttpClient to get / post data to backend server by using php api without any issue, the backend server was setup as HTTPS .
Now i would like to have some advise that should i need authorization mechanism between HttpClient and server ? which type of authorization mechanism i should use ? I found this seems similar from this https://github.com/mevdschee/php-api-auth but really don't know how to implement.
I feel i;m on a wrong track .......
NativeCSS what happend to it?
Hello guys,
I was looking for a CSS package/component for Xamarin.Forms and I found NativeCSS, problem is that I don't know if it is still being updated. Looking at their site last updates were in 2015, so I'm kinda scared they are not developing it anymore. Anyone knows more information about this? Or do you know a better CSS package/component for Xamarin.Forms? Which is regularly updated?
Thanks in advance,
Dennis
Where is Globalization Support in 2.5
according to this topic https://forums.xamarin.com/discussion/85747/xamarin-forms-feature-roadmap/p1 , the globalization Globalization Support must be added to 2.5 version , where is flowDirection in xamarin.forms 2.5 ?
Cropping images to square in forms
I'm trying to get a user to select/take a picture and then getting a crop view up. I have managed to do this using this library: https://github.com/XAM-Consulting/Xam.Plugins.ImageCropper
But I want to force the image to be a square, not any aspect ratio the user pleases. Is there anyone who knows how to do this?
Is there any other library/plugin that I can use for this?
List grouping works in Android but not in iOS
I have the following:
var sorted = from linkReportItem in linkReportItems
orderby linkReportItem.Category
group linkReportItem by linkReportItem.Category into categoryGroup
select new Grouping<string, LinkReportItem>( categoryGroup.Key, categoryGroup );
I then iterate through it, adding to this collection:
public ObservableCollection<Grouping<string, LinkReportItem>> LinkedReportItemGrouped { get; set; } =
new ObservableCollection<Grouping<string, LinkReportItem>>();
Here is the iteration:
foreach ( Grouping<string, LinkReportItem> item in sorted )
{
LinkedReportItemGrouped.Add( item );
}
This works fine in Android, but in iOS it crashes saying that "Index 9 is greater than the number of rows 8"
Any ideas why this would be happening in iOS and how I might fix it?
Thanks!!