In the ContentPages created after upgrade to XF 4.x, the XAML components are not shown in the intellisence in the .cs file. The XAML headers are different in the old and new ones. Is that a reason?
Hi Dear Reader, I have created a simple XF project in VS 2019 - latest upgrades, with Xamarin Forms (latest stable) using a Blank template. When I tried to add a LauncScreen.storyboard (becasue none was created in the template) I got the messages below.
When I created a new Tabbed project (including UWP) it created a LaunchScreen.storyboard, but when I double clicked it, the editor was opened but I got a similar set of errors.
Any ideas as to what is wrong with my installation?
Where can I find a site that has current instructions for creating a Launch screen in Xamarin Forms - iOS?
Thanks!
Will
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> MonoTouch.Design.Client.InvalidSessionException: Error in the application.
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning) in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 235
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse](CommandRequest req, Boolean throwIfNotRunning) in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 111
at MonoTouch.Design.Client.ServerProcessConnection.b__28_0() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 116
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task1.get_Result() at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass289_11.b__1(Task1 t) in E:\A\_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 2073 at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass289_01.<EnsureSession>b__0() in E:\A\_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 2139 at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MonoTouch.Design.Client.IPhoneDesignerSession.d__191.MoveNext() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 748
--- End of stack trace from previous location where exception was thrown ---
at MonoTouch.Design.Client.IPhoneDesignerSession.d__191.MoveNext() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 755
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MonoTouch.Design.Client.IPhoneDesignerSession.d__190.MoveNext() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 733
--- End of stack trace from previous location where exception was thrown ---
at MonoTouch.Design.Client.IPhoneDesignerSession.d__190.MoveNext() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 741
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at MonoTouch.Design.Client.IPhoneDesignerSession.d__186.MoveNext() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 622
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MonoTouch.Design.Tasks.d__1.MoveNext() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Shared\TaskExtensions.cs:line 28
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MonoTouch.Design.Client.IPhoneDesignerSession.d__185.MoveNext() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 574
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> MonoTouch.Design.Client.InvalidSessionException: Error in the application.
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning) in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 235
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse](CommandRequest req, Boolean throwIfNotRunning) in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 111
at MonoTouch.Design.Client.ServerProcessConnection.b__28_0() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 116
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task1.get_Result() at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass289_11.b__1(Task1 t) in E:\A\_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\IPhoneDesignerSession.cs:line 2073 at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) MonoTouch.Design.Client.InvalidSessionException: Error in the application.
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning) in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 235
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse](CommandRequest req, Boolean throwIfNotRunning) in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 111
at MonoTouch.Design.Client.ServerProcessConnection.b__28_0() in E:\A_work\129\s\Xamarin.Designer.iOS\MonoTouch.Design.Client\Connection\ServerProcessConnection.cs:line 116
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---
<---
and the listing goes on and on - way too long for this post...
Hi everyone,
I meet the problem, that I have to advertise custom name (LocalName) on both Android and iOS via Bluetooth Low Energy.
I use Gatt Server functionality from this plugin github.com/aritchie/bluetoothle
But it mentioned that it can't advertise LocalName on Android specifically github.com/aritchie/bluetoothle/blob/master/docs/advertising.md . I don't know why. But device is only searchable without name (N/A) when running on Android.
Do someone know how to get around of this limitation?
Hola a todos tengo una aplicacion web con asp net core y xamarin form en donde envio las imagenes a mi movil pero no aparecen las envio por uri y estoy usando una direccion ssl, pero no me muestran las imagenes y si estan bien dioreccionadas, favor au ayuda comunidad
I am trying to set a whole stack layout and a frame child to 0.3 opacity with c#, but when I set the Opacity property, it sets it to the child labels too.
However its seems to be just plain unrecognized to my IDE.
Visual Studio 2019, latest as of 15nov2019
Xamarin.Forms 4.3.xx, latest as of 15nov2019
New-ish basic app from current templates, that I use for testing such things.
I try the markup as described both in the docs and the blog... Nope. Unrecognized and doesn't bind to the property.
Has anyone else made it work? Is there a tip/trick in the documentation I'm just missing? Does it require an experimental SetFlags like CollectionView_Experimental and Shell_Experimental required?
Today I started getting this deployment error on android:
Severity Code Description Project File Line Suppression State
Error ADB0030: Mono.AndroidTools.RequiresUninstallException: The installed package is incompatible. Please manually uninstall and try again.
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A_work\267\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 339
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.b__0(Task1 t) in E:\A\_work\267\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753 at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AndroidDeviceExtensions.d__11.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Devices\AndroidDeviceExtensions.cs:line 187
--- End of stack trace from previous location where exception was thrown ---
at AndroidDeviceExtensions.d__11.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Devices\AndroidDeviceExtensions.cs:line 194
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at AndroidDeviceExtensions.d__11.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Devices\AndroidDeviceExtensions.cs:line 203
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.d__112.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Sessions\AndroidDeploySession.cs:line 414
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.d__106.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Sessions\AndroidDeploySession.cs:line 217
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.d__104.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Sessions\AndroidDeploySession.cs:line 119 0
It only happens in Debug, but in Release i can deploy and run the app just fine.
Why is this happening?
This morning i installed the Android SDK 10.0 and I suspect it started after that, so now I uninstalled it, but I still can't deploy because of the same error.
Other apps from the same PC can be deployed just fine, so I don't get it...
I am having some issues with setting the status bar color and the selected tab underline color in xamarin forms, especially android.
Status Bar
I thought that setting the colorPrimaryDark would set the status bar background color: <item name="colorPrimaryDark">@color/primaryDark</item>
Which i set to yellow as a test, but instead it look black, with no text. If I swipe down from the top of the screen then somehow the text (time, battery, carrier etc show).
Tab Underline
I do this but the tab underline is still white:
Hi all,
i can't able to send email in ios using xamarin essentials.i am getting the error like
Object reference not set to an instance of an object
at Xamarin.Essentials.Email.GetMailToUri (Xamarin.Essentials.EmailMessage message) [0x000a9] in C:\agent_work\78\s\Xamarin.Essentials\Email\Email.shared.cs:36
at Xamarin.Essentials.Email.ComposeWithUrl (Xamarin.Essentials.EmailMessage message) [0x00006] in C:\agent_work\78\s\Xamarin.Essentials\Email\Email.ios.cs:64
at Xamarin.Essentials.Email.PlatformComposeAsync (Xamarin.Essentials.EmailMessage message) [0x0000e] in C:\agent_work\78\s\Xamarin.Essentials\Email\Email.ios.cs:29
at Xamarin.Essentials.Email.ComposeAsync (Xamarin.Essentials.EmailMessage message) [0x0000d] in C:\agent_work\78\s\Xamarin.Essentials\Email\Email.shared.cs
if any one have idea please let me know
Thanks In Advance
Basically, I am adding a trash can icon on every row and Binding the method DeleteCommand passing the parameter of the object on that row (which is actually a class for AddressType.
In my ViewModel, the following is where I wire up the commands. Snippet:
void DeleteCommandExecute(AddressType address)
{
if (IsBusy)
return;
IsBusy = true;
In my codebehind file, I set the BindingContext to the viewmodel
private AddressTypeViewModel viewModel;
public AddressTypes()
{
InitializeComponent();
BindingContext = viewModel = new AddressTypeViewModel();
stack = Addresspopup.PopupView.ContentTemplate.CreateContent() as StackLayout;
}
The DeleteCommand never executes. It appears no binding occured (even though the {Binding AddressTypeName} works as expected.
I have no idea why.
I also tried just catching the Tap event in my code behind by doing this in my XAML:
I added this to my code behind:
public void OnDelete_Tapped(object sender, EventArgs e)
{
viewModel.DeleteCommand.Execute(e); //deletes the item
viewModel.LoadAddressTypesCommand.Execute(true); //reload the addresstypes
}
The DeleteCommand does NOT execute! I put a breakpoint in that method in my view model - nothing happens - never hits it.
Can someone shed any light on this? Thanks in advance!
Hi, I'm looking at using something I can use to play music and sound effects. I've come across the Media Manager and read a few things about it, but I cannot get it to play my audio file. I dunno if I am using the wrong code or my file directory for Android isn't correct. I have XAML calling an image from the same location and there are no compilation errors that it can't find the file.
I've also tried using the same play call in the button events but they are also unresponsive to play the audio. Though I can get it to crash by having it do an await on CrossMediaManager.Current.Play("ZeldaTheme.mp3"); in one of my button calls.
I have many apis calls in a single page. The approach i am currently using is start a await Task.Run(() thread, do fetch operation, start Main Thread and do UI operations. The app works smooth but after few navigation, it stops responding. With some research it found thus can be due to main thread. Is this the correct way implementation, that i am using?
We are using Xamarin.Forms and have a fairly standard ListView with some Context Actions in the ViewCell.
<StackLayout>
<!-- Place new controls here -->
<ListView x:Name="ItemList" SelectionMode="Single">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.ContextActions>
<MenuItem Text="Action 1" IsDestructive="False"/>
</ViewCell.ContextActions>
<Label Text="{Binding .}" Margin="12"/>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
On iOS these action appear when you swipe the list item, on Android it seems you have to do a Long Press to show the action bar, this is fine but our problem is when you do long press the item isn't highlighted.
This is made even worse if you single click an item, this is then highlighted you then long press a different item and the action bar appears but the first item is still selected (although the action is bound to the item that was long pressed).
Is there a simple solution to this as selecting and performing actions on a list items is a fairly standard pattern and currently on Android it isn't a great user experience.
I have been modifying the Todo app that uses Forms and replaced the note Entry class with the Editor class, so the todo can hold multiline notes. However the editor does not expand as new lines are entered. I have a Forms Editor Control nested inside a stack layout / scroll view - how do I allow the editor to grow each time the user enters another line of data? I had some success by count the '\n' characters in the text each time it changes and making a HeightRequest to the Editor, but I don't know how to calculate the exact extra height to add for each row in a reliable way. This process also feels clunky too. Can the editor control not be told to simply grow as new content is added by the user?