Is it bug that RendererFactory.GetRenderer(Forms.View) doesn't return child content? For instance if you call this with non-empty Grid (for ex. with few buttons) only the Top-Level element would be visible (only grid).
RendererFactory.GetRenderer() - is it bug - child content?
How to Sync DB With API?
I need to sync DB data with API. Is there is any convenient way or plugins available is xamarin to do this in an efficient way?
Any Suggestion??
Xamarin Controls or C# Class (object) data storage
Hi All,
Just wanted to know where c# (list) class stored the data in which memory (RAM or ROM).
As far as I know, when object is created the space is allocated for it's member (Variable/Properties or function) and stored all the data in RAM. So is it possible to access that data outside scope.
Is it possible to have overtype functionality in Entry
Hi,
I would like my entry to behave in overtype mode. Like when you press insert key in windows, and the type, the letter that you type will replace the letters instead of appending in between of that. Is it possible to achieve something like that with Entry? Maybe by using a custom renderer or something like that?
Thank you for your insights.
BR,
Denis
Draw Circle in xamarin form
Hi All,
Just list as "BoxView" control create "rectangle" shape in xamarin, how to i create "Circle" for slide image in CarouselView?
Please help.
Xamarin Forms 3.3.0 error: No property, bindable property or event found for UWP
I met strange error for UWP from following xaml:
<ContentPage.ToolbarItems>
<ToolbarItem Text="{Binding [SelectData]}" Command="{Binding AddNewDataCommand}">
<ToolbarItem.Icon>
<OnPlatform x:TypeArguments="FileImageSource" iOS="data.png" UWP="Assets/data.png"/>
</ToolbarItem.Icon>
</ToolbarItem>
...
</ContentPage.ToolbarItems>
When compile, I got:
No property, bindable property, or event found for 'UWP', or mismatching type between value and property.
Why ?
What is the special formula or code word for xamarin in visual studio's settings to make it compile
My goodness the errors just don't stop coming...
So I was trying to get a screen shot for another issue I have with the way something displays in apple and how it displays in Android so I thought I would get a screen in apple and switch start up projects and get a screen shot in Android..and of course there are going to be errors...
I switched from apple back to android and I get errors... (why would I expect anything else...)
Any way can some one give me a clue of how I can configure this project so that can successfully debug without jumping through hoops.
Here is my error... I was simply trying to get a screen shot of the app in the android simulator.
As a side note... this worked just an hour ago... as I was running this in android sim before unloading the project so that I could get the apple project to work...and I guess this some how breaks the android project every time...
And ideas or tips would be helpful and I would be grateful. Thanks
Error ADB0020: The package does not support the CPU architecture of this device.
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.b__0(Task1 t) at System.Threading.Tasks.ContinuationTaskFromResultTask
1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
ADB0000: Deployment failed
Xamarin.AndroidTools.AndroidDeploymentException: ArchitectureNotSupported ---> Mono.AndroidTools.IncompatibleCpuAbiExceptiopn: The package does not support the CPU architecture of this device.
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.b__0(Task1 t) at System.Threading.Tasks.ContinuationTaskFromResultTask
1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidDeploySession.d__107.MoveNext()
--- 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__101.MoveNext()
--- 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__99.MoveNext()
Xamarin UWP Map is blank
my maps on UWP is blank, just a black screen with the zoom buttons. i have given capabilities, put the init codes in the UWP app.xaml.cs.
HELP
Trying to display elements over a semi translucent background
I have a page with a background image on which I'd like to display elements with a semi-transparent background. For example, a StackLayout with some labels that has a white, but semi-transparent, background so the page's background image shows partially through. I had hoped this could be achieved by simply setting opacity on the VisualElement, but unfortunately setting opacity affects both foreground and background, so the text in the labels is dimmed. Not the effect I'm going after - I want the text bright and fully opaque.
How can I achieve this effect without dimming the foreground of the elements inside the stacklayout?
Is there any way to implement Stripe card widget in the Xamarin.Forms?
Is there any way to implement Stripe card widget in the Xamarin.Forms? for Android and iOS
Something like this?
https://stripe.com/docs/mobile/ios
Debugging Session issues.
A number of versions ago I started noticing odd debugging to device behaviours, I'm wonder if someone here can shed light on my situation. I'm debugging my Xam Forms PCL project to a Sony Xperia Android device. On the device I use SQLite to store some local data for the app. In the past, no matter how many times I unplug my device and plug it back in - the SQLite data source always persisted between debugging sessions. Recently I've started noticing this data being cleared whenever I unplug and replug in the device... Its frustrating as I have to keep re-entering credentials each time. If I leave the device plugged in it does keep the sqlite details for multiple debug sessions, but once I go for a break - unplug the phone and then re-plug it in - my local data source vanishes?
Furthermore - after initial plug-in and on first debug session - it is taking the Visual Studio 2017 8 minutes....YES 8 MINUTES to start the app... Once it has started this delay shortens drastically, but once I replug it in - its again 8 minutes for the first debug session.... Wasting lots of my time....
Anyone else experienced this? Any suggestions of how to find the cause of the problem also welcomed...
Hover Effect is not working properly on button in Xamarin UWP
I tried to add a hover effect for a button.
Following code shows a custom class created in UWP
[assembly: ResolutionGroupName("MyCompany")]
[assembly: ExportEffect(typeof(FocusEffect), "FocusEffect")]
namespace EffectsSample.UWP
{
class FocusEffect : PlatformEffect
{
protected override void OnAttached()
{
try
{
(Control as Windows.UI.Xaml.Controls.Control).PointerEntered += pointer_Entered;
}
catch (Exception ex)
{
Debug.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
}
}
private void pointer_Entered(object sender, RoutedEventArgs e)
{
(this.Control as Windows.UI.Xaml.Controls.Control).Background = new SolidColorBrush(Colors.Red);
}
protected override void OnDetached()
{
}
}
}
Effect is added to button in xaml like below:
<Button Text="Button">
<Button.Effects>
<local:FocusEffect />
</Button.Effects>
</Button>
The issue is that background is not changing on Pointer Enter Event. Instead it changes on Pointer Exit.
Any help will be appreciated!
Showing a picker after a button click
Hi,
I want to show a picker after a buttonclick to change the color of a boxview. How can I show/hide a picker in a button click event? This is my code:
public partial class MainPage : ContentPage
{
public MainPage ()
{
InitializeComponent ();
}
Dictionary<string, Color> nameToColor = new Dictionary<string, Color>
{
{ "Aqua", Color.Aqua }, { "Black", Color.Black },
{ "Blue", Color.Blue }, { "Fuschia", Color.Fuschia },
{ "Gray", Color.Gray }, { "Green", Color.Green },
{ "Lime", Color.Lime }, { "Maroon", Color.Maroon },
{ "Navy", Color.Navy }, { "Olive", Color.Olive },
{ "Purple", Color.Purple }, { "Red", Color.Red },
{ "Silver", Color.Silver }, { "Teal", Color.Teal },
{ "White", Color.White }, { "Yellow", Color.Yellow }
};
private void ChangeColorButton_Click(object sender, EventArgs e)
{
_showColorPicker ();
}
private void _showColorPicker() {
Picker picker = new Picker
{
Title = "Color",
VerticalOptions = LayoutOptions.CenterAndExpand
};
foreach (string colorName in nameToColor.Keys)
{
picker.Items.Add(colorName);
}
picker.SelectedIndexChanged += (sender, args) =>
{
if (picker.SelectedIndex > -1)
{
string colorName = picker.Items[picker.SelectedIndex];
ColorBox.Color = nameToColor[colorName];
}
};
}
}
How to get live/continious audio stream from mobile microphone
is it possible to get live audio stream from mobile mic with specified PCM format, so that I can use that stream in a socket connection.
Image above tabbedpage
How can I put an image above tabbedpage?
What alternatives do I have for an equal design?
Xaml set property conditionally
I have the following XAML:
<ffimg:CachedImage HeightRequest="400" WidthRequest="400" Source="{Binding ImageUrl}">
<fffimg::CachedImage.Transformations>
<fftransformations:CircleTransformation/>
</ffimg::CachedImage.Transformations>
</ffimg::CachedImage>
I would like to set the <fftransformations:CircleTransformation/>
only if : {Binding IsRoundImage}
. Is it possible to do this directly in XAML? I have tried DataTriggers but it doesn't work.
Can you have a generic MessagingCenter subscripton that will accept messages from classes
Hi,
in my application I have multiple implementations of RFID readers and I have created an Interface than encapsulates common reader actions. So for example I have interface IReader, and then classes ReaderA, ReaderB which each holds it's own implementation of different reader and their action. The reader is a singleton inside my App class. Each Reader sends a message via MessagingCenter everytime when a new tag is detected.
Example of .Send method inside ReaderA class:
MessagingCenter.Send(this, "Rfid", new CustomTag
{
Id = "123",
ScannedDate = DateTime.UtcNow
});
So when I subscribe to the message inside my ContentPage, this will work:
MessagingCenter.Subscribe<ReaderA, CustomTag>(this, "Rfid", (sender, item) => {
//TODO: process result
});
But since the actual implementation of reader will vary, this won't work when my reader will use an instance of ReaderB class. I tried to use the IReader as the sender type inside the subscribe method, but with no success. I also tried to create a base class (BaseReader) and to subscribe to it, send as it, etc. and nothing works. So the botton examples will never fire:
class ReaderA : BaseReader, IReader
{
//...
}
MessagingCenter.Subscribe<IReader, CustomTag>(this, "Rfid", async (sender, item) => {
//TODO: process result
});
MessagingCenter.Subscribe<BaseReader, CustomTag>(this, "Rfid", async (sender, item) => {
//TODO: process result
});
Sure I could just have a separate subscription call for my ReaderB, but I would prefer to just make one generic subscription. Is it possible to do this and how to accomplish it? Thank you for all suggestions and provided answers
[UWP] ToolBarItem icon is not shown on first page
When my application loads, no icon is shown in my ToolBarItem. See below screenshot:
If I click a menu item that opens the same page again, then the icon shows correctly:
There isn't a lot of magic to my page, and the ToolBarItem is pretty simple:
Any ideas for why it doesn't show on first load?
How to open default contacts app in xamrin forms?
How to open default contacts app in xamrin forms?
Scrolling is not working in xamarin.Ios Editor control
we are displaying simple text in editor control when we assign the text to control from code section. scrolling is not working when i try to edit the text in editor control in ios application but for android it is working fine..