Hey,
I am working on a project where in xaml page it has a label and by binding the property associate value is showing.
There is an entry field that accepts the value and send to server and in the label value that data is being fetched and showing.
I want that old label value always be updated when the property value is updated at back end or in server without refreshing the whole page.
Help me.
How to update the UI label value from backend page without refreshing the page?
Connect to sql Server
I need connect to sql server resident on local server
Can anyone help me?
Thanks
i use:
string connectionString = @Server=192.168.1.22;Database=DB_DATI_UBIK_STORE_PRO;User Id=sa;Password=bladerunner;Trusted_Connection=true;
but i recive this error:
exception = {System.Data.SqlClient.SqlException (0x80131904): Specified method is not supported.
at Interop+NetSecurityNative.ImportPrincipalName (Interop+NetSecurityNative+Status& minorStatus, System.String inputName, System.Int32 inputNameByteCount, Microsoft.Win32...
THANKS
Sizing with Rotation in a Grid incorrect
Anytime I place an element with a rotation in a grid, the sizing of the grid space seems to be calculated pre-rotation.
I'm using the latest Xamarin.Forms, and this problem has existed for a while. I was wondering if there was a work around?
Is it possible to access a locally running api from the iOS Simulator all from Windows?
I have an API server project running on my local windows machine (at the moment just running on a localhost address, can be changed).
I am then trying to test my Xamarin Forms app which tries to connect to this API on the iOS simulator.
How is it best to do this?
From googling I have found that if I was doing this all from the Mac it might just work? But how do I get this to work from Windows? If I run the UWP app, it all works as expected, because it is running all on my machine.
At present I am having to publish my API and access it that way, but that isn't the ideal way, just seems unnecessary when I'm trying to test things quickly with debugging.
Erroe in android debug with a missing moethod
I have this error in android device, in the App.xaml.g.cs
"System.MissingMethodException: System.Func`2<string, string> Xamarin.Forms.Internals.ResourceLoader.get_ResourceProvider()
"
Anyone know something about it?
How to resize images ?
I am using absolute layout but i can't resize image. It keeps the original size.
Decompress database
Hi Guys,
i'm looking for a way to decompress my database send from my api, but seems that in the way that i'm doing this is not supported.
Do you know how can i do this?
Alberto C.
Making Xamarin forms app run in background
Hi, I am developing xamarin forms based android app in which I have used Push notifications using OneSignal. Notifications are received successfully and displayed on my app but if I close the app then notifications doesn't get received by app and due to which I get Failure respond on OneSignal dashboard. Can anyone tell me how can I keep running my app in background so that notifications will be handled even if app get closed by user.
how to recored genrated beep sound in Xamarin.forms?
I'm currently coding on Xamarin.Forms application with Xamarin.Andriod and I'm using the AudioRecord class to record my genrated beep sound it working good but not working in Ios.below code is Xamarin.Andriod then how to record my genrated beep sound in xamarin.Ios?
foreach (double dVal in sample)
{
short val = (short)(dVal * 32767);
generatedSnd[idx++] = (byte)(val & 0x00ff);
generatedSnd[idx++] = (byte)((val & 0xff00) >> 8);
}
var track = new AudioTrack(Android.Media.Stream.Music, sampleRate, ChannelOut.Mono, Android.Media.Encoding.Pcm16bit, numSamples, AudioTrackMode.Static);
track.Write(generatedSnd, 0, generatedSnd.Length);
track.Play();
SystemClock.Sleep(500);
track.Release();
how to record genrated sound in Xamarin.Forms ios
I'm currently coding on Xamarin.Forms application with Xamarin.Andriod and I'm using the AudioRecord class to record my genrated beep sound it working good but not working in Ios.below code is Xamarin.Andriod then how to record my genrated beep sound in xamarin.Ios?
foreach (double dVal in sample)
{
short val = (short)(dVal * 32767);
generatedSnd[idx++] = (byte)(val & 0x00ff);
generatedSnd[idx++] = (byte)((val & 0xff00) >> 8);
}
var track = new AudioTrack(Android.Media.Stream.Music, sampleRate, ChannelOut.Mono, Android.Media.Encoding.Pcm16bit, numSamples, AudioTrackMode.Static);
track.Write(generatedSnd, 0, generatedSnd.Length);
track.Play();
SystemClock.Sleep(500);
track.Release();
same way how to record my genrated beep sound in xamarin.Ios.
Use a STL C++ Library
Hello,
How to use a STL C++ Library in a Xamarin project ?
Thank you,
Christophe,
Is anyone actually using the geofence plugin in production?
I have created an app that uses the geofence plugin (https://github.com/domaven/xamarin-plugins/tree/master/Geofence) to notify users when they enter/exit certain locaitons.
It works to some extent, but there are a few problems:
-When monitoring location exit, iOS users experience numerous false exit notifications, especially when moving around inside the location perimeters. Also if moving outside the location, when phone wakes up after being inactive, one can get 3-4 notifications about exiting the location, even if the user is far away
-All proper exit notifications (not the fake ones) are displayed twice on iOS
-On Android, some users don't get notifications at all, especially if the app is in background or closed
I am thinking about moving to the acr geofencing plugin (https://github.com/aritchie/geofences/tree/master/), but it is a bit of work. So I am wondering if:
1.Does anyone else have experience with either of these plugins in production?
2.Anyone else have experience with same problems that I am facing?
It's weird that nobody else seems to have problems. I was a newbie to Xamarin when writing the app, I am thinking of creating a small sample. Maybe I have made mistakes, although I have been going through my code several times without finding any. Maybe nobody is actually using the geofence plugin for other than playing around....
Appreciate any insights on this.
Speed Dial
Hi Xamarin Forum
how to make a speed dial in xamarin forms where I dont need to tap the call button just like the standard phonedialler of xamarin forms, I just need to tap the number I need to call and upon tapping it the phone automatically dial the number and not by displaying the phone number and I will again tap the call button below the phone number
Animating Navigation Bar properties on page transitions
I am looking to add a transition to navigation bar text when navigating between views in a MasterDetail layout. Just a simple fade out / in of the navigation page text.
I have implemented the below custom renderer, which is getting me 99% of the way.
The problem I am having is that it appears when calling PushASync method, the navigation bar text is being updated before the point that SetupPageTransition is called in the Custom NavigationPageRenderer. By debugging I can also see this text is updated before the outgoing pages OnDisppearing method is called.
I can't seem to find any way to trigger the animation before the text is updated, so at the moment the Push transitions behave strangely as it jumps to the new title before fading out. In reality, this was the reason I decided to add this transition in the first place, as I found this behaviour jumpy.
Is there anyway i can trigger this animation before the text is updated?
public class CustomNavigationPageRenderer : NavigationPageRenderer
{
private Android.Support.V7.Widget.Toolbar toolbar;
private Android.Support.V7.Widget.AppCompatTextView _textView;
public CustomNavigationPageRenderer(Context context)
: base(context)
{
}
public override void OnViewAdded(Android.Views.View child)
{
base.OnViewAdded(child);
if (child.GetType() == typeof(Android.Support.V7.Widget.Toolbar))
{
toolbar = (Android.Support.V7.Widget.Toolbar)child;
toolbar.Elevation = 0;
toolbar.ChildViewAdded += Toolbar_ChildViewAdded;
}
}
private void Toolbar_ChildViewAdded(object sender, ChildViewAddedEventArgs e)
{
var view = e.Child.GetType();
if (e.Child.GetType() == typeof(Android.Support.V7.Widget.AppCompatTextView))
{
var textView = (Android.Support.V7.Widget.AppCompatTextView)e.Child;
var font = Typeface.CreateFromAsset(this.Context.Assets, "gothambold.ttf");
textView.Typeface = font;
toolbar.ChildViewAdded -= Toolbar_ChildViewAdded;
_textView = textView;
}
}
protected override void SetupPageTransition(Android.Support.V4.App.FragmentTransaction transaction, bool isPush)
{
HandleTextFade();
base.SetupPageTransition(transaction, isPush);
}
private void HandleTextFade()
{
if(_textView != null)
{
var colorAnim = ObjectAnimator.OfInt(_textView, "textColor", Android.Graphics.Color.White, Android.Graphics.Color.Transparent);
colorAnim.SetEvaluator(new ArgbEvaluator());
colorAnim.SetDuration(250);
colorAnim.Start();
colorAnim.AddListener(new OMNIAnimListener(_textView));
}
}
}
public class OMNIAnimListener : AnimatorListenerAdapter
{
Android.Support.V7.Widget.AppCompatTextView TextView;
public OMNIAnimListener(Android.Support.V7.Widget.AppCompatTextView textView)
: base()
{
TextView = textView;
}
public override void OnAnimationEnd(Animator animation)
{
var colorAnim = ObjectAnimator.OfInt(TextView, "textColor", Android.Graphics.Color.Transparent, Android.Graphics.Color.White);
colorAnim.SetEvaluator(new ArgbEvaluator());
colorAnim.SetDuration(250);
colorAnim.Start();
base.OnAnimationEnd(animation);
}
}
Calendar plugin
Hi xamarin forum
Is there any calendar plugin that can be used in xamarin forms and can easily pull data from database so that it can display birthdays records that comes from database?
I have tried the syncfusion calendar for xamarin forms but I think there is no way how to pull data from database and plot the data to the calendar
Thanks in advance
Is it possible to create an image from a view in Xamarin.Forms?
I have three images in a view one on top of the other. Together they create the image that I need. I need to create a image from this view. I have done this in Xamarin.Android and Xamarin.iOS, but I can't find a way to acomplish this in Xamarin.Forms. Is it possible and if yes - how can I do that?
Required CCAvenue payment Integration for Xamarin form
I have create xamarin application and need for ccavenue payamnt integration for xamarin forms. Please help me for any idea related to payment gateway integration
How to change the Thickness of OUTLINE / BORDER frame ?
Hi,
I want change the Thickness of a Frame border. I my phone the border is VERY small..
My code :
<Grid RowSpacing="0" ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Frame OutlineColor="Red" Grid.Row="0" Grid.Column="0" Margin="20,0,2,0" Padding="0" HeightRequest="36">
<Label Text="Femme" XAlign="Center" TextColor="#FFFFFF" FontSize="14"/>
</Frame>
<Frame OutlineColor="Red" Grid.Row="0" Grid.Column="1" Margin="2,0,20,0" Padding="0">
<Label Text="21 ANS" XAlign="Center" TextColor="#FFFFFF" FontSize="14"/>
</Frame>
</Grid>
Thx
HttpClient() and DiscoveryClient.GetAsync(url) fail to validate certs
I am using Xamarin.Forms 3.1, and .NET Standard 2.0 PCL and whenever I attempt to call an API, i get an error:
TrustFailure, xamarin OPENSSL_internal: CERTIFICATE_VERIFY_FAILED
My certs are valid though, and in a browser, we can see they are green and valid.
This application was previously working and communicating with my backend using HTTPS. However since I went to Xamarin.Forms 3.1 or perhaps some other change, HTTPS no longer works.
I tried the ModernHttpClient-updated, but that did not solve the problem.
My android project is set to "Managed" and "Android" both had the same result, failure.
I tired using both IP addresses and hostnames for my endpoints, which are local Windows 10 IIS hosted.
Thanks for any suggestions or ideas to try.
Zxing barcode scanner - errors at new ZXingScannerPage()
Hi Guys,
And here's yet another question on Zxing's barcode scanner. I can't get it to work for days now, it's driving me insane. My app is very small and basic, but still not working. When launched there's only "SCAN" button and textbox for result. When "SCAN" is clicked, I'm always getting errors at line:
scanPage = new ZXingScannerPage();
And here's complete code run on button click event:
`ZXingScannerPage scanPage;
private async void btnScan_Clicked(object sender, EventArgs e)
{
try
{
scanPage = new ZXingScannerPage();
scanPage.AutoFocus();
scanPage.OnScanResult += (result) =>
{
// Stop scanning
scanPage.IsScanning = false;
scanPage.AutoFocus(0, 500);
// Pop the page and show the result
Device.BeginInvokeOnMainThread(() =>
{
Navigation.PopModalAsync();
//DisplayAlert("Scanned Barcode", result.Text, "OK");
txtBarcode.Text = result.Text;
});
};
await Navigation.PushModalAsync(scanPage);
}
catch (Exception ex)
{
throw;
}
}`
In detail the exception reads "Value cannot be null..". So I thought maybe it's because I pass nothing to ZXingScannerPage contructor and put some code for customOverlay. Unfortunately it still crashes at scanPage = new ZXingScannerPage(customOverlay: customOverlay);
, again with error "Value cannot be null..":
private async void btnScan_Clicked(object sender, EventArgs e)
{
try
{
var customOverlay = new StackLayout
{
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand
};
var torch = new Button
{
Text = "Toggle Torch"
};
torch.Clicked += delegate
{
scanPage.ToggleTorch();
};
customOverlay.Children.Add(torch);
//Pass in the custom overlay
scanPage = new ZXingScannerPage(customOverlay: customOverlay);
I'm going nuts, I did everything as in examples on net (tried several of them, all fail at some point). The one above is example from official ZXing's component site but still without success (and this is trivial app so far).
I'd attach whole solution for everyone to see, but it's around 100 MB (?) so I can attach individual files if you'd like to have a look.
Your help is much appreciated!
Robert