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

Custom navigation bar with MasterDetailPage

$
0
0

At present my app uses normal ContentPages inside a NavigationPage which works fine. I have a ControlTemplate for customising the top navigation bar away from the default.
<ContentPage ControlTemplate="{StaticResource MainPageTemplate}"
It seems I am not able to do the same for MasterDetailPage as it appears I can't use a ControlTemplate?
<MasterDetailPage ControlTemplate="{StaticResource MasterDetailTemplate}"

Is there a way to customise the navigation bar for a MasterDetailPage?

Ref: this is the approach that I have used for having a custom navigation bar:
http://lukealderton.com/blog/posts/2017/january/replacing-the-xamarin-headernavigation-bar-with-a-custom-viewtemplate/``


Xamarin and ChromeCast

$
0
0

We would like to create an app in Xamarin for phones and tablets (both Android and iOS) that can use Google ChromeCast (like YouTube, Vimeo, Facebook, etc.). The app should be able to crhomecaste a movie from the app to eg a TV (via chromecast).

The libraries that is available do not seem to be up to date and work properly.

We would really appreciate to get in contact with a person/company who has succeeded in making chromecast in a Xamarin app that works properly and is active in the Apple App Store and Google Play Store.

Does anyone here have knowledge about an app built in Xamarin that uses Chromecast that works properly?

Entry control is firing Focused event on every cursor blink

$
0
0

Hi,

I found out that the Entry control's event "Focused" is being fired up every time the cursor blinks... So let's say you have simple code:
MyEntry.Focused += (object sender, FocusEventArgs e) =>{ someCode };
you start the app, you click in the entry, the cursor starts to blink -> every blink will fire up this code.

Do you guys think this is how the Focused should be used? I have reported this as a bug, any thoughts?

:)

How to get the length in seconds of a WAV file?

$
0
0

Hi guys, I have been trying to find out how to get the length of a wave file recording for both Android and iOS.
Can it be done in the PCL, or there are specific platform methods to get this length?

Need help debugging random crashes in GridCalc.cs

$
0
0

Hi, it's been a year or so that im getting random crashes in GridCalc, totally fail to repro, making it impossible for me to avoid. It's just random, on both iOS and Android, whatever forms version, being on latest atm.
Even worse, I cant seem to match Xamarin open source code i can find in inet with stacktrace lines numbers.
If anyone could could give me a direction to dig in, would be grateful for any clue:

12-12 16:08:53.456 I/MonoDroid( 7446): UNHANDLED EXCEPTION:
Thread started: <Thread Pool> #13
12-12 16:08:53.776 I/MonoDroid( 7446): System.NullReferenceException: Object reference not set to an instance of an object.
12-12 16:08:53.777 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.MeasureStarredRows () [0x0017c] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:530 
12-12 16:08:53.777 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.MeasureAndContractStarredRows (System.Double width, System.Double height, System.Double totalStarsHeight) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:403 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x00117] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:510 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002a] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:58 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x00236] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:198 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.780 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.780 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x00236] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:198 
12-12 16:08:53.783 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123 
12-12 16:08:53.783 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.ScrollView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\ScrollView.cs:233 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.TemplatedView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0003c] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:39 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.786 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.786 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x00110] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:165 
12-12 16:08:53.786 I/MonoDroid( 7446):   at Xamarin.Forms.AbsoluteLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00046] in D:\a\1\s\Xamarin.Forms.Core\AbsoluteLayout.cs:69 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x0014b] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:263 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:223 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:798 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.Layout+<>c.<OnChildMeasureInvalidated>b__45_0 () [0x00080] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:380 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <ad2f15102b3a4d36b40e9b0cbc11c376>:0 
12-12 16:08:53.788 I/MonoDroid( 7446):   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <ad2f15102b3a4d36b40e9b0cbc11c376>:0 

CarouselView state of the union?

$
0
0

What is the status of the CarouselView component? Here is what I think I know:

  1. Microsoft created CarouselPage but has deprecated it since it is not flexible since it is a Page and can't be used in a ContentPage
  2. Microsoft created CarouselView within Xamarin.Forms repo but it was too buggy so they moved it to its own repo
  3. Microsoft's CarouselView repo has been stagnant for 2 years
  4. alexrainman made his own which Microsoft like better so the plan was to incorporate his into the official Xamarin.Forms repo as the official CarouselView control
  5. alexrainman's CarouselView repo has been stagnant for 7 months
  6. I do not see alexrainman's CarouselView merged into Xamarin.Forms repo
  7. I see several bugs within alexrainman's CarouselView and I have even submitted a pull request for one of them

What CarouselView component should I use? Should I try Telerik's RadSlideView or SyncFusion's SfCarousel instead??

Not sure what it is called in mobile apps... but how you alert a user after button click?

$
0
0

Hi All,

I am Not sure what it is called in mobile apps... but how you alert a user after button click? That the process has been completed.
I think I would like for the after click action to give the user a message that a process is complete and then take them back to the application
start page so they have a sense the something happened after they clicked the button.

So for example the user press the button save this record.

I would like a message to come up saying saving record...and then return to the application's welcome page.

Is this possible?

Can I send a value to my Webapi not to be stored in database but as a parameter to return data

$
0
0

Hi All,

So I am using web api to post data to a database on the server.. work great easy to understand how its working...
But in this case.. the users want to be able to send and Id via their devices and have that Id get processed and
return a value back to a list display on the device...

So and web api get.. but with a parameter... Is there some example I can follow showing how this can be done...
I am sure this is more a question for web api people

But I wanted to check here first.. because I was not sure how to refresh the page on the device if this can be done.

Thanks.


Binding From list to labels and buttons from list

$
0
0

Hi , Im binding from my ViewModel to my view a list , but the client requested specific design , can I instead of binding to a list , bind data to labels and buttons that i have created by my self ! see picture to understand more what i mean .
thanks


How to remove gaps in the splash with 9 patch images?

$
0
0

Dear,

After update my xamarin forms android app to use targetSdkVersion 27 (I don't remember surely but think that before was 16) my splash screen is shown with two rectangles and I don't found the cause, someone already dealed with this issue?

Xamarin.Forms CardsView nuget package

$
0
0

Hi all) I've released new package for Xamarin.Forms (Something like Tinder's CardsView)
Maybe, someone will be interested in it

nuget.org/packages/CardsView/ -- nuget
github.com/AndreiMisiukevich/CardView -- source and samples

CarouselView implementation, CardsView nuget package

UI Tests with B2C login

$
0
0

I have created an app which uses MS B2C login. This all works fine. However, i am now trying to create UI tests for my app - but I cant interact with the login screen shown by B2C. B2C loads in a separate browser window and then returns the authentication result to my app by a redirect URL - but since the window is not part of my app - the UI tests fail to find the controls to enter in the username and password. When i query using app.tree in the REPL nothing is returned when the login screen is showing.

TouchView | TouchImage | TouchFadeView | TouchColorView package

$
0
0

Hi all, let me introduce new plugin for Xamarin.Forms development.

https://github.com/AndreiMisiukevich/TouchEffect

This plugin allows developers to create UI-responsive controls/layouts with touch effect (fade control, change image source, change background color)

I will appreciate any feedback)

In .Net Standard 2.0 how I call specific fuctions like camera or open a file?

$
0
0

I would like to watch a video or anything that shows step-by-step how I can implement specific functions for each platform (iOS / Android). I find only snippets of code, but never a complete example application with explanation. Using .Net Standard as a project.

For example. Why do I need to save a pdf in the directory to open it? Why can not I open directly from the byte array coming from my WebAPI?
I've seen several posts and everyone needs to save it.

tks.


HotReload LiveReload LiveXaml [Mac] [Windows] [nuget package] [opensource]

How to change the top color of IOS app(Color at the phone battery icon)

$
0
0

One screenshot of my xamarin forms ios app is adding below. I want the change the color on the top part, I mean on the color at the battery icon. Currently, it is white, I need it as yellow.

For getting the top padding I added the following code on my XAML:

 <StackLayout>
    <StackLayout.Padding>
       <OnPlatform x:TypeArguments="Thickness" 
          Android="0, -10, 0, 0" 
          WinPhone="0, -10, 0, 0" 
          iOS="0, 15, 0, 0"/>
     </StackLayout.Padding>
 </StackLayout>

If I remove above code, my app icons and battery icon in the phone get overlap. So How can I change the white color on top?

How to Use brezier curve in xamarin forms.

$
0
0

i Want to clip the path...like this
how to do it

Application has horrible performance on Obi sf.

$
0
0

A client of my has a test phone called Obi sf1 with qualcomm msm8939 processor and android 5.0.2. My app performs well on most devices but I noticed a noticeable performance dip on that phone. The basic stuff starting with an entry and scroll do not work. There are not stuff running on background or any ui blocking tasks. Can some one please help me with this stuff ?

Text to speech is not read when navigate to other screen or click on back button in Xamarin forms

$
0
0

Hi Guys,

I am Implemented Text to speech functionality using Xamarin forms Essentials package, Text to speech is not read when we navigate to other screen or click on back button.

I have 5 pages in my Application, suppose I am in SecondPage before reading speech content in the Second page when i navigate to third page or press back button Text to Speech is not working.

Can anyone help on this.

Thanks,
Srinivasu

Viewing all 91519 articles
Browse latest View live


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