So I've got this:
<Label Text="{Binding CreationDate, StringFormat=HH:mm:ss}" Font="15,Bold" />
Where CreationDate is a DateTime.. But I keep just getting HH:mm:ss
This is how I would expect to use it in Xaml.. What is the correct way to use this?
So I've got this:
<Label Text="{Binding CreationDate, StringFormat=HH:mm:ss}" Font="15,Bold" />
Where CreationDate is a DateTime.. But I keep just getting HH:mm:ss
This is how I would expect to use it in Xaml.. What is the correct way to use this?
With Visual Studio 2017 (latest rc) - after opening xaml previewer, I am presented with error in the designer 'an exception occurred while rendering the control'. This occurs while trying to view the Android view. I can however view the ios view when my mac build agent is available.
If I click the (!) icon i see a series of exception messages
i.e.
you must call xamarin.forms.init prior to using it
at xamarin.forms.device.get_info()
etc.
public async Task SlideVerticaly(Xamarin.Forms.Grid grid, bool fromTop = true, uint duration = 1000)
{
if (grid != null)
{
var minAlpha = 0;
var maxAlpha = 1;
var minTransform = (fromTop ? -1 : 1) * App.HScreen;
var maxTransform = 0;
grid.Opacity = minAlpha;
await grid.TranslateTo(0, minTransform, 0, Easing.CubicInOut);
grid.Opacity = maxAlpha;
await grid.TranslateTo(0, maxTransform, duration, Easing.CubicInOut);
}
}
I has run IOS very fine but android to not working, every body can help me explain?
Hi friends,
I'm new to Xamarin (20 hours of samples and tiny POC),
Currently my company develops few applications for Android & iOS.
Develop once is something we really want and need (like everyone), we used to it using Unity and LibGDX in our game division.
All the samples are useful and the concept is impressive.
The conclusion I've got so far is developing standard UI application with Xamarin.Forms is pretty easy and will save a lot of dev and QA time
while ensuring consistency between the platforms.
By saying standard I guess we can agree about, master detail, side menu, different types of fields etc..
But when I think about implementing a bit "heavier" UI elements such as carousel (of complex items) on top of custom made line chart (see attached screenshot), I can't think of a possible Xamarin.Forms solution and I assume that custom Android and iOS work is required there.
Please tell me I'm wrong and missed the whole point.
If I'm right, than what is the way I should use Xamarin in applications where "sexy" UI is the main issue and the logic is quite poor?
Thank you for your help.
Hello. I want to keep the phone's location quite often in an App, so I'm using the GetPositionAsync method, and keep calling that. I've written some code, and when I attach that in a simple OnAppearing method everything works fine. If I write it in a method or while loop, when it gets to the GetPositionAsync or some other local database things, I think only awaitable methods, it goes right out of the loop/method. I am using async. Any ideas?
var locator = CrossGeolocator.Current;
locator.DesiredAccuracy = 20;
var position = await locator.GetPositionAsync(TimeSpan.FromSeconds(10));
location.Latitude = position.Latitude;
location.Longitude = position.Longitude;
await App.LocationDatabase.SaveLocationAsync(location);
await Task.Delay(TimeSpan.FromSeconds(10));
I use Xamarin.Forms (ver 1.4)
Page hierarchy:
->NavigationPage
-->MasterDetailPage
How can disable sliding menu (open master page by gesture) in pushed screen?
Push method:
await ((NavigationPage)((MasterDetailPage)Application.Current.MainPage).Detail).PushAsync(page))
Sliding menu should work only on root page.
Hello,
I would like to open a modal page that have a navigation bar with a "X" (cross) at the top left of the page to close/dismiss the page, like showed in Android documentation about bottom sheets
Do you have any idea how can I achieve that in Xamarin.Forms ?
Thanks !
Hi,
I am trying for "Android Emulator Setup" on AMD RADEON processor for xamarin project.
But I don't see any possibilities for the same.
What is the way to achieve the same?
Thanks,
Manjushree
Hi guys. Im pretty new in Xamarin.
So i need to build a few pages, and i have a problem with understanding - how to build some controls.
1) Elements for list view. This is how i need to show result of search, or items (like store items)
If I need to use grid? Or cells? - I just dont know(((
(Or maybe Frame - because here I need rounded corners???)
2) Second is Button
Here is Image on left side and text -- this feature supported in standart button. But i need arrow on the right side
And this is simple form for user.
Laso Rounded corners on top and bot elements.
Guys please help me.
Thank you.
I'm building cross platform app which will be launch on Android at first. I have a problem with socket connection.
I connect via Wifi to my device where is SockedServer. Device not allows internet so my connection via Wifi is without it. And now:
If I have only Wifi adapter enabled, I can connect to socket properly. But when I enable additionally cellular connection I can't connect. I have tried to bind address to Socket like below :
IPHostEntry entry = Dns.GetHostEntry(Dns.GetHostName());
IPAddress localAddress = entry.AddressList[0]; //<- my Wifi
IPEndPoint localEndPoint = new IPEndPoint(localAddress, portNumber);
Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
client.Bind(localEndPoint);
client.Connect(this.serverAddress, portNumber);
But I still can't connect (method Connect throw timeout). I suppose that the problem is with mobile network (perhaps that, that only this network has internet access)
Any ideas?
What is the best GIF library you have ever used and it works perfectly with both Android and iOS?
I have tried FFImageLoading but it does not work on my HTC mobile according to this issue.
I have also tried Lottie (that deals with .json instead of .gif and I've downloaded some .json samples) and it works fine with all devices I have tested on, but I can't perfectly create my custom .json file for it by AfterEffects, I've already created but it has problems (I think related to frequency and other stuff) that I couldn't solve.
So sharing your experience would be so helpful.
First, I have ask this question in Dropbox forum. Until now no one reply me!
Error in call to API function "files/download"
I use DropBox API to implement Dropbox in Xamarin.Forms (NET Standard). I upload a file success, but when I download I get this error
Dropbox.Api.BadInputException: Error in call to API function "files/download": Bad HTTP "Content-Type" header: "application/x-www-form-urlencoded". Expecting one of "text/plain", "text/plain; charset=utf-8", "application/octet-stream", "application/octet-stream; charset=utf-8".
using (var client = new DropboxClient(this.AccessToken)) { using (var response = await client.Files.DownloadAsync(file.FilePath + "/" + file)) { var pickedFile = await response.GetContentAsByteArrayAsync(); //FileImagePreview.Source = ImageSource.FromStream(() => pickedFile); } }
Thank you!
Usually when views are rendered, they show up instantly by going from opacity = 0% to 100% in 0 milliseconds, I want to override this behavior so the transition occurs smoothly, like when images are rendered, or when navigating between ContentView
s inside a ContentPage
, so my first attempt is to create a behavior like this:
public class FadingBehavior : Behavior<View>
{
protected override async void OnAttachedTo(View view)
{
//assuming that the view starts rendering from 0 opacity
await view.FadeTo(1);
base.OnAttachedTo(view);
}
protected override async void OnDetachingFrom(View view)
{
await view.FadeTo(0);
base.OnDetachingFrom(view);
}
}
but it doesn't work!
I have downloaded the sample ToDo List. There are many members in the folder. What member do I click to execute the sample?
I have two project running, an API project and my Xamarin project. I am trying to hit the API localhost project with my Xamarin project and it seems to never return anything at this part:
uri = "https://localhost:4455/api/Messaging/SendToken?token=test-token"
HttpResponseMessage response = await HttpInvoker(async () => await httpClient.GetAsync(uri));
Tested with UWP and Android
This url works when i enter it in a web browser, but just doesnt respond in my local Xamarin projects. Does Xamarin not support hitting other local projects?
i Want to clip the path...like this
how to do it
Hello guys,
I don't know if this is the right forum to talk about native-forms but here it goes.
I have two apps, one in Xamarin.Native and another in Xamarin.Forms. Both are fully developed and operational. Now, the objective is to integrate the one in forms into the native one. For example, by pressing a button inside the Xamarin.Native app, I will enter a Xamarin.Forms page, for instance, the login page. I'm doing so with native forms. The thing is, the navigation inside the Forms app is done by affecting the MainPage property of Application:
MyPage page = new MyPage();
Application.Current.MainPage = page;
in iOS, for example, I can navigate to a forms page this way:
var mainPage = new MyPage().CreateViewController();
_navigation = new UINavigationController(mainPage);
but, when inside forms context, when I affect Application.Current.MainPage, nothing happens. Does anyone know what can I do to make this navigation work?
Every time I should make a setup for new Device in the Emulator, and the application work but after that, the Emulator stop to work and show me this problem message:
> Severity Code Description Project File Line Suppression State
> Error The "ResolveLibraryProjectImports" task failed unexpectedly.
> System.IO.FileNotFoundException: Could not load assembly 'devliveryapp, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
> File name: 'devliveryapp.dll'
> at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
> at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
> at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection`1 jars, ICollection`1 resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
> at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
> at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() devliveryapp.Android
Do you know why?
Hi, this error always pop out: Unhandled Exception: System.TypeLoadException: Could not resolve type with token 01000007 from typeref (expected class 'Xamarin.Forms.Xaml.XamlResourceIdAttribute' in assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null') occurred. Is there somebody who can help me to solve this problem? Thanks
Hi, this error always pop out: Unhandled Exception: System.TypeLoadException: Could not resolve type with token 01000007 from typeref (expected class 'Xamarin.Forms.Xaml.XamlResourceIdAttribute' in assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null') occurred. Is there somebody who can help me to solve this problem? Thanks