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

Add TabStrip em iOs using Xamarin Forms

$
0
0

Hello everyone, I'm trying to develop TabStrip in iOs, using Xamarin Forms, using this code from GitHub https://github.com/supersume/XLPagerTabStrip, I was able to translate it to work using Xamarin Forms, but it's not showing the content of the page. Could someone please help me, I do not have much knowledge on iOS.

The sample code is attached.


Mixing Tabbed Pages and Content Pages with Login and Logout

$
0
0

Hi,

I am new to Xamarin (and coding in general, but learning...) and have a question about switching pages.

I have a Login page which is called on Startup This is a ContentPage.

**Login.xaml **

Upon successful login it fires this. I don't want the MainPage to have a "Back" button to go back to the login screen

Login.xaml.cs

MainPage.xaml is a TabbedPage with Navigation

Each of the pages there are all Valid. The Settings page has a Logout button.
**
Settings.xaml**

With the Logout in Settings.xaml.cs doing this

But the end result is that I have the Login screen... with the Tab bar at the bottom

What have I done wrong? I'd like it so when I logout the tabs aren't visible.

Thanks,
Matt

Error when export APK and install this APK file with Xamarin Forms

$
0
0

I have used release mode and debug mode too with Xamarin.forms:

Build-> Archive for Publishing wizard.
After publishing, I selected Ad Hoc and saved the APK to my local drive.

I have min SDK version API level 15 (4.0.3) with target API 23, I have required permission.
I have selected all items from list on Suported ABIs (armeabi, armeabi-v7a, x86, x86_64 and arm64-v8a)
I test with my Nexus 5 with 6.0.1 but I send APK

Always show same error...
(Spanish) Error de análisis
se ha producido un error al analizar el paquete

(English) Parse error
There was a problem parsing the package

I have tested with my custom application and I have generated a sample APK for this library
https://components.xamarin.com/view/zxing.net.mobile.forms

Why?

How change image colors?

$
0
0

Recently I came across the need to build an APP that changes the color of images walls taken from the camera by selecting a color and clicking on the wall
and only the color of the wall in the image would change.
Is there any known api that can help me with this?

Thanks

Resize X labels on Syncfusion chart. I'm not able to get it working

$
0
0

Hello, everyone:

I was playing around with SyncFusion charts. I have an example that uses it and was trying to modify it to know how it works.
I was able to modify all aspects of visual representation but the X labels.
When calling the constructor, I added the next code:

PrimaryAxis = new CategoryAxis()
{
Title = new ChartAxisTitle()
{
Text = axisXTitle,
Font = Font.SystemFontOfSize(Device.GetNamedSize(NamedSize.Small, typeof(ChartAxisTitle))),
TextColor = Color.Blue
},
LabelRotationAngle = 90,
EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Center,
LabelPlacement = LabelPlacement.BetweenTicks,
LabelsIntersectAction = AxisLabelsIntersectAction.None,
TickPosition = AxisElementPosition.Outside,
ShowMajorGridLines = false,
LabelStyle = new ChartAxisLabelStyle()
{
TextColor = Color.green,
Font = Font.SystemFontOfSize(Device.GetNamedSize(NamedSize.Micro, typeof(ChartAxisLabelStyle)))
}
}

No matter how I define font size, what size I put (micro, normal, big, 45, 1000...) the size still remain the same. I read that in older versions of SFCharts there was a bug for this, but I'm updating it via NuGet Package Manager to the almost last version (14.4.0.20, because newer versions are crashing on my system, and didn't have time to check why) and still have this issue, that it was suppose to be fixed on v12 or v13.

Any ideas what is happening here?

How to load ToolBar Icon from Byte Array

$
0
0

I want to provide the toolbar icon image from a byte array but ICON property requires a fileimagesource.

I don't know how to do this.
Please help ASAP

Clear cache in Webview Xamarin forms?

$
0
0

I have login in Webview, after authentication I am navigating to Dashboard page. After click on log-out(in dashboard) I navigate back to login-page which has WebView, but still WebView retains token. So how to clear cache(token) or is there any way to have LoginPage in WebView

The "LinkAssemblies" task failed unexpectedly error while building the application

$
0
0

Hi,

I'm getting the below error while building the application using linking SDK assemblies option and with out shared runtime (as shared run time causing error while release the application.)


Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.Void System.Net.Http.HttpClientHandler/c__async0::MoveNext()' in assembly: 'System.Net.Http.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void System.Net.WebHeaderCollection::AddValue(System.String,System.String)
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() D:\Program Files\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1577

if shared runtime option is unchecked and link option none httpclient.GetStringAsync() method will raise the following error
Method 'System.Net.WebHeaderCollection.AddValue' not found.

but application is working fine when the shared runtime option is ticked and 'SDK assemblies only' link option selected in the android options tab.
I could find lot of similar threads but couldn't find any solution for this one.

Thanks,
Eins


Introduce TEditor(a HTML rich text editor in Xamarin.Forms)

Got "Index was outside the bounds of the array" when use Telerik Chart

$
0
0

my code

    public static List<CategoricalData> GetCategoricalData()
    {
        List<CategoricalData> data = new List<CategoricalData>();
        for (int i = 0; i < 90 ; i++)
        {
            data.Add(new CategoricalData() { Value = 10+i, Category = "" });
        }

        return data;
    }

Chart :

       var chart = new Telerik.XamarinForms.Chart.RadCartesianChart
        {
            VerticalAxis = new Telerik.XamarinForms.Chart.CategoricalAxis(),
            HorizontalAxis = new Telerik.XamarinForms.Chart.NumericalAxis(),
            HeightRequest = 400,
        };

        var series = new Telerik.XamarinForms.Chart.BarSeries();

        series.ItemsSource = GetCategoricalData();

        series.ValueBinding = new Telerik.XamarinForms.Chart.PropertyNameDataPointBinding
        {
            PropertyName = "Value"
        };

        series.CategoryBinding = new Telerik.XamarinForms.Chart.PropertyNameDataPointBinding
        {
            PropertyName = "Category"
        };

        chart.Series.Add(series);

  Frame asd = new Frame ();
      asd.Contect = chart;
      this.Content = asd;

i want display 80 multiline in chart please help me.

Why my emulator doesn't look like a phone?

$
0
0

I been watching tutorials in MVA, but I'm getting bothered, because on the course, his emulator looks like a phone, how can I make mine look like a phone and not look like a forms app. I'm using vs2017 15.3.3, windows 10 pro 1703

Service apk from release = no messages

$
0
0

Hey
I am having an issue with my android Service.
When I am installing the apk from release my Service isn't sending any notifications
but when i start it from debug everything is working just fine...
idk... am i missing sth?
Thanks

ThriveGmbH.BottomNavigationBar.XF

$
0
0

Hi,

I'm using ThriveGmbH.BottomNavigationBar.XF component to display tabs at bottom on Android in order to get native like feeling. Now the problem is, I would like to display some graphic/text beneath the tabs. Please refer to attached image to get the idea what I'm willing to achieve. Any suggestions.

Thanks

Problem with MasterDetailPage

$
0
0

Hello.

I implemented MasterDetailPage into my app, but on Windows 10 the behavior seems a bit weird.
When the app starts, the menu is showing as expected. But when I click an item, it disappears with no way to go back or show the menu again.

It's simple to reproduce.. Download the sample: https://github.com/xamarin/xamarin-forms-samples/tree/master/Navigation/MasterDetailPage
Run the UWP app on Windows 10 and click any menu item. Now you're stuck on that page, with no way to navigate further.

Choose a contact


forms app device.openuri system exception in ios

$
0
0

Hi,

I want to open a browser in iOS with my app with this line of code:

Device.openUri(new Uri("http://www.google.com"));

but when that line executes I get this error:

Could not initialize an instance of the type 'MonoTouch.Foundation.NSUrl': the native 'initWithString:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false.

Why default MasterDetailPage (Xamarin VS 2017) display incorrect?

$
0
0

I created a default MasterDetailPage on Visual Studio 2017. App code:
MainPage = new NavigationPage(new MasterDetailPage1());

When I use this to hide navigate title bar:
NavigationPage.SetHasNavigationBar(this, false);

1/ It has a very weird transition, the MainPage scrolls up before showing MasterDetailPage1.

2/ The menu display is error, it cover the whole menu bar?

3/ How to add item icon to this default MasterDetailPage, the default text on default detail page is unclear to me

Cross Platform Crop Image View

$
0
0

Hey,

Anyone have ever implemented some custom crop image UI that can be used in forms ios/android/win phone?
What I`m trying to achieve is something like instagram that crop a image to a square, so I can store in a db and show it in a circle image after to give my app a better design.
Someone have anything like this? So I will not start from scratch...

Thanks

Detect enter key press in Editor

$
0
0

How do i detect enter key press in Editor?

How to hide navigation panel in Xamarin forms 2.3.3 for UWP

$
0
0

Can't hide navigation panel on MasterDetailsPage on UWP after updating to XF 2.3.3. It was hidden by default before when not using navigation page as a container for Detail.

Viewing all 91519 articles
Browse latest View live