Is this even possible? If it is not possible, is there a way to convert Image object to Byte array?
How to serialize an Image object?
Preserving layout...Is there a means in Xamarin Forms to force the preservation of the layout?
I have a label that shows a title above an entry box, the request is to have the label appear only when the entry box contains data. When the entry box does not contain data, show the placeholder text and hide the label. That was the easy part, the difficult part is preventing the page layout from changing when the label is hidden or the text property is set to an empty string. So essentially what I am being asked to do is to preserve the layout regardless of the content of the label or the visibility of the label...Is there a means in Xamarin Forms to force the preservation of the layout? What it is currently happening; when the entry is blanked out the label appears (the page/controls shift down to allow the label to appear), when text is entered into the entry control the label blanks out and the page/controls shift up)...the shifting is the problem. Please see the code snippet below:
<StackLayout
x:Name="stkAccountID"
Grid.Row="0"
VerticalOptions="Start">
<Label Text="" Style="{StaticResource BaseSmallLabelSyle}" IsVisible="True">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding Source={x:Reference entAccountID}, Path=Text.Length}" Value="0">
<!--<Setter Property="IsVisible" Value="false" />-->
<Setter Property="Text" Value="{ artina:Translate LabelAccountID }" />
</DataTrigger>
</Label.Triggers>
</Label>
<Entry x:Name="entAccountID" Placeholder="{ artina:Translate LabelAccountID }" Style="{StaticResource ArtinaLoginEntryStyle}"
Text="{Binding AccountID}" Keyboard="Numeric">
<Entry.Behaviors>
<local:AccountIDValidationBehavior x:Name="entAccountIDValidator" MaxLength="5" />
</Entry.Behaviors>
</Entry>
<Label
Text="{ artina:Translate ErrorPleaseEnterValidAccountID }"
IsVisible="false"
Style="{StaticResource ValidationEntryErrorStyle}">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding Source={x:Reference entAccountIDValidator}, Path=IsValid}" Value="false">
<Setter Property="IsVisible" Value="true" />
</DataTrigger>
</Label.Triggers>
</Label>
</StackLayout>
How to get entries ID?
Hi I have some entries and for each entry I have to set a min and max value, and I intend to use a switch case
in the unfocused event but I don't know how to get entries IDs. Here is my code
private void FocusChange(object sender, FocusEventArgs e)
{
ExtendedEntry entry = (ExtendedEntry)sender;
if (entry.IsFocused)
{
entry.BackgroundColor = Color.Yellow;
entry.Tag = entry.Text;
}
else
{
if (entry.Text.Trim().Length == 0)
{
entry.Text = entry.Tag;
}
entry.BackgroundColor = Color.FromHex("#eee");
switch(entry.Id)
{
}
}
My goal is that when user enters a number that is out of range, i.e larger than the max value, and then clicks Done button, the entry value will be set back to the oldValue
Is LinkedIn Xamarin Free?
I will use facebook login in xamarin forms project.
so find out Houssem Dellai's nuget.
in the Houssem Dellai's Video in Youtube, he used linkedin api.
If i use linkedin, have i payment the charge? orlinkedin is free?
How to update application when values are being changed in AppConstant.cs file?
Hello Friends,
I have created AppConstant.cs file to use different constant values. Now consider an example of Font Size. A variable DefaultFontSize is declared and value of it is being set from database table Setting. Using this DefaultFontSize other font size are defined.
public static double NormalFontSize = CSettingsLocal.GetIntValue("DefaultFontSize", "DefaultFontSize", 10, false);
public static double LargeFontSize = NormalFontSize + 14;
and so on...
Now I go to Setting Form and change the DefaultFontSize. I want the Font Size in all application screen gets changed however right now it is showing changes only after I close the application and open it again.
How can I make the changes work after saving the setting instead of close and open the application again?
How to open google plus sign in in Xamarin Forms
Hi everyone. I have to open a google plus verification page on button click and after sign in in google plus we should be able to get the Email Id of the user who logged in.Please help me with this your help will be appreciated.
Hockyapp distribution ?
How to distribution release version for multiple users? and every user need HockyApp Account or Not ?
Thanks
How can I load animation, after the page refreshed?
Hi, I'm new with Xamarin, and I create a simple game, when you accept the quest and the answer was right, I just want to create an animation (OK image translateTo) when the activatorindicator IsBusy field turns to false, so after that the page was loaded.
Android ILocationListener in Xamarin.Forms (not an Android project)
I want to use ILocationListener but in a Forms project. Simple as that.
Just like in Android you add ILocationListener to an Activity and use the OnLocationChanged method to get the device's position (latitude and longitude).
Thank you in advance.
before must be in the pushed stack of the current context on redirect
In my xamarin Form portable class, there are 5 content pages. First one is login page after login user redirects to page A. After PageA user redirect to PageB and PageC and lastly reached pageE. After reached the pageE i want to redirect user to PageC.
At sucessfully login user redirect to PageA using
Navigation.InsertPageBefore(new PageA(), this);
await Navigation.PopAsync();
From PageA to PageB
Navigation.InsertPageBefore(new PageB(), this);
await Navigation.PopAsync();
The same process i am using for PageB to PageE .After reached on PageE i want to redirect user to PageC
For this i am using
Navigation.InsertPageBefore(new PageC(), this);
await Navigation.PopAsync();
At the Navigation.InsertPageBefore(new PageC(), this);
i'm getting exception before must be in the pushed stack of the current context
.
My App.xaml.cs class
public App()
{
try
{
InitializeComponent();
MainPage = new NavigationPage(new LoginPage());
}
catch (Exception ex)
{
}
}
Can you please let me know how to resolve this issue.
Just create a BindableProperty, not use yet
Hi,
I declare a bindable property as so
public static readonly BindableProperty ValueProperty = BindableProperty.Create(nameof(Value), typeof(decimal), typeof(WaterTestInputView), propertyChanged: OnValueChanged);
public decimal Value
{
get => (decimal)GetValue(ValueProperty);
set => SetValue(ValueProperty, value);
}
JUST DECLARE AND DON'T USE YET.
Then I got run time exception on android as
System.TypeInitializationException: The type initializer for 'MY CLASS' threw an exception.
Do you know why?
How to hide or remove particular tableSection(Xamarin.forms) which created by xaml?
I'm making app with using Xamarin.form.
I created tableview that has three sections from xaml. And I want to hide or remove last section (entire section, with sectionTitle).
But unfortunately, Xamarin xaml doesn't support conditional processing. (only works if element has isVisible property but tableSection does not have it)
Is there any option I can do?
Thanks.
How to debug xamarin forms app on iOS?
I purchased a cloud mac from macincloud.com for debug my xamarin forms iOS project.And I am using windows with Visual studio 2015 professional
1)so do I need to install Visual studio on mac machine?
2)can I install xamarin studio on mac? and does it works with visual studio 2015 on windows machine?
3)can I debug application on i phone on my windows machine or not with usb cable?
4)should I create any developer account for deploy app on iOS?
Setting HeightRequest of ListView as sum of all the Item's RowHeight
Hello,
I have ListView which has been put inside the ScrollViewer. ListView renders with fixed height irrespective of number of items in ListView and as ListView is inside ScrollViewer, ListView's Scrollbar doesn't function (it doesn't even show up). So what I want is ListView height should be such that it show up all the items without any scrollbar. My searching on this issue suggests that issue is known issue without any proper fix. I tried various workaround as suggested on different posts however it creates one or another problem at runtime.
Only way to fix this problem seems to be adding up the Row heights of items dynamically upon loading of the list and set the sum of all the item's Rowheight to HeightRequest of ListView. So can anyone suggest proper way of calculating the RowHeight of each item. Pls note that I have uneven rows i.e. each item's rowheight can be different.
Looking forward to pointer/code snippets.
Thanks
Has anyone successfully created a parallax scrolling effect with ListView?
This seems like something XF should be able to do given that many apps use this feature. Anyone successfully created a parallax scrolling effect using a ListView as the body and then a header view at the top?
ListView Scrolling With Horizontal and Vertical
Hello My Xamarin Friends Today I am stuck on Listview and I have to try to Scrolling Listview Horizontally and Vertically Like this
So Don't understand how to archive this type of listview, Please Help me
REMOVING PAGE FROM NAVIGATION STACK AND CALLING POPASYNC SHOWS BLANK PAGE FOR A SECOND
Please find my below code:
private void OnNewUserButtonClick(object sender, EventArgs eventArgs)
{
for (var count = 1; count <= 3; count++)
{
Navigation.RemovePage(this.Navigation.NavigationStack[6 - count]);
}
Navigation.PopAsync();
}
=========================================
MY QUESTION:
On clicking the particular button, I want to remove the previous 3 pages and need to PopAsync; so that I will be navigating back to the page I want (ex., navigating from 6th page to 2nd page).
All works fine as expected but, on navigating, the page (ex., 2nd page) appears AFTER SHOWING BLANK SCREEN for a fraction of millisecond (0.5 Sec).
I have checked OnAppearing method in second page and I done nothing there for hiding the UI.
Is that a Xamarin Forms issue...?
Your response are well appreciated..
Thank you in advance.
how to set title of navigation bar to center?
in xamarin forms how to set title of navigation bar to center?
Google Map is Showing a blank screen in Android
Hi i am new to Xamarin. I created a map using the following link http://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/part_2_-_maps_api/
i followed all the procedures mentioned in it but what am getting is a blank screen. My application Output shows the following log on executing the map activity.
Open Connection
[REQUEST] DRD(41): 62|147
[REQUEST] Close
[REQUEST] Error processing: com.google.maps.api.android.lib6.b.d@42a1cef8 not retrying
[REQUEST] Retrying: com.google.maps.api.android.lib6.c.au@429ced70
Can anyone please tell me why this is happening.
Image from URI not showing up on Xamarin.Droid.
Hey!
I have an ImageSource in my app which is loaded from an URI using the following code:
img.Source = ImageSource.FromUri(new Uri("https://crafatar.com/renders/head/" + Data.selectedPlayer.uuid + "?size=72"));
Example URL: https://crafatar.com/renders/head/d0bf98e6-968b-4f6a-ab84-b1ea57076706?size=72
This works fine on iOS, but android, the image is not displayed at all. Anyone knows why?
~Luca