i have a noob question, how can i put fastcell into my project, i watch the project on gitbut but i dont know how to put it in my project (blank project), i'm New and it's quite complicated for me, can somebody guide me to handle this problem? Sorry my bad english.
Thank in advance.
How to put fastcell into blank project
Image not showing in Xamarin.UWP
Hi,
I'm trying to display a image with some data. I can able to display both image and data in Android where as in UWP only data is showing up, but not image. Do anybody have idea about that.
Thanks in Advance!
Image Crop along with a square box using SkiaSharp?
Guys,
Is there any way to load a image and place a rect or square box on it and then to save only particular part of the whole image using SkiaSharp?
Please also help me out various other options to do the same on crossplatform.
Thanks
JP
Right-to-Left + MasterDetail in xamarin.forms v3
hi,
I'm using new feature Right-to-Left in x.f.v3. everything works well except navigationbar in MasterDetail. Hamburger icon stays still at the left side. Do you guys have some ideas? Or can somebody help with custom render? Ty
How to navigate from ContentPage to CarouselPage
Hi there,
i just started to code with xamarin. How can I navigate from a ContentPage to a CarouselPage using onClick-event of a button? Here is my Code of this event:
private async void Button_Clicked(object sender, EventArgs e) { await Navigation.PushAsync(new P_Carousel(1)); return; }
and here my Code of "P_Carousel.xaml.cs"
`public P_Carousel (int index)
{
InitializeComponent ();
Children.Add(new ContentPage { Content = new BoxView { Color = new Color(1, 0, 0) }, Title = "Page 1" });
Children.Add(new ContentPage { Content = new BoxView { Color = new Color(0, 1, 0) }, Title = "Page 2" });
Children.Add(new ContentPage { Content = new BoxView { Color = new Color(0, 0, 1) }, Title = "Page 3" });
}`
Using httpClient.PostAsync correctly....
I have spent hours trying to get this simple post http request working but i keep getting errors about await/async issues. I'm sure the solution is easy!!
**Error CS4034 The 'await' operator can only be used within an async lambda expression. Consider marking this lambda expression with the 'async' modifier.
**
public async Task<JsonWrapper> Login(string username, string password)
{
// string sResult;
try
{
string uri = $"{baseurl}User/Authenticate";
var httpClient = new HttpClient(); // Error CS0246: The type or namespace name `HttpClient' could not be found. Are you missing an assembly reference? (CS0246)
string sContentType = "application/json"; // or application/xml
JObject oJsonObject = new JObject();
oJsonObject.Add("userName", username);
oJsonObject.Add("password", password);
var oTaskPostAsync = httpClient.PostAsync(uri, new StringContent(oJsonObject.ToString(), Encoding.UTF8, sContentType));
return await oTaskPostAsync.ContinueWith((oHttpResponseMessage) =>
{
// Debug.WriteLine("webserviceresponse:>" + oHttpResponseMessage);
// oHttpResponseMessage.Result.EnsureSuccessStatusCode()
// = JsonConvert.DeserializeObject<ClientHierarchyResult>(sResult);
return await oHttpResponseMessage.Result.Content.ReadAsStringAsync().ContinueWith((resp) =>
{
//// var json = await oHttpResponseMessage.Result.Content.ReadAsStringAsync();
var jresult = JsonConvert.DeserializeObject<JsonWrapper>(oHttpResponseMessage.Result.ToString());
return jresult;
});
});
}
catch (OperationCanceledException)
{
Trace.TraceError("File download got canceled.", "FileDownloader");
return new JsonWrapper("failed");
}
}
Build error when using DataTrigger inside list item template
I need to use DataTrigger in ListView ItemTemplate. I simplified everything till following example (trigger syntax copypasted from Xamarin samples git):
<ListView>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Entry x:Name="entry" Text="" Placeholder="required field" />
<!-- referenced below in DataTrigger-->
<Button x:Name="button" Text="Save"
FontSize="Large"
HorizontalOptions="Center">
<Button.Triggers>
<DataTrigger TargetType="Button"
Binding="{Binding Source={x:Reference entry},
Path=Text.Length}"
Value="0">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
</Button.Triggers>
</Button>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
On build I'm getting error
FeedbackPage.xaml : error : Sequence contains no elements
Googling did not helped Can anybody explain is it possible to use triggers in data templates?
Easy dropshadow on stacklayout or other controls
Hi All,
I wanted to implement a dropshadow on a stacklayout, and after some mucking around I decided on this:
"Stick it in a Frame with no padding, a transparent outline, and a custom rendered less opaque shadow"
Here is the xaml:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:myapp" x:Class="myapp.HomePage"> <local:ShadowFrame OutlineColor="Transparent" Padding="0,0,0,0" > <StackLayout HeightRequest="50" BackgroundColor="White"> <Label Text="A label for my stacklayout" /> </Stacklayout> </local:ShadowFrame> </Contentpage>
And the custom Frame class:
using Xamarin.Forms; namespace myapp { public class ShadowFrame : Frame { } }
And finally the custom renderer if you want to make the dropshadow lighter:
using myapp; using myapp.iOS; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; [assembly: ExportRenderer(typeof(ShadowFrame), typeof(ShadowFrameRenderer))] namespace myapp.iOS { public class ShadowFrameRenderer : FrameRenderer { protected override void OnElementChanged(ElementChangedEventArgs<Frame> e) { base.OnElementChanged(e); Layer.ShadowOpacity = 0.2f; } } }
The result is attached as an image
Other properties of the Frame class can be changed as well, see the source code for the FrameRenderer here:
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/FrameRenderer.cs
Thanks to Xamarin for open sourcing the Xamarin Forms Framework!
Push Messaging
Hi Developers,
I am recently developing a Cross Xamarin.Forms app for Android and IOS.
What are you guys (or girls) using when programmaing push notifications these days, when starting "fresh"? Is Google Firebase a good solution, or are there easier way to do this.
My back-end is a web server that can hold tokens of devices, and send them a push messages if needed.
Thanks for your time!
Disable the screenshot functionality in Xamarin.Forms application?
Hii everyone,
I want to know how to disable screenshot functionality in my application level.
Can anyone help me?
Thanks in advance
Accept all server certificates with HttpClient in Xamarin.Forms (including UWP)
Hello,
my app connects to a server that typically has a self signed certificate. I know that this is not perfect and I will show a warning to the user, but at least for now I need to able to accept all server certificates in my Xamarin.Forms project.
I use System.Net.Http.HttpClient and I have not found a universal solution.
ServerCertificateCustomValidationCallback and ServicePointManager.ServerCertificateValidationCallback are apparently not available for UWP.
How could I solve this issue to use Xamarin.Forms with an HttpClient that accepts all certificates?
InitializeComponent before set BindingContext or viceversa?
In the code behind of a Xaml page, which is the correct order?
InitializeComponent();
BindingContext = ThePageViewModel;
or
BindingContext = ThePageViewModel;
InitializeComponent();
icons missing
hey, I am new to Xamarin forms, I have created an app, on launching the app, a list screen will appear with 2 icons on top of search bar one send button and other and item to list button, they are not visible on opening, but wen I reload the list or go to next page n come back the icons will appear
how to solve this issue?
works fine on IOS
Global Styles with ONIDIOM not working on recent updates?
I recently upgraded my forms version for from 2.5.91635 to XF 3.0 and the global styles which I have defined stopped working . However styles with OnPlatform are working and styles which are having OnIdiom in it , its not working. I'm currently using .NEt standard?
Any idea?
How to build swipe gesture control in xaml like Youtube swipe when playing video down and up swipe
How to build swipe gesture control in xaml like Youtube swipe when playing video down and up swipe navigation
Embedded Resource Image Not Displaying in app
I just started learning xamarin and I can't get a local image to display. I'm following a tutorial and looking at the documentation, but I"m still having issues. I don't see what I'm doing different from the documentation. I named the image an embedded resource in properties and I set the page as the default page in app.xaml.cs. All I get is a blank app with no image or anything.
` MainPage = new Images.LocalImage();`
I've been stuck on this for a few days now so any help is greatly appreciated.
Screenshot showing image path and property settings
LocalImage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Images.LocalImage">
<Image x:Name="myLocalImage" Aspect="AspectFit"/>
</ContentPage>
LocalImage.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Images
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class LocalImage : ContentPage
{
public LocalImage ()
{
InitializeComponent ();
myLocalImage.Source = ImageSource.FromResource("Images.background.jpg");
}
}
}
How to show calendar with circle around each date cell?
I am using syncfusion library to display calendar control in my app but it doesn't show date cell with circle around, in Android.
It is showing such UI for date cell in iOS, but only after date selection.
I want to show each date cell with circle around it.
Is there any solution for this?
An assembly with the same simple name 'ReactiveUI' has already been imported.
Hi All
Severity Code Description Project File Line Suppression State
Error CS1704 An assembly with the same simple name 'ReactiveUI' has already been imported. Try removing one of the references (e.g. 'C:\Users\LOGESH PALANI.nuget\packages\reactiveui-core\7.0.0\lib\MonoAndroid403\ReactiveUI.dll') or sign them to enable side-by-side. GetMobileNumber.Android C:\Users\LOGESH PALANI\source\repos\GetMobileNumber\GetMobileNumber\GetMobileNumber.Android\CSC 1 Active
Xamarin.Android app using with Webview showing gallery instead of Camera to take picture
Please give me solution to resolve the issue of Camera to take picture for Xamarin Android app. I have created cross platform xamarin application and used webview to render my application. But When I clicked on camera icon to take picture in Android device, Here App navigate to Gallery to choose picture but not navigate to take picture using device Camera.
Error: Cannot find test-cloud.exe, the path specified by "--uitest-tools-dir" was not found.
I've tried running my UITests on AppCenter Tests for my iOS project, unfortunately I came across problem that can't seem to find anywhere on net.
Error: Cannot find test-cloud.exe, the path specified by "--uitest-tools-dir" was not found.
I give specific path to folder that test-cloud.exe is (file is there), yet I cannot run my tests, because this error gets thrown. I've message microsoft support but they are taking ages to reply. Has anyone come across similar problem?