Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 89864 articles
Browse latest View live

Unable to update Xamarin.Form to v2.5 in Xamarin.Android

$
0
0

Hi All. Currently I'm using Visual Studio 2017 version 15.5. I trying to upgrade my nuget Xamarin.Form from v2.3.4.231 to v2.5.
Portable project and Xamarin.iOS upgraded successsfully, but failed on Xamarin.Android. It will rolling back to previous version and shows error message "The Collection is read-only".
Thanks in advance for those who can point out my mistakes. :)


hiding Status bar and Nav bar on a Tabbed page

$
0
0

My customer has an app where they want to be able to hide the nav bar and status bar on a certain page. I can do this, but when I hide them, I'm left with a white space at the bottom of the page. Restoring the nav and status bar repaints correctly. At the moment I'm only concerned about iOS:

I hide/show the bars with this code (in a custom renderer for the TabbedPage)

    UIApplication.SharedApplication.SetStatusBarHidden(!arg, true);
    this.NavigationController.SetNavigationBarHidden(!arg, true);
    View.SetNeedsLayout();

Unfortunately, the client has placed the Tab controller within a Navigation controller, which I think is the root cause of this. Rearchitecting the app to fix that is beyond the scope of what we can do right now.

So is there a way I can force the tab bar to the bottom of the window and have my inner view size itself accordingly? I notice that if I rotate the app to landscape it resizes correctly, and if I rotate it back to portrait it again resizes correctly. But I'm not sure what I need to do to force that behavior without a rotation.

CrossGeoLocator plugin hanging

$
0
0

I have this code:

        var timeout = TimeSpan.FromSeconds(1);
         var locator = CrossGeolocator.Current;
         locator.DesiredAccuracy = 100.0;
         if (!CrossGeolocator.IsSupported || !locator.IsGeolocationAvailable || !locator.IsGeolocationEnabled )
         {
            return false;
         }
         var position = await locator.GetPositionAsync(timeout, null, true);
         double speedInMetersPerSecond =  position.Speed;

It consistently hangs on the next-to-last line. Are others experiencing this?

Thanks!

Using System.Reflection.BindingFlags in xamarin forms

$
0
0

Hi!
I'm trying to use BindingFlags and GetType().GetProperties() on a xamarin forms app. I have using System.Reflection on the top of the class, but i'm always getting "the name BindingFlags does not exist in the current context".

Do i need to add some package or some lib?

Thanks

local crypt storage system

$
0
0

Hello everyone I'm looking for a way or a technology that will allow me to distribute images but only visible through my application (Xamarin-form) a little like the steam system that allows you to download the game and being able to play it only via steam is pretty much what I need ... I did some research on how encrypted files but without any concrete results
Thanks for reading me

Update Picker ItemSource and SelectedItem in ViewModel in MessaginCenter.Subscribe Callback error.

$
0
0

Hi,

I'm facing a problem during the update of a Picker ItemSource and SelectedItem in the ViewModel during a callback of a received message.

I'm using XF 2.5.0 and I've reproduced the error on emulator with Android 6 and also on a physical device with Android 7 (so actually on every device I have).

I've a modal main page with a picker binded with an observablecollection in the viewmodel. In the main page there is a button that when clicked push a new modal page that allows to create a new item that will replace the Picker ItemSource as unique member.

When the page for adding a new element disappear the picker appears with nothing selected; if I touch the picker the new element is visible.

If I put a breakpoint in the Setter of the ItemSelected I can see that is called twice: the first with the new item value, the second with null.

I've tried using different binding mode but it doesn't work.

This is the MainPage:

    <StackLayout>
        <Picker x:Name="PickerItems"
                ItemsSource="{Binding ItemsList}"
                ItemDisplayBinding="{Binding Description}"
                SelectedItem="{Binding ItemSelected, Mode=TwoWay}"
                HorizontalOptions="FillAndExpand"
                TextColor="Black"
                Margin="0" />
        <Button Command="{Binding AddItemCommand}" Text="Add item" IsVisible="True"/>
    </StackLayout>

In the viewModel of the main page the command is managed this way:

    public ICommand AddItemCommand => new Command(async () => await AddItemCommandAsync());

        protected virtual async Task AddItemCommandAsync()
        {
            MessagingCenter.Subscribe<UpdateItemData>(this, "UpdateItem", async (model) =>
            {
                MessagingCenter.Unsubscribe<UpdateItemData>(this, "UpdateItem");

                List<PickerItem> list = new List<PickerItem>();
                list.Add(model.PickerItem);

                ItemsList = new ObservableCollection<PickerItem>(list);
                ItemSelected = ItemsList.First();
            });

            NewPickerItemViewModel viewModel = new NewPickerItemViewModel();
            NewItemPage newItemPage = new NewItemPage(viewModel);

            await Navigation.PushModalAsync(newItemPage);
        }

On AddItemCommand a new modal page is pushed on the navigation stack. This page is very simple:

        <StackLayout>

            <Entry TextColor="Black"
                   Text="{Binding Description}" />

            <Button Command="{Binding NewItemCommand}"
                    Text="Create" />

            <Button Command="{Binding BackCommand}"
                    Text="Back" />

        </StackLayout>

When NewItemCommand in the viewmodel is:

       public ICommand NewItemCommand => new Command(async () => await NewItemCommandAsync());

        private async Task NewItemCommandAsync()
        {
            UpdateItemData updateItemData = new UpdateItemData();
            PickerItem pickerItem = new PickerItem();

            pickerItem.Description = Description;
            pickerItem.Id = 0;

            updateItemData.PickerItem = pickerItem;

            MessagingCenter.Send(updateItemData, "UpdateItem");

            await Navigation.PopModalAsync();
        }

Do you have any suggestion?

Best regards

Andrea

emulator error

$
0
0

1>Starting emulator Android_Accelerated_Nougat ...
1>C:\PROGRA~2\Android\ANDROI~1\tools\emulator.EXE -partition-size 512 -no-boot-anim -avd Android_Accelerated_Nougat -prop monodroid.avdname=Android_Accelerated_Nougat
1>emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-qemu" is in the same location as your system image.
1>emulator: ERROR: ANDROID_SDK_ROOT is undefined
1>The selected emulator couldn't be started. This can be caused by the process not having enough permissions. Please try to start VS as administrator, which can help to avoid it.
1>Emulator Android_Accelerated_Nougat cannot be started.

what is this... help me

Set Transparent Background color of Navigation Bar

$
0
0

Hi ,

I tried to set the transparent background color of the navigation bar using below code snippet, But I can't able to proceed this.

For more info please find the snap


Xamarin Forms - Make Toolbar Transparent

$
0
0

Hey guys ,

Is there any way to make the navbar transparent or set the opacity ?

BarBackgroundColor = Color.Blue;

How to implement localization in the latest 2017 VS without using PCL?

$
0
0

Hello

In previous projects I used the resx/PCL approach to implement localization in my Xamarin.forms solutions. As of the update to VS, this has been deemed deprecated and the information I find instruct me to "use the .NET standard".

When trying to implement a resx language file, the strongly typed connection is no longer available and the ResXFileCodeGenerator tool for converting resx to designer.cs "does not exist in a non .NET environment".

VS still allows me to add a PCL project to my Xamarin.forms, but since it has officially been depricated, I do not want to use that.

The article at Xamarin describing how to do it (https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/), has yet to be updated to use .NET standard, where the resx file is automatically converted into a designer.cs file, that used to enable the strongly typed use of strings.

Are there anyone out there that could help me create a way to use localization in the latest VS 2017 (for Mac) without using a PCL nor individual implementation of localization in separate platforms (Andorid/iOS)?

iOS Map Memory Leaks

$
0
0

I'm running the latest version for Forms and iOS, and I am seeing VKMapView crashes occurring on iOS when navigating between pages with Map controls on them.

Anyone else seeing this behavior? If so, are there are any workarounds? I've included my crash log.

Thread 0 name: tid_303 Dispatch queue: com.apple.main-thread
Thread 0:
0 libc++.1.dylib 0x00000001833b7fcc std::1::__shared_weak_count::lock() + 4
1 VectorKit 0x0000000194096174 gss::StylesheetManager::clearCaches() + 88
2 VectorKit 0x0000000194091628 -[VKMapModel flushCaches:] + 140
3 VectorKit 0x000000019404a300 md::CartographicRenderer::prune(md::PruneLevel) + 44
4 VectorKit 0x0000000194055e00 -[VKMapView didReceiveMemoryWarning:] + 232
5 VectorKit 0x0000000194194d84 -[VKMemoryObserver triggerMemoryNotification:] + 116
6 VectorKit 0x0000000194194e30 __56-[VKMemoryObserver initWithTarget:selector:taskContext:]_block_invoke + 44
7 libdispatch.dylib 0x0000000183b36a14 _dispatch_client_callout + 12
8 libdispatch.dylib 0x0000000183b73640 _dispatch_continuation_pop$VARIANT$armv81 + 416
9 libdispatch.dylib 0x0000000183b7c858 _dispatch_source_invoke$VARIANT$armv81 + 524
10 libdispatch.dylib 0x0000000183b77b64 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 680
11 CoreFoundation 0x0000000184162544 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
+ 8
12 CoreFoundation 0x0000000184160120 __CFRunLoopRun + 2008
13 CoreFoundation 0x000000018407fe58 CFRunLoopRunSpecific + 432
14 GraphicsServices 0x0000000185f2cf84 GSEventRunModal + 96
15 UIKit 0x000000018d7d467c UIApplicationMain + 232

Why is Xamarin.Forms.Platform.UWP.ConvertExtensions marked as internal?

$
0
0

How can we access the extension function ToWindowsColor?

Xamarin Forms Still Alive?

$
0
0

Hi guys,

I just wanted to make sure Xamarin Forms is being actively worked by the team. I do see some activity; however, I don't think I've seen a release in awhile (since December). I checked the release schedule on nuget, and releases were a lot more frequent. Is Xamarin Forms no longer a priority? I certainly hope not.

How to send multiple content to the post server method

$
0
0
I want to send multiple records to database in the sever at the same time

Rounded/Circle Button with FontIcon: what is the better way?

$
0
0

I try to create a Rounded/Circle Button that can display font icons. As I already use Iconize in my project, I tried to create the Rounded/Circle Button from the existing IconButton.

I first tried this, by fixing BorderRadius as the half value of the HeightRequest/WidthRequest:

<iconize:IconButton HeightRequest="40" WidthRequest="40"
                    BorderRadius="20"
                    Text="fa-500px" TextColor="Red" FontSize="20"
                    BackgroundColor="Orange" BorderColor="Red"
                    BorderWidth="2"
                    VerticalOptions="Start" HorizontalOptions="Center">
</iconize:IconButton>

The default rendering works as expected on UWP, but the "clicked" rendering is not good, as a rectangle is appearing. However on Android, the button is always in "default" mode: there is no border, no background, ...

So I've added a FlatButton control, and a Renderer for Android:

public class FlatButton : IconButton
{
}

[assembly: ExportRenderer(typeof(FlatButton), typeof(FlatButtonRenderer))]
namespace Iconize.Sample.Droid.Renderers
{
    public class FlatButtonRenderer : ButtonRenderer
    {
        protected override void OnDraw(Android.Graphics.Canvas canvas)
        {
            base.OnDraw(canvas);
        }

        protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
        {
            base.OnElementChanged(e);
        }
    }
}

And I use it like this:

<controls:FlatButton HeightRequest="40" WidthRequest="40"
                    BorderRadius="20"
                   Text="fa-500px" TextColor="Red" FontSize="20"
                   BackgroundColor="Orange" BorderColor="Red"
                   BorderWidth="2"
                   VerticalOptions="Start" HorizontalOptions="Center">
</controls:FlatButton>

This time, the rounded rendering is fine on Android, but I've lost the "display" of the font icon.

Here is a screenshot:

Is there a way to keep the rounded renderer and the icon display? And in a second time, is there a way to fix the rendering issue on UWP when the button is clicked?

I also looked other plugins:

  • Flexbutton: seems to work fine, but there is no UWP support
  • ButtonCirclePlugin: I wasn't able to use it in my solution, and the I wasn't able to built the provided sample...

Would you have other suggestions?


iOS Remove ListView Animations (Add & Update Rows)

$
0
0

How can i remove the add/update rows animation from a listview in iOS?
In my custom ListViewRenderer i can access UITableViewRowAnimation, since the base ListViewRenderer has them:

public class ListViewRenderer : ViewRenderer<ListView, UITableView>
{
        ....

        protected UITableViewRowAnimation InsertRowsAnimation { get; set; } = UITableViewRowAnimation.Automatic;
        protected UITableViewRowAnimation DeleteRowsAnimation { get; set; } = UITableViewRowAnimation.Automatic;
        protected UITableViewRowAnimation ReloadRowsAnimation { get; set; } = UITableViewRowAnimation.Automatic;
        protected UITableViewRowAnimation ReloadSectionsAnimation
        {
            get { return _dataSource.ReloadSectionsAnimation; }
            set { _dataSource.ReloadSectionsAnimation = value; }
        }
        ....
}

When i try to set "InsertRowsAnimation" and "DeleteRowsAnimation" to "UITableViewRowAnimation.None" in my Renderer at OnElementChanged, it doesn't seem to do anything. The listview is still animated.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocatio

$
0
0

Hi I got this error when i navigate to a page from a list view in xamarin forms . I can't find the actual problem can any one help he to find where the problem is happening from this report . am using MVVMLight
[0:] Error NavigateTo BenWorkTasksPage. Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Specified cast is not valid. at Xamarin.Forms.Label.FontStructPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00000] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x0010e] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle, Boolean checkAccess) [0x0005f] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle) [0x00000] in <filename unknown>:0 at Xamarin.Forms.Setter.Apply (Xamarin.Forms.BindableObject target, Boolean fromStyle) [0x000a4] in <filename unknown>:0 at Xamarin.Forms.Style.ApplyCore (Xamarin.Forms.BindableObject bindable, Xamarin.Forms.Style basedOn) [0x0001e] in <filename unknown>:0 at Xamarin.Forms.Style.Xamarin.Forms.IStyle.Apply (Xamarin.Forms.BindableObject bindable) [0x0003e] in <filename unknown>:0 at Xamarin.Forms.VisualElement+MergedStyle.SetStyle (IStyle implicitStyle, IStyle classStyle, IStyle style) [0x00111] in <filename unknown>:0 at Xamarin.Forms.VisualElement+MergedStyle.set_Style (IStyle value) [0x0000d] in <filename unknown>:0 at Xamarin.Forms.VisualElement+<>c.<.cctor>b__211_6 (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x00000] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x0010e] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle, Boolean checkAccess) [0x0005f] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in <filename unknown>:0 at IWSM.XamarinApp.Views.BenWorkTasksPage.InitializeComponent () [0x0af0c] in <filename unknown>:0 at IWSM.XamarinApp.Views.BenWorkTasksPage..ctor (IWSM.Shared.DataModels.WorkTaskDataModel wtdm) [0x00008] in D:\Shamnad_TFS_Workspace\IWSM.XamarinApp\IWSM.XamarinApp\IWSM.XamarinApp\Views\BenWorking\BenWorkTasksPage.xaml.cs:31 at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:644 --- End of inner exception stack trace --- at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00016] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:650 at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00089] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:635 at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:663 at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62 at IWSM.XamarinApp.Common.NavigationService+<NavigateTo>d__15.MoveNext () [0x00173] in D:\Shamnad_TFS_Workspace\IWSM.XamarinApp\IWSM.XamarinApp\IWSM.XamarinApp\Common\NavigationService.cs:115 [0:] OnItemTapped: IWSM.Shared.DataModels.WorkTaskDataModel [0:] Error NavigateTo BenWorkTasksPage. Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Specified cast is not valid. at Xamarin.Forms.Label.FontStructPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00000] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x0010e] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle, Boolean checkAccess) [0x0005f] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle) [0x00000] in <filename unknown>:0 at Xamarin.Forms.Setter.Apply (Xamarin.Forms.BindableObject target, Boolean fromStyle) [0x000a4] in <filename unknown>:0 at Xamarin.Forms.Style.ApplyCore (Xamarin.Forms.BindableObject bindable, Xamarin.Forms.Style basedOn) [0x0001e] in <filename unknown>:0 at Xamarin.Forms.Style.Xamarin.Forms.IStyle.Apply (Xamarin.Forms.BindableObject bindable) [0x0003e] in <filename unknown>:0 at Xamarin.Forms.VisualElement+MergedStyle.SetStyle (IStyle implicitStyle, IStyle classStyle, IStyle style) [0x00111] in <filename unknown>:0 at Xamarin.Forms.VisualElement+MergedStyle.set_Style (IStyle value) [0x0000d] in <filename unknown>:0 at Xamarin.Forms.VisualElement+<>c.<.cctor>b__211_6 (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x00000] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x0010e] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle, Boolean checkAccess) [0x0005f] in <filename unknown>:0 at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in <filename unknown>:0 at IWSM.XamarinApp.Views.BenWorkTasksPage.InitializeComponent () [0x0af0c] in <filename unknown>:0 at IWSM.XamarinApp.Views.BenWorkTasksPage..ctor (IWSM.Shared.DataModels.WorkTaskDataModel wtdm) [0x00008] in D:\Shamnad_TFS_Workspace\IWSM.XamarinApp\IWSM.XamarinApp\IWSM.XamarinApp\Views\BenWorking\BenWorkTasksPage.xaml.cs:31 at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:644 --- End of inner exception stack trace --- at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00016] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:650 at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00089] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:635 at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:663 at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62 at IWSM.XamarinApp.Common.NavigationService+<NavigateTo>d__15.MoveNext () [0x00173] in D:\Shamnad_TFS_Workspace\IWSM.XamarinApp\IWSM.XamarinApp\IWSM.XamarinApp\Common\NavigationService.cs:115

Android accessibility - adjusting control sizes to account for increased font size

$
0
0

On Android, it's possible for the user to set a larger font for accessibility reasons.

Discussions like this one go into some details on how/whether the named or fixed (number) sizes are affected by accessibility settings.

I have a slightly different question. Is there a way to adjust the size of controls to account for font size? With our app, if the user sets a large font size under Accessibility, then the text in buttons, Infragistics DataGrids, ListViews etc. don't fit into their controls. Am I missing something?

Context is obsolete as of version 2.5

$
0
0

I updated my project to Xamarin forms 2.5. When I use Xamarin.Forms I get warning:

  Context is obsolete as of version 2.5. Please use a local context instead

How use local context instead?

Scaling images and drawings based on DPI

$
0
0

I'm having a lot of trouble scaling images and SkiaSharp drawings on different Android devices. I've searched everywhere for guides and how to's but I'm probably more confused than I was before. The documentation isn't very helpful in this aspect. this is what i drew as a radial guage and it's showing all sorts of sizes on different android devices

void DrawBackgroundArc(SKCanvas canvas, SKImageInfo info)
{
SKPaint paint = new SKPaint
{
IsAntialias= true,
Style = SKPaintStyle.Stroke,
Color = SKColor.Empty,
StrokeWidth = 25
};

        //Make sure to account for the different size screens here
        SKRect rect = new SKRect((info.Width / 2) - 90, (info.Height / 2) - 90, (info.Width / 2) + 90, (info.Height / 2) + 90);

}

Viewing all 89864 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>