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

"java.io.IOException: cannot create document. Error: 3" using Xam.Plugin.PdfRasterizer

$
0
0

I'm using the Xam.Plugin.PdfRasterizer to convert a pdf file into an image and I'm getting following error:

java.io.IOException: cannot create document. Error: 3
    at android.graphics.pdf.PdfRenderer.nativeCreate(Native Method)
    at android.graphics.pdf.PdfRenderer.<init>(PdfRenderer.java:157)

My code:

var fileData = await CrossFilePicker.Current.PickFile();
var savedFile = await FileSystem.Current.LocalStorage.CreateFileAsync(fileData.FileName, CreationCollisionOption.ReplaceExisting);
var document = await CrossPdfRasterizer.Current.RasterizeAsync(savedFile.Path, false);

What's wrong with my code?
When I'm using a public pdf path, it works. It's just when I'm picking a file from the local storage..

Thanks for your help!


Using WebView in Xamarin Forms - URL format - mailto error

$
0
0

Hi,

I'm using a webview to get a homepage rendered into my app. That works fine.
The only propblem seems mailto:... links on Android.
If I open the website in a browser from an Android device and click on the mail icon, I'm able to send a mail.
But using the webview seems to "block" this.

Getting always net::ERR_UNKNOWN_URL_SCHME

Now I've seen that I can use the ShouldOverrideUrlLoading() method to reformat this links.
But can't get it implemented.

In fact that I need it only on Android, I guess that I have to create an own webview object. But that is not working at all. Can you give a hint where to start?

thx guys.

Image Size AspectFit to fill parent StackLayout

$
0
0

Hi all - I'm having difficulty with what seems like a basic issue. I have an image that I want to fit within a stacklayout whilst keeping the aspect ratio intact. Normally, I would utilise AspectFit and all would be dandy.... however, on this project, no such luck. My guess it is possibly due to the combination of ralativelayout (to provide a background image) and grids (to display the content in the top 80%, image in the bottom 20%.

Binding ImageSource is a random group of misfit images... not all the same measurements. The result I am getting is portrait images displaying at fullsize (where I want them to be scaled down to fit). Landscape images work ok. I have tried using the HeightRequest parameter, but I am finding that on high res phones, the image is tiny.

Any ideas on how to fix, or what might be causing this behaviour?

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="NationsConnect.View.CategoryView"
             Title="{Binding PageTitle}">

    <ContentPage.Content>

        <RelativeLayout VerticalOptions="Fill" HorizontalOptions="Fill">

            <Image Source="nations_connect_logo.png" Opacity="0.1" 
                   RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width}"
                   RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height}"/>

            <Grid x:Name="serviceCategories" VerticalOptions="FillAndExpand" 
                  RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width}"
                  RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height}">

                <Grid.RowDefinitions>
                    <RowDefinition Height="80*" />
                    <RowDefinition Height="20*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <StackLayout Orientation="Vertical" HorizontalOptions="CenterAndExpand" Grid.Row="0" Grid.Column="0"  >
                    <ListView VerticalOptions="StartAndExpand" ItemsSource="{Binding Categories}" SelectedItem="{Binding SelectedCategory, Mode=TwoWay}" >

                        <ListView.ItemTemplate>
                            <DataTemplate>
                                <ViewCell>
                                    <Grid>
                                        <StackLayout VerticalOptions="Center">
                                            <Label Text="{Binding category_name}" />
                                        </StackLayout>
                                    </Grid>
                                </ViewCell>
                            </DataTemplate>
                        </ListView.ItemTemplate>

                    </ListView>
                </StackLayout>

                <StackLayout Orientation="Vertical" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Grid.Row="1" Grid.Column="0" >
                    <Image Source="{Binding ImageSource}" Aspect="AspectFit" />
                    <Image.GestureRecognizers>
                        <TapGestureRecognizer Command="{Binding TapImageCommand}" CommandParameter="{Binding ImageId}" />
                    </Image.GestureRecognizers>
                </StackLayout>

            </Grid>

        </RelativeLayout>
    </ContentPage.Content>
</ContentPage>

Can you have dynamic cell heights with either the ListView or TableView views?

$
0
0

Can you have dynamic cell heights with either the ListView or TableView views?

Xamarin Outside of Visual Studio

$
0
0

Just curious, is it possible to run Xamarin outside of Visual Studio? Me and Visual Studio just don't get along....and I'm afraid the time has come for one of us to go.

If the answer is no, then what other cross-platform solutions have you used and how do they compare?

reopen Application after Taking Picture from Plugin.Media sending my application into background.

$
0
0

HI
I am new in Xamarin.forms i am using xam.Plugin.Media.
While i am taking picture from the phone or choosing picture from gallery , My Application going into background.
how to overcome with this problem.

visual studio bug

$
0
0

hello, i'm new to coding and don't have any experience but i just installed visual studio installed the sdk/ndk and created a device. I clicked file/new/c#/android/blank app and when I created the project and open main.axml I have an error on the bottom. I reinstalled windows and looked up my issue but couldn't find this anywhere. here are some screenshots (keep in mind like i said this is a brand new project i didn't even type one line of code in and i also reset windows)

since I just made this account I'm not allowed to post links so you're gonna have to stitch this for screenshots, sorry!

imgur . com/a/83faq

"This project contains resources that were not compiled successfully rendering might be affected"

get current location Xam.Plugin.Geolocator

$
0
0

i use Xam.Plugin.Geolocator, i did the same as the documentation, and it work find in android emulator, but when i deploy it to my mobile,
i got this exception:

{System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Plugin.Geolocator.FusedGeolocatorImplementation+d__32.MoveNext () [0x00450] in C:\projects\geolocatorplugin\src\Geolocator.Plugin.Android\FusedGeolocatorImplementation.cs:221
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at RealShopOnline.Views.SecondPageVolumes+d__5.MoveNext () [0x00077] in E:\MyLovelyApps\RealMobileApp\RealShopOnline\RealShopOnline\RealShopOnline\Views\SecondPageVolumes.cs:166 }

any help?


Blurred ContentView

$
0
0

I need a content view that blurs whatever is below it so I thought I'd try writing a custom control and an iOS renderer for it. This is the class definition ...

public class XBlurredContentView : ContentView
{
}

... here's the custom renderer ...

public class XBlurFrameRenderer : ViewRenderer<XBlurredContentView,UIView>
{
    private UIVisualEffectView _effectView;

    protected override void OnElementChanged(ElementChangedEventArgs<XBlurredContentView> e)
    {
        base.OnElementChanged(e);
        var blurFrame = e.NewElement;
        if (blurFrame != null)
        {
            var effect = UIBlurEffect.FromStyle(UIBlurEffectStyle.Light);
            _effectView = new UIVisualEffectView(effect);
            SetNativeControl(_effectView);
        }
    }

    protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        if (e.PropertyName == VisualElement.XProperty.PropertyName
            || e.PropertyName == VisualElement.YProperty.PropertyName
            || e.PropertyName == VisualElement.HeightProperty.PropertyName
            || e.PropertyName == VisualElement.WidthProperty.PropertyName)
        {
            var x = Element.X; var y = Element.Y; var w = Element.Width; var h = Element.Height;
            _effectView.Frame = new CGRect(x, y, w, h);
        }
        base.OnElementPropertyChanged(sender, e);
    }
}

... and here's the XAML to test it ...

    <customUi:XBlurredContentView HeightRequest="50">
        <Grid>
            <Button Text="Hello World" TextColor="White" />
        </Grid>
    </customUi:XBlurredContentView>

The expected are does get blurred as expected but the content (the "Hello World" button isn't visible. I double checked with the Live Inspector and it does look like the button (and it's UILabel) is added correctly but nothing is visible on screen. This is my first go at deriving the ContentView into a custom control so I guess I need to learn more but what have I missed?

Platform specific RowHeight not working in Xamarin.Forms.

$
0
0

I'm defining a list view as follows:

<ListView Grid.Row="0" Grid.Column="1" ItemsSource="{Binding MenuList}"
                          SelectedItem="{Binding SelectedEngine, Mode=TwoWay}" SeparatorVisibility="None">
    <ListView.RowHeight>
        <OnPlatform x:TypeArguments="x:Int32">
            <On Platform="Android">52</On>
            <On Platform="UWP">154</On>
        </OnPlatform>
         </ListView.RowHeight>
</ListView>

But I get an error message saying:

No property, bindable property, or event found for 'RowHeight', or mismatching type between value and property.

And if I drop the <ListView.RowHeight> out it compiles. Does anyone know how I can fix the issue?

PCLCrypto library

$
0
0

Hello,

I am working on RSA cryptography on Xamarin.Forms, using PCLCrypto library , it gives error when I use "OpenAlgorith" method
var RsaObject = WinRTCrypto.AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithm.RsaPkcs1);

the error is "PCLCrypto.NotImplementedByReferenceAssemblyException: This is a reference assembly and does not contain implementation. Be sure to install the PCLCrypto package into your application so the platform implementation assembly will be used at runtime."

I searched too much on the internet, but nothing worked with me, any help please.

Brand New Xamarin Forms Project, Visual Studio Crashes if Android is Included

$
0
0

I have the latest VS 2017 (updated today). I tried a new Xamarin Forms project (Cross-Platform > Mobile App (Xamarin.Forms)) which I haven't tried out yet. Whenever I do this and Android is included the projects are created and show up in Solution Explorer but VS is unresponsive and exits after a few seconds. If I launch the newly created solution the same thing happens.

I've tried Shared Project and .NET Standard. Same results.

Using Jenkins on a Mac

$
0
0

I am trying to setup a CI server on a Mac using Jenkins. It will be eventually be building Xamarin solutions. Currently I have it checking code out from our svn server, doing a restore for the Nuget packages, and finally trying to build the projects.

I currently am testing this on a Xamarin .NET 2.0 standard library. The checkout and restore work but on the build step I get errors saying I am missing references to Mscorlib amongst other things. I can build the project in Visual Studio on Mac just fine. What am I doing wrong with the setup?

I have the Jenkins MSBuild plugin setup to run msbuild from /Library/Frameworks/Mono.framework/Commands/msbuild. Below is the console output from Jenkins:

Started by user admin
[EnvInject] - Loading node environment variables.
Building in workspace /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin
Cleaning local Directory .
Checking out https://svn.MyComp.net/svn/MyProj/MyProjMobile/MyProjMobile/MyProjMobile at revision '2018-04-05T13:45:47.739 -0700' --quiet
Using sole credentials MyUsername/****** in realm ‘<https://svn.MyComp.net:443> VisualSVN Server’
At revision 62

No changes for https://svn.MyComp.net/svn/MyProj/MyProjMobile/MyProjMobile/MyProjMobile since the previous build
Path To MSBuild.exe: /Library/Frameworks/Mono.framework/Commands/msbuild
FATAL: Unable to use this plugin on this kind of operation system
Executing the command /Library/Frameworks/Mono.framework/Commands/msbuild /t:restore /t:build /p:Configuration=Release /p:RestoreSources=http://192.168.102.158/MyCompNuget/nuget%3Bhttps://api.nuget.org/v3/index.json /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj from /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin
[MyProjMobile.Xamarin] $ /Library/Frameworks/Mono.framework/Commands/msbuild /t:restore /t:build /p:Configuration=Release /p:RestoreSources=http://192.168.102.158/MyCompNuget/nuget%3Bhttps://api.nuget.org/v3/index.json /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj
Microsoft (R) Build Engine version 15.4.0.0 (xplat-master/67e8006d Thu Mar  8 17:15:24 EST 2018) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 4/5/2018 1:45:51 PM.
Project "/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj" on node 1 (restore;build target(s)).
Restore:
  Restoring packages for /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj...
  Committing restore...
  Generating MSBuild file /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/obj/MyProjMobile.csproj.nuget.g.props.
  Generating MSBuild file /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/obj/MyProjMobile.csproj.nuget.g.targets.
  Writing lock file to disk. Path: /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/obj/project.assets.json
  Restore completed in 855.8 ms for /Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj.

  NuGet Config files used:
      /Users/MyComp/.config/NuGet/NuGet.Config

  Feeds used:
      http://192.168.102.158/MyCompNuget/nuget
      https://api.nuget.org/v3/index.json
PrepareForBuild:
  Creating directory "bin/Release/netstandard2.0/".
  Creating directory "obj/Release/netstandard2.0/".
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  /Library/Frameworks/Mono.framework/Versions/5.8.1/lib/mono/4.5/csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,1705,1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;RELEASE;NETSTANDARD2_0 /reference:/Users/MyComp/.nuget/packages/bcrypt.net-next/2.1.3/lib/netstandard2.0/BCrypt.Net-Next.dll /reference:/Users/MyComp/.nuget/packages/MyComp.encryptionservice/1.0.1/lib/netstandard1.3/EncryptionService.dll /reference:/Users/MyComp/.nuget/packages/freshmvvm/2.2.4/lib/netstandard1.0/FreshIOC.dll /reference:/Users/MyComp/.nuget/packages/freshmvvm/2.2.4/lib/netstandard1.0/FreshMvvm.dll /reference:/Users/MyComp/.nuget/packages/microsoft.csharp/4.0.1/ref/netstandard1.0/Microsoft.CSharp.dll /reference:/Users/MyComp/.nuget/packages/microsoft.win32.primitives/4.3.0/ref/netstandard1.3/Microsoft.Win32.Primitives.dll /reference:/Users/MyComp/.nuget/packages/modernhttpclient-updated/2.6.1/lib/netstandard2.0/ModernHttpClient.dll /reference:/Users/MyComp/.nuget/packages/newtonsoft.json/9.0.1/lib/netstandard1.0/Newtonsoft.Json.dll /reference:/Users/MyComp/.nuget/packages/pclcrypto/2.1.17-alpha-g5b1e8dff8c/lib/netstandard1.0/pclcrypto.dll /reference:/Users/MyComp/.nuget/packages/pinvoke.kernel32/0.5.126/lib/netstandard1.1/PInvoke.Kernel32.dll /reference:/Users/MyComp/.nuget/packages/pinvoke.windows.core/0.5.126/lib/netstandard1.1/PInvoke.Windows.Core.dll /reference:/Users/MyComp/.nuget/packages/sqlite-net-pcl/1.4.118/lib/netstandard1.1/SQLite-net.dll /reference:/Users/MyComp/.nuget/packages/MyComp.sqlite.net.cipher.std/1.0.0/lib/netstandard1.3/SQLite.Net.Cipher.dll /reference:/Users/MyComp/.nuget/packages/MyComp.sqlitenetextensions.std/1.0.0/lib/netstandard1.3/SQLiteNetExtensions.dll /reference:/Users/MyComp/.nuget/packages/MyComp.sqlitenetextensionsasync.std/1.0.0/lib/netstandard1.3/SQLiteNetExtensionsAsync.dll /reference:/Users/MyComp/.nuget/packages/sqlitepclraw.bundle_green/1.1.9/lib/netstandard1.1/SQLitePCLRaw.batteries_green.dll /reference:/Users/MyComp/.nuget/packages/sqlitepclraw.bundle_green/1.1.9/lib/netstandard1.1/SQLitePCLRaw.batteries_v2.dll /reference:/Users/MyComp/.nuget/packages/sqlitepclraw.core/1.1.9/lib/netstandard1.1/SQLitePCLRaw.core.dll /reference:/Users/MyComp/.nuget/packages/system.appcontext/4.3.0/ref/netstandard1.6/System.AppContext.dll /reference:/Users/MyComp/.nuget/packages/system.collections.concurrent/4.3.0/ref/netstandard1.3/System.Collections.Concurrent.dll /reference:/Users/MyComp/.nuget/packages/system.collections/4.3.0/ref/netstandard1.3/System.Collections.dll /reference:/Users/MyComp/.nuget/packages/system.console/4.3.0/ref/netstandard1.3/System.Console.dll /reference:/Users/MyComp/.nuget/packages/system.diagnostics.debug/4.3.0/ref/netstandard1.3/System.Diagnostics.Debug.dll /reference:/Users/MyComp/.nuget/packages/system.diagnostics.tools/4.3.0/ref/netstandard1.0/System.Diagnostics.Tools.dll /reference:/Users/MyComp/.nuget/packages/system.diagnostics.tracing/4.3.0/ref/netstandard1.5/System.Diagnostics.Tracing.dll /reference:/Users/MyComp/.nuget/packages/system.dynamic.runtime/4.0.11/ref/netstandard1.3/System.Dynamic.Runtime.dll /reference:/Users/MyComp/.nuget/packages/system.globalization.calendars/4.3.0/ref/netstandard1.3/System.Globalization.Calendars.dll /reference:/Users/MyComp/.nuget/packages/system.globalization/4.3.0/ref/netstandard1.3/System.Globalization.dll /reference:/Users/MyComp/.nuget/packages/system.io.compression/4.3.0/ref/netstandard1.3/System.IO.Compression.dll /reference:/Users/MyComp/.nuget/packages/system.io.compression.zipfile/4.3.0/ref/netstandard1.3/System.IO.Compression.ZipFile.dll /reference:/Users/MyComp/.nuget/packages/system.io/4.3.0/ref/netstandard1.5/System.IO.dll /reference:/Users/MyComp/.nuget/packages/system.io.filesystem/4.3.0/ref/netstandard1.3/System.IO.FileSystem.dll /reference:/Users/MyComp/.nuget/packages/system.io.filesystem.primitives/4.3.0/ref/netstandard1.3/System.IO.FileSystem.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.linq/4.3.0/ref/netstandard1.6/System.Linq.dll /reference:/Users/MyComp/.nuget/packages/system.linq.expressions/4.3.0/ref/netstandard1.6/System.Linq.Expressions.dll /reference:/Users/MyComp/.nuget/packages/system.net.http/4.3.0/ref/netstandard1.3/System.Net.Http.dll /reference:/Users/MyComp/.nuget/packages/system.net.primitives/4.3.0/ref/netstandard1.3/System.Net.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.net.sockets/4.3.0/ref/netstandard1.3/System.Net.Sockets.dll /reference:/Users/MyComp/.nuget/packages/system.objectmodel/4.3.0/ref/netstandard1.3/System.ObjectModel.dll /reference:/Users/MyComp/.nuget/packages/system.reflection/4.3.0/ref/netstandard1.5/System.Reflection.dll /reference:/Users/MyComp/.nuget/packages/system.reflection.extensions/4.3.0/ref/netstandard1.0/System.Reflection.Extensions.dll /reference:/Users/MyComp/.nuget/packages/system.reflection.primitives/4.3.0/ref/netstandard1.0/System.Reflection.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.resources.resourcemanager/4.3.0/ref/netstandard1.0/System.Resources.ResourceManager.dll /reference:/Users/MyComp/.nuget/packages/system.runtime/4.3.0/ref/netstandard1.5/System.Runtime.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.extensions/4.3.0/ref/netstandard1.5/System.Runtime.Extensions.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.handles/4.3.0/ref/netstandard1.3/System.Runtime.Handles.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.interopservices/4.3.0/ref/netstandard1.5/System.Runtime.InteropServices.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.interopservices.runtimeinformation/4.3.0/ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.numerics/4.3.0/ref/netstandard1.1/System.Runtime.Numerics.dll /reference:/Users/MyComp/.nuget/packages/system.runtime.serialization.primitives/4.1.1/ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.algorithms/4.3.0/ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.encoding/4.3.0/ref/netstandard1.3/System.Security.Cryptography.Encoding.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.primitives/4.3.0/ref/netstandard1.3/System.Security.Cryptography.Primitives.dll /reference:/Users/MyComp/.nuget/packages/system.security.cryptography.x509certificates/4.3.0/ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll /reference:/Users/MyComp/.nuget/packages/system.text.encoding/4.3.0/ref/netstandard1.3/System.Text.Encoding.dll /reference:/Users/MyComp/.nuget/packages/system.text.encoding.extensions/4.3.0/ref/netstandard1.3/System.Text.Encoding.Extensions.dll /reference:/Users/MyComp/.nuget/packages/system.text.regularexpressions/4.3.0/ref/netstandard1.6/System.Text.RegularExpressions.dll /reference:/Users/MyComp/.nuget/packages/system.threading/4.3.0/ref/netstandard1.3/System.Threading.dll /reference:/Users/MyComp/.nuget/packages/system.threading.tasks/4.3.0/ref/netstandard1.3/System.Threading.Tasks.dll /reference:/Users/MyComp/.nuget/packages/system.threading.timer/4.3.0/ref/netstandard1.2/System.Threading.Timer.dll /reference:/Users/MyComp/.nuget/packages/system.xml.readerwriter/4.3.0/ref/netstandard1.3/System.Xml.ReaderWriter.dll /reference:/Users/MyComp/.nuget/packages/system.xml.xdocument/4.3.0/ref/netstandard1.3/System.Xml.XDocument.dll /reference:/Users/MyComp/.nuget/packages/validation/2.4.18/lib/netstandard1.3/Validation.dll /reference:/Users/MyComp/.nuget/packages/xamarin.auth/1.6.0.1/lib/netstandard1.6/Xamarin.Auth.dll /reference:/Users/MyComp/.nuget/packages/xamarin.forms/2.5.0.280555/lib/netstandard1.0/Xamarin.Forms.Core.dll /reference:/Users/MyComp/.nuget/packages/xamarin.forms/2.5.0.280555/lib/netstandard1.0/Xamarin.Forms.Platform.dll /reference:/Users/MyComp/.nuget/packages/xamarin.forms/2.5.0.280555/lib/netstandard1.0/Xamarin.Forms.Xaml.dll /debug- /debug:portable /filealign:512 /nologo /optimize+ /out:obj/Release/netstandard2.0/MyProjMobile.dll /target:library /warnaserror- /utf8output /deterministic+ App.xaml.cs Auth/AuthCompletedEvent.cs Auth/AuthenticationState.cs Auth/AuthErrorEvent.cs Auth/AuthExtensions.cs Auth/Constants.cs Auth/MyCompOAuth2Authenticator.cs Data/MyProjUser.cs Data/GoogleUser.cs Data/Grade.cs Data/Role.cs Data/SampleUser.cs Database/AsyncDatabase.cs Database/Database.cs Database/DependencyServiceWrapper.cs Database/IDependencyService.cs Database/ISqLite.cs Model/BaseModel.cs Page/LoginPage.xaml.cs ServicePointConfiguration.cs SSLHttpClient.cs ViewModel/Page/LoginPageViewModel.cs ViewModel/PageModelMapper.cs "/var/folders/dj/zhmtcqbn60xccl1b1lghkdcr0000gn/T/.NETStandard,Version=v2.0.AssemblyAttributes.cs" obj/Release/netstandard2.0/MyProjMobile.AssemblyInfo.cs /warnaserror+:NU1605
App.xaml.cs(35,13): error CS0103: The name 'InitializeComponent' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
Page/LoginPage.xaml.cs(17,4): error CS0103: The name 'InitializeComponent' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(17,13): error CS0103: The name 'ServicePointManager' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(17,52): error CS0103: The name 'SecurityProtocolType' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(18,13): error CS0103: The name 'ServicePointManager' does not exist in the current context [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(9,68): error CS0012: The type 'HttpClientHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(9,73): error CS1503: Argument 1: cannot convert from 'ModernHttpClient.NativeMessageHandler' to 'System.Net.Http.HttpMessageHandler' [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
ServicePointConfiguration.cs(37,61): error CS1061: 'X509Certificate' does not contain a definition for 'GetPublicKeyString' and no extension method 'GetPublicKeyString' accepting a first argument of type 'X509Certificate' could be found (are you missing a using directive or an assembly reference?) [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(15,74): error CS0012: The type 'HttpClientHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(15,74): error CS0117: 'NativeMessageHandler' does not contain a definition for 'Credentials' [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
SSLHttpClient.cs(15,13): error CS0012: The type 'HttpClientHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj]
Done Building Project "/Users/MyComp/.jenkins/workspace/MyProjMobile.Xamarin/MyProjMobile.csproj" (restore;build target(s)) -- FAILED.

Build FAILED.

Change colour of Hamburger Icon for Android

$
0
0

I have a MasterDetail page that that has a dark background for the Bar Background. I want the Hamburger icon to be white but I cant find the setting to change the colour. iOS seems to do it automatically but not Android.

I have tried

this.BarTextColor = Color.White; this.BarBackgroundColor = Color.FromHex ("00385E"); this.BackgroundColor = Color.White;

But nothing is working. Where am I going wrong?

Master Detail Page change menu button color

$
0
0

Hi, I'm trying to change the color of the button that open the menu in a MasterDetailPage when I receive a message from MessagingCenter...
Right now for iOS with the code that I'm using the icon is changed but the color is blue, but I'd like to use the original color of the image, meanwhile on Android nothing happens.

public class MenuView : ContentPage
    {
        public Action<MenuItem> MenuItemSelected;

        public MenuView()
        {
            Title = "Maester!!";
            Icon = "slideout.png";

            var header = SetupHeader();
            var menuItems = SetupMenuItems();
            var listView = SetupMenuList(menuItems);

            Content = new StackLayout {
                Spacing = 1,
                Children = {
                    header,
                    listView
                }
            };

            MessagingCenter.Subscribe<CommunicationHelper> (this, Messages.NotificationNumber, (sender) => {
                Icon = "NotificationBadge.png";
            });
        }

Someone can give me a hand on how to solve this problems?


help with the use of the vize.ai and nanonets.com APIs

$
0
0

greetings friends, I'm starting to use services for my app and I have the task of creating an app that uses the API of vizen.ai and nanonets.com someone will have some examples of app that use these services that can facilitate or know of some Where I can find them, I thank them

How can I get data from rss feed for my app?

Adding PanGestureRecognizer in ListView Item

$
0
0

In Xamarin.Forms I have a ListView which I could remove the items by swiping left or right. Adding a PanGestureRecognizer works, I can swipe the items left or right but the problem is when I deploy it to iOS, I cannot scroll vertically anymore but in Android, it was working.

I am using Xamarin.Forms pre5

Below is my actual implementation of the ListView and the PanGestureRecognizer

How can I implement localization in Xamarin.Forms Shared project in VS2017

$
0
0

I downloaded the samples provided by Xamarin docs and followed the tutorial but couldn't apply it to my VS17 shared project.
I can only add .resw resource files from VS17 to my Shared Project. I Also tried adding existing .resx files. Both formats are not recognized in my Shared Project where I need to set the culture and use them in my .xaml files.
Any idea on how to get localization working? Please share some code or sample in VS17 Xamarin.Forms Shared project.

PopUp a Modalpage over a tabbed page with Prism

$
0
0

Hi,
I have a MasterDetailPage like this

<?xml version="1.0" encoding="utf-8" ?>
    <MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
                                    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                                    xmlns:views="clr-namespace:Fake.Views"
                                    xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
                                    prism:ViewModelLocator.AutowireViewModel="True" 
                                    MasterBehavior="Popover"
                                    Icon="hamburger"        x:Class="Fake.Views.MainView">

    <MasterDetailPage.Master>

                <views:MenuView BindingContext="{Binding MenuViewModel}" />

    </MasterDetailPage.Master>
    <MasterDetailPage.Detail>


        <views:NavigationPage >
            <x:Arguments>
                <views:ContentTabbedPageView  BindingContext="{Binding ContentTabbedPageViewModel}" />
            </x:Arguments>
        </views:NavigationPage>

    </MasterDetailPage.Detail>

</MasterDetailPage>

And the ContentTabbedPageView is:

<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
            xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
            xmlns:views="clr-namespace:Fake.Views"
            xmlns:extensions="clr-namespace:Fake.Core.MarkupExtensions;assembly=Fake"
            prism:ViewModelLocator.AutowireViewModel="True"
            x:Class="Fake.Views.ContentTabbedPageView" 
            BarBackgroundColor="{StaticResource BackgroundColor}" 
            BarTextColor="{StaticResource BlackColor}" 
            BackgroundColor="{StaticResource BackgroundColor}" >

    <TabbedPage.ToolbarItems>
        <ToolbarItem 
            Command="{Binding OpenDoorCommand}">
            <ToolbarItem.Icon>
                <OnPlatform x:TypeArguments="FileImageSource">
                    <On Platform="Android, iOS" Value="search" />
                </OnPlatform>
            </ToolbarItem.Icon>
        </ToolbarItem>
    </TabbedPage.ToolbarItems>
    <TabbedPage.Children>
        <NavigationPage Title="{extensions:Translate Chat, IsUpper=True}" >
            <x:Arguments>
                <views:ChatView />
            </x:Arguments>
        </NavigationPage>
        <NavigationPage Title="{extensions:Translate Social, IsUpper=True}" >
            <x:Arguments>
                <views:SocialView  />
            </x:Arguments>
        </NavigationPage>
        <NavigationPage Title="{extensions:Translate Cash, IsUpper=True}" >
            <x:Arguments>
                <views:CashView  />
            </x:Arguments>
        </NavigationPage>

    </TabbedPage.Children>
</TabbedPage>

Now I'd like from the SocialView to open a modal page with a navigation bar. The SocialView is:

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
                 xmlns:controls="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin.Abstractions"
                 xmlns:ctrls="clr-namespace:Fake.Core.Controls;assembly=Fake"
                 xmlns:markupExtensions="clr-namespace:Fake.Core.MarkupExtensions;assembly=Fake"
                 prism:ViewModelLocator.AutowireViewModel="True"
                 x:Class="Genuiny.Views.SocialView" Title="Social">
        <ContentPage.Resources>
            <ResourceDictionary>
                <Style x:Key="TooltipTextStyle" 
                       TargetType="Label"
                       BasedOn="{StaticResource TooltipLabelStyle}">
                    <Setter Property="TextColor" 
                            Value="{StaticResource BlackColor}" />
                    <Setter Property="HorizontalOptions" 
                            Value="FillAndExpand" />
                    <Setter Property="FontSize" 
                            Value="{StaticResource LittleSize}" />
                </Style>   
            </ResourceDictionary>
        </ContentPage.Resources>
        <Grid BackgroundColor="{StaticResource BackgroundColor}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="20"/> 
                    <ColumnDefinition  Width="*"/>
                    <ColumnDefinition Width="20"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <Grid Grid.Column="1" Margin="0,20,0,10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="42" />
                    </Grid.RowDefinitions>
                    <Image Source="add.png" WidthRequest="32" Margin="10,0,0,0" x:Name="addPostButton">
                        <Image.GestureRecognizers>
                            <TapGestureRecognizer Command="{Binding BindingContext.AddPostCommand, Source={x:Reference addPostButton}}"  />
                        </Image.GestureRecognizers>
                    </Image>
                    <ctrls:RoundedEntry Margin="0,0,0,0" Grid.Column="1" BorderColor="{StaticResource GrayColor}" BorderWidth="0.5" BorderRadius="20"
                                         Style="{StaticResource TooltipLabelEntryStyle}"
                                         Placeholder="{markupExtensions:Translate Share, IsUpper=True}" HorizontalOptions="FillAndExpand">

                    </ctrls:RoundedEntry>
                </Grid>
        </Grid>
    </ContentPage>

On the ViewModel, in the AddPostCommand I do this:

await _navigationService.NavigateAsync("AddPostView", useModalNavigation:true);

The expected behaviours is to view the new page with a navigation bar, but the new page appears without a navigation bar and if i don't use modalnavigation the page appears inside the current tab.
What am i wrong? Thanks for any kind of help.

I'm using:
Prism 7.1.0.123 pre
Xamarin.Forms 3.0 pre2

Francesco

Viewing all 58056 articles
Browse latest View live


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