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

How can i download the pdf file with out opening the browser (With out using Device.OpenUri(pdfUr)

$
0
0

i need it like abackgroud proccess in my context it open the browser directly and ask me to download it but i need
to download it without asking the user . how can i remove the redirect proccess from the app to the browser and complete the process in the app.

thank you in advance.


TimeZone With UTC format

$
0
0

Hi,
i have to list out all the timezones like (UTC-12:00) International Date Line West......in PCL.

i can able to do with TimeZoneInfo.GetSystemTimeZones(). but this not displays UTC with name ... please help me to do this..

x:Reference not working?

$
0
0

I'm trying to use a view-to-view binding using x:Reference, but am having no luck. Specifically, I am binding the command/parameter of a TextCell's context actions menu. I wish to bind the command itself to an ICommand property of the main view model, while keeping the command parameter bound to the current item of the ListView that contains the cells. So this means using x:Reference as the Source of the command binding. Yet this doesn't seem to work.

I tried digging through the Xamarin Forms code using dotPeek to see if I could figure out what was going wrong - and I don't even see a ReferenceExtension class in XF 1.3 (Stable)?? Was this removed from the platform, or am I just looking in the wrong place?

My code looks very similar to this, however the binding's Source is totally being ignored:

<ListView ItemsSource="{Binding EventsList}"
          x:Name="EventsList">
  <ListView.ItemTemplate>
    <DataTemplate>
      <TextCell Text="{Binding Name}">
        <TextCell.ContextActions>
          <MenuItem Text="Delete" 
                    IsDestructive="True"
                    Command="{Binding Path=BindingContext.DeleteEventCommand, Source={x:Reference Name=EventsList}}"
                    CommandParameter="{Binding}"/>
        </TextCell.ContextActions>
      </TextCell>
    </DataTemplate>
  </ListView.ItemTemplate>
</ListView>

The ListView's BindingContext is a viewmodel class that has an ObservableCollection of items named EventsList, as well as an ICommand named DeleteEventCommand.

Is there any way to implement Stripe card widget in the Xamarin.Forms?

Progress Bar only works if i use a Delay

$
0
0

Good Day

i am a Loading Page functionality that is defined here https://github.com/UdaraAlwis/Xamarin-Playground/tree/master/XFLoadingPageService . The loading Diaolog only show if i use

await Task.Delay(2000);

my code looks like this

 private async void btnstart_Clicked(object sender, EventArgs e)
        {
            DependencyService.Get<ILodingPageService>().InitLoadingPage(new LoadingIndicatorPage2());
            DependencyService.Get<ILodingPageService>().ShowLoadingPage();

            data .data obj = new data .data ();
            try
            {
                lblstatus.Text = "Before the call";
                // just to showcase a delay...
               // await Task.Delay(2000);

                    var lstentities = await obj.FindPerson_Report_Basic("81248877");

                lblstatus.Text = "After the call";
            }
            catch (Exception ex)
            {
                await DisplayAlert("Error:", ex.Message, "Ok");
            }
            finally
            {
                obj = null;
                DependencyService.Get<ILodingPageService>().HideLoadingPage();
            }
        }

but the loading page does not load , as you can see i commented the Delay part.

Thanks

Entry Focus Xamarin Forms MVVM

$
0
0

I need focus a entry after of click a button.

I has think in implement a Behavior but i dont know that is the problem.

This is my code.

View.

Behavior Class.

`public class EntryFocusBehavior : Behavior
{
public bool OnFocus { get; set; }

    protected override void OnAttachedTo(Entry bindable)
    {
        base.OnAttachedTo(bindable);
        bindable.TextChanged += OnEntryTextChanged;
    }

    protected override void OnDetachingFrom(Entry bindable)
    {
        base.OnDetachingFrom(bindable);
        bindable.TextChanged -= OnEntryTextChanged;
    }



    void OnEntryTextChanged(object sender, TextChangedEventArgs e)
    {
        var entry = (Entry)sender;

        if (OnFocus)
        {
            entry.Focus();
        }
        else
        {
            entry.Unfocus();
        }
    }
}`

And viewmodel.

public bool OnFocus { get; set; }

OnFocus ="True or False"

I need use PropertyChanged in view model binding??

Binding control is two away?

Thanks by help me forum community.

Deployment failed. Architecture not supported.

$
0
0

Hi

I am getting the below error while deploying..

The package does not support the device architecture (x86). You can change the supported architectures in the Android Build section of the Project Options.

Deployment failed. Architecture not supported.

How to create a draggable slide up panel?

$
0
0

It's nothing too elaborate, though I'm having a hard time replicating this in Xamarin Forms. As in, a view that the user can actually drag up and down.

Does Xamarin Forms have an easy solution for this problem? I've tried a bunch of libraries already and none of them seem to work/work with .Net Standard projects.

I'm currently using this solution, though it's far from perfect. Any ideas?


Error: The given key was not present in the dictionary.

$
0
0

Just went to Xamarin.Forms 1.3.4.6328-pre2 and now get the error "The given key was not present in the dictionary." How can find in my xaml what may be causing the problem? I attached the xaml in a text file.

How to make a PageModel as root Page in Xamarin Forms FresgMVVM?

$
0
0

after login automatically I want to make a specific page as a root page.so how to do this in FreshMVVM Xamarin Forms?

ItemSelected and ItemTapped Event is not working

$
0
0

Why itemSelected is not working. plz plz plz plz any suggestion.

How to open default contacts app in xamrin forms?

$
0
0

How to open default contacts app in xamrin forms?

Rg Popup has issues on Android

$
0
0

I was wondering if anyone else uses Rg.Plugins.Popup for their pop up modals in their app and use Android. The issue i'm experiencing happens with a modal that has several inputs in it with save and cancel buttons at the bottom. When tapping into a text editor input (keyboard opens up), then tapping outside on blank space it auto focuses on the next input. When hitting a button in the modal it auto focuses on the first input in the modal. Why this is an issue is because on Android if you focus on a drop down or date picker it opens its own modal for that input. If I click the save or cancel buttons the modal is no longer open meanwhile that input datepicker now opened up and will crash the app. Ill report this on Rg Popups page too, but was wondering if anyone else encountered this and if they have a work around.

Problems with the interface when rotating the device horizontally

$
0
0

Hi!

The interface of my application is divided into a header (it is a webview) and absolute content, which among other things contains a second webview.

In vertical orientation it works and looks perfect.

But when I turn the device horizontally the header stops measuring 70 and measures something like 30 ....
The header reduces the height although it has a fixed height.

Why this happen? Any solution?
Thanks!

`
<ContentPage.Content>

        <WebView x:Name="webview_header" HorizontalOptions="FillAndExpand" HeightRequest="70" BackgroundColor="Red"/>

        <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Black">
            <!-- other things -->
            <ScrollView AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" BackgroundColor="Green">
                <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Padding="0" BackgroundColor="Purple">
                    <WebView x:Name="webview" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" BackgroundColor="Blue" />
                </AbsoluteLayout>
            </ScrollView>
        </AbsoluteLayout>

    </StackLayout>
</ContentPage.Content>

`

Is there a tinder-like interface available for Xamarin Forms that runs on IOS/Android/Windows Phone?


Scroll with Xamarin.Forms and UWP using a WebView

$
0
0

Here is my code to create a WebView and feed it with some html.

WebView wb = new WebView();
wb.VerticalOptions = LayoutOptions.FillAndExpand;
wb.HorizontalOptions = LayoutOptions.FillAndExpand;


HtmlWebViewSource s = new HtmlWebViewSource();
s.Html = ProcessHtmlJS(p.Content.Rendered); // GET Some html to display
wb.Source = s;

Navigation.PushAsync(new ContentPage { Content = wb });

Works perfectly on android.
I can't scroll within the webview on UWP.

If I set the source to some website online I can scroll and everything is ok.

The bug occurs when I Load some html with the HtmlWebViewSource on UWP.

Has anyone faced the same difficulty ?

How to do an Entry for IOS to be the same as the Android Entry Style.

$
0
0

Hi,
I want to customise entry style of ios to android style..Please help

Thanks

How to create a drawing in SkiaSharp, save, reload later and resume editing?

$
0
0

In our app, we can create a drawing in SkiaSharp that is made up of straight lines, polylines and text. We can click the Save button and write out an image of the drawing. We would like to offer the option to reload the image or actually the instructions for recreating the image, display it on the device and allow the operator to continue editing.
Is there a tool that can help us do that?
What we thought of is to turn the instructions for drawing the image into JSON, save it locally and later to read in the JSON and use it to recreate the drawing and then continue editing. Is this done somewhere already? Is there another way to do this that we could learn from?
Thanks!

xamarin Error... Different day...Another error... when does the pain stop???

$
0
0

No matter what... xamarin keep coming up with new roadblock and new error... Each day it's something new...
anyone with any ideas on what is going on fro the error below?

Please note...a week ago I was some how apply to get this application to run on the IOS simulator as one day I do hope I will play able to put this application on or dev store.. one day... but each new day brings new wacky errors... I have to ask... does xamarin work???

I know some will answer yes... but I just don't understand why when you follow the guides the thing does not work... I mean seriously,... how do you doploy your app if you can't get it to run on the sim... but a few days before... it ran on the sim?? What changed??

This app runs on the Android simulator just fine... Any help would be appreciated.Thanks!

There was an unhandled exception trying to deploy and run your application. \nSystem.Exception:
The OutputPath property is not set for project 'NameOfTheApplication.iOS.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='iPhone'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.

More of this error:

t Xamarin.VisualStudio.MsBuild.MsBuildService.RunTarget(IProjectNode projectNode, String msbuildTarget, IProgressReport progress, IDictionary2 globalProperties, IDictionary2 properties, Boolean runInProc) in E:\A_work\21\s\src\Core\VisualStudio\MsBuild\MsBuildService.cs:line 248
at Xamarin.VisualStudio.MsBuild.MsBuildService.RunTarget(IProjectNode projectNode, String msbuildTarget, IDictionary2 globalProperties, IDictionary2 properties, Boolean runInProc) in E:\A_work\21\s\src\Core\VisualStudio\MsBuild\MsBuildService.cs:line 211
at Xamarin.VisualStudio.IOS.MonoTouchProjectProperties.<>c__DisplayClass31_0.<b__0>d.MoveNext() in E:\A_work\21\s\src\Core\VisualStudio.IOS\PropertyProviders\MonoTouchProjectProperties.cs:line 103
--- 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 Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at Merq.AsyncManager.Run(Func`1 asyncMethod) in E:\A_work\143\s\src\Async\Merq.Async.Core\Merq.Async.Core.Portable\AsyncManager.cs:line 58
at Xamarin.VisualStudio.IOS.MonoTouchProjectProperties.GetAppBundleDir(IProgressReport progress) in E:\A_work\21\s\src\Core\VisualStudio.IOS\PropertyProviders\MonoTouchProjectProperties.cs:line 99
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.GetRunSessionInfo(MonoTouchDevice device) in E:\A_work\21\s\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 1250
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.RunApplication(MonoTouchDevice device, IProgressReport progress) in E:\A_work\21\s\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 1199
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.DebugLaunch(__VSDBGLAUNCHFLAGS grfLaunch, IProgressReport progress) in E:\A_work\21\s\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 1066
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.DebugLaunch(__VSDBGLAUNCHFLAGS grfLaunch) in E:\A_work\21\s\src\Core\VisualStudio.IOS\ProjectSystem\MonoTouchFlavoredProject.cs:line 973

Long label with word wrap doesn't seem to auto calculate height correctly

$
0
0

I have a label within a flex layout that doesnt seem to adjust to the new height of a wrapped label. Is this a bug or am I missing something?

This is within a stack layout

There is still another full sentence after this that wont show up unless I manually enter a HeightRequest larger

Viewing all 91519 articles
Browse latest View live


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