locked
Xamarin.Forms 1.3.0 Technology Preview RRS feed

  • Question

  • User352 posted

    Hey Guys!

    We are pleased to announce a technical preview of the 1.3.0 release with new features. Please note that this is almost all the features going into 1.3.0 and we will after this release be continuing to focus on bug and performance work. We are putting out the technology preview so we can get your feedback on how the new features work with your app and if there are any changes or improvements that need to be made.

    This release is NOT in nuget.org and will be in the forums only until the -pre1 release which will contain a more respectable number of bug fixes as well.

    Features

    • Add DefaultValueCreator to BindableProperties to allow dynamic allocation of default values in bindable properties (prevents BP's from having to share the same object instance for default values)
    • Behaviors
    • Triggers
    • Implement Binding.Source
    • Added ListView.ScrollTo

    Xamarin.Forms.Application

    • Supports easy changing of root page
    • Persistent data store via Properties dictionary
    • Sleep/Resume/Start events
    • Application level resource dictionary

    Dynamic Resources

    • Supported in XAML via {DynamicResource key}
    • Supported in code via SetDynamicResource (BindableProperty property, string key);

    Styles

    • Support styles in XAML and in code
    • Allow styles to be based on DynamicResources via Style.BaseResourceKey
    • Add platform specific styles via Device.Styles (supports iOS dynamic type)

    Font Changes

    • Obsolete Font struct (still works for forseeable future, except with styles)
    • Add Label.FontFamily, Label.FontSize, Label.FontAttributes
    • Add Button.FontFamily, Button.FontSize, Button.FontAttributes

    Improvements

    • Reduce memory footprint of BindableObject
    • Several small performance improvements to BindableObject
    • WebView now supports GoBack/Forward + Navigation events

    Bug Fixes

    • [iOS] Fix UIAppearance and NavigationPage integration (NavigationPage no longer overrides UIAppearance settings
    • [Android] ViewCell will now size down to small sizes when requested
    • [Android] Click through settings now mostly match other platforms (Layouts on top of other elements no longer allow clickthrough unless explicitly requested)
    • [Android] Images in ViewCells using UriImageSource's will no longer occasionally get the wrong image at startup
    • [Android] Header cells no longer amazingly small in TableView
    • [XAML] ConstraintExpression can now be used inside of a DataTemplate
    • [XAML] Unfound StaticResources no longer throw an exception
    • [XAML] Improved XAML parsing engine to improve perf and reduce namescoping errors
    Wednesday, October 8, 2014 3:29 PM

All replies

  • User6588 posted

    An advice on how to install this on XS for Mac? Not too familiar w/ Nuget (aside from very basic consumption of it), and couldn't figure out the command or process to use to install.

    Wednesday, October 8, 2014 5:33 PM
  • User112 posted

    Unpack it in a folder, add that folder as a nuget source (top left drop down of Add Packages window, pick Configure Sources..)

    Wednesday, October 8, 2014 5:51 PM
  • User75222 posted

    Great job! How long for the release? A month? two? lol

    Wednesday, October 8, 2014 6:12 PM
  • User68488 posted

    Sounds very cool, especially styles and triggers. Any plans to support full-blown templated controls in the near future?

    Wednesday, October 8, 2014 6:28 PM
  • User12947 posted

    Any chance to have Margin property implemented? It will help porting Microsoft XAML pages, because changing from Margin to Padding is about moving the property from content to container, not always feasible without side effects.

    If you ever will do it, please add the Margin property into View base class, so we can use it inside every descendant, while actually Padding is present only on Layout and Page descendants.

    Wednesday, October 8, 2014 6:51 PM
  • User61098 posted

    Good news! Any details on how the Behaviors are working?

    Wednesday, October 8, 2014 7:12 PM
  • User20490 posted

    Great work, guys!

    Wednesday, October 8, 2014 8:03 PM
  • User41481 posted

    @JasonASmith?

    Will 1.3 include support for more gestures or an extensible gesture recognizer class?

    Wednesday, October 8, 2014 8:29 PM
  • User352 posted

    @nicholasalt? More gestures are planned yes. I can't say when because I am not sure if I can hit 1.3.

    @Nick60 the plan is to add Margin to the View class yes. Its not trivial to implement since each of the Layouts needs to be updated to support it in some fashion. It also complicates layout logic further which is why we are waiting to do the iOS ListView perf improvements before we add it. Otherwise we will hurt that perf further.

    Wednesday, October 8, 2014 9:01 PM
  • User66766 posted

    @JasonASmith? are iOS ListView perf improvements slated for 1.3?

    Wednesday, October 8, 2014 9:08 PM
  • User352 posted

    @DH_HA no promises but hopefully yes for the 1.3 final release.

    Wednesday, October 8, 2014 9:08 PM
  • User66766 posted

    @JasonASmith? in 1.3 TP PopToRootAsync fails in this scenario:

    • Dashboard screen - tap to
    • List Screen with ViewCells - select item to
    • Details Screen - Button that calls PopToRootAsync

    It only fails when a child page contains a ListView with ViewCells. child pages with TextCells don't cause the exception.

    System.ArgumentNullException: Argument cannot be null.
    Parameter name: first
      at System.Linq.Check.FirstAndSecond (System.Object first, System.Object second) [0x00006] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.2.0.193/src/mono/mcs/class/System.Core/System.Linq/Check.cs:87
      at System.Linq.Enumerable.Except[KeyValuePair`2] (IEnumerable`1 first, IEnumerable`1 second, IEqualityComparer`1 comparer) [0x00000] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.2.0.193/src/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:800
      at Xamarin.Forms.MergedResourceDictionary.OnParentResourcesChanged (IEnumerable`1 values) [0x00000] in <filename unknown>:0
      at Xamarin.Forms.MergedResourceDictionary.set_ParentResourceDictionary (IResourceDictionary value) [0x00000] in <filename unknown>:0
      at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x00000] in <filename unknown>:0
      at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in <filename unknown>:0
      at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00000] in <filename unknown>:0
      at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in <filename unknown>:0
      at System.Collections.ObjectModel.ObservableCollection`1[Xamarin.Forms.Element].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00014] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.2.0.193/src/mono/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs:161
      at System.Collections.ObjectModel.ObservableCollection`1[Xamarin.Forms.Element].RemoveItem (Int32 index) [0x0001a] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.2.0.193/src/mono/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs:182
      at System.Collections.ObjectModel.Collection`1[Xamarin.Forms.Element].Remove (Xamarin.Forms.Element item) [0x00011] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs:134
      at Xamarin.Forms.NavigationPage.<PopToRootAsync>b__19 (Xamarin.Forms.Element c) [0x00000] in <filename unknown>:0
      at Xamarin.Forms.EnumerableExtensions.ForEach[Element] (IEnumerable`1 enumeration, System.Action`1 action) [0x00000] in <filename unknown>:0
      at Xamarin.Forms.NavigationPage+<PopToRootAsync>d__1c.MoveNext () [0x00000] in <filename unknown>:0
      at --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62
      at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs:60
    
    Wednesday, October 8, 2014 9:14 PM
  • User352 posted

    @DH_HA? doh, thank you. This is why we do these previews. The merged dictionary clearly has a bug somewhere.

    Wednesday, October 8, 2014 9:16 PM
  • User66766 posted

    @JasonASmith? np. Good work by the way. Very excited about this product. Moving all our apps over it.

    Our biggest hope is same performance to Xamarin.iOS and Xamarin.Android and flexibility to get extend more like the ListView on Android

    Wednesday, October 8, 2014 9:20 PM
  • User41481 posted

    @JasonASmith? If tap swipe and long tap gestures do not make the 1.3.0 release can we expect them within a 1.3.X release? My company is approaching a critical point deciding if we will stay with Forms or not and gestures are a huge concern.

    Wednesday, October 8, 2014 9:22 PM
  • User352 posted

    @nicholasalt? there already are tap gestures?

    Wednesday, October 8, 2014 9:23 PM
  • User41481 posted

    @JasonASmith?

    My mistake in wording, trying to make post between meetings :).

    If swipe and long tap gestures do not make the 1.3.0 release can we expect them within a 1.3.X release?

    Wednesday, October 8, 2014 9:26 PM
  • User352 posted

    @nicholasalt? can you explain why you want them by chance? I am curious because the gestures you want make me think you want to implement menus in ListViews, if so we have a better answer :)

    As for those particular gestures, I will be looking into both of them.

    Wednesday, October 8, 2014 9:28 PM
  • User41481 posted

    @JasonASmith? for expanded options on list items where tap gesture is already used, such as swipe to display edit/delete button, swipe to add to favorites, etc.

    Wednesday, October 8, 2014 9:30 PM
  • User352 posted

    @nicholasalt? ListView ContextActions are coming, which will use the native gestures and use the native menu to present context actions in lists. Swipe on iOS, LongPress on WinPhone/Android. Supports delete events, the More button on iOS, etc. That will make 1.3

    Wednesday, October 8, 2014 9:32 PM
  • User68488 posted

    Any plans to support full-blown templated controls in the near future?

    Thursday, October 9, 2014 1:23 AM
  • User3466 posted

    @JasonASmith? any docu at all on the new stuff?

    Thursday, October 9, 2014 1:25 AM
  • User12150 posted

    @JasonASmith?

    ListView ContextActions are coming

    This is great!!!

    Thursday, October 9, 2014 3:28 AM
  • User352 posted

    @MitchMilam? you know it occurred to me you guys would need docs like 3 hours ago. We haven't had time to write them out in full yet, but here is the gist of it:

    Xamarin.Forms.Application

    The basic gist is you use the FormsApplication[Delegate/Activity/Page] instead of what your templates currently use. New up your custom Application subclass, and call LoadApplication. You still must Forms.Init as you do now.

    Styles

    Go read XAML style documentation and assume a slightly less powerful version. You can find some device specific pre-build styles in Device.Styles

    Implicit styles can be defined as you might expect coming from WPF or Silverlight

    DynamicResources

    If you have used XAML you know what dynamic resources are and should be able to use these just fine.

    Thursday, October 9, 2014 3:41 AM
  • User352 posted

    @PeterMoore? no, there are no plans for this at this time. @ermau? will probably stop by later and give a more detailed explanation, however the short version is that Xamarin.Forms isn't a lookless toolkit so it wont make that much sense.

    Thursday, October 9, 2014 3:45 AM
  • User112 posted

    @JasonASmith? It might make sense in certain scenarios though. Imagine I have a basic page like Header above and few buttons in the footer and the content in between. I'd create a template for the page in this case.

    Thursday, October 9, 2014 6:16 AM
  • User112 posted

    I am bit disappointed that modifying/fixing Navigation isn't on the radar at all. Besides history recreation problem there is a bigger flaw: persisting page instances on stack. Here, click button a few times.

    public static Page GetMainPage()
            {
                StackLayout stack = new StackLayout();
    
                Button button = new Button
                {
                    Text = "Click"
                };
                button.Clicked += button_Clicked;
                Image image = new Image
                {
                    Source = "http://blog.rthand.com/images/2014/06/profiler_thumb.png",
                    WidthRequest = 800,
                    HeightRequest = 400
                };
                stack.Children.Add(image);
                stack.Children.Add(button);
                return new NavigationPage(new ContentPage {  Content = stack});
            }
    
            static void button_Clicked(object sender, EventArgs e)
            {
            GC.Collect ();
                Button button = (Button)sender;
                button.Navigation.PushAsync(GetMainPage());
            }
    
    Thursday, October 9, 2014 6:41 AM
  • User69888 posted

    This is great news! Keep up the good work :)

    Thursday, October 9, 2014 7:32 AM
  • User5087 posted

    What about animation of pages. Are there any news about this?

    Thursday, October 9, 2014 11:12 AM
  • User3466 posted

    [removed]

    Thursday, October 9, 2014 1:09 PM
  • User1004 posted

    @MitchMilam? inherits your AppDelegate from FormsApplicationDelegate, that's where you'll find LoadApplication ():

    [Register ("AppDelegate")]
    public partial class AppDelegate : FormsApplicationDelegate
    {
        public override bool FinishedLaunching (UIApplication uiApplication, NSDictionary launchOptions)
        {
            Forms.Init ();
            //FormsMaps.Init ();
    
            LoadApplication (new App ());
            return base.FinishedLaunching (uiApplication, launchOptions);
        }
    }
    
    Thursday, October 9, 2014 1:52 PM
  • User352 posted

    @MihaMarkic modifiable back navigation stack is already slated for 1.3.0 as well, and has been planned for this release for months now. It just didn't get implemented in time for this technology preview release. We think you will be satisfied with the upcoming API for that.

    Thursday, October 9, 2014 2:23 PM
  • User352 posted

    @Charlenni while we have had some small discussions about a page transition API, we have not yet decided on what to do. So unfortunately I cannot speak to a timeframe or even give an absolute affirmative on that yet. Again this is purely due to not having fully flushed through all the ideas and vetted feasibility on all current and future platforms.

    Thursday, October 9, 2014 2:25 PM
  • User3466 posted

    @StephaneDelcroix Ha! I just figured that out.

    Thursday, October 9, 2014 2:27 PM
  • User112 posted

    @JasonASmith? Excellent!

    Thursday, October 9, 2014 2:50 PM
  • User5087 posted

    @JasonASmith: Sorry about this. Especially you could find the most to disable animations in Xamarin.Forms already. If you create your own renderer and set animation to false, the most works. Only animations of pages, that are vanish is not possible.

    So perhaps it is possible to make this flag, in a first step, public, that we could disable animation. Than there is time to make the great step.

    Thursday, October 9, 2014 2:51 PM
  • User352 posted

    @Charlenni part of the modifiable back stack work is including options to navigate without animations

    Thursday, October 9, 2014 3:15 PM
  • User5087 posted

    @JasonASmith: That sounds good.

    So now, my best wishes for your presentation. I would like to join you, but the live stream is limited to one room :(

    Thursday, October 9, 2014 5:02 PM
  • User55911 posted

    Couple of things that I would have expected :

    1. GridView ? (again xamarin labs have had it by now implemented if its wasnt for the bugs that are encountered. For iOS we are facing the known issue of no event is getting fired when tapping a collection item. And on Android we are facing that the RendererFactory only gets the first View to native but not the subclasses (well when debugging it seems everything is alright but somehow the children aren't showing only the parent view).

    2. I would love to see a PopModelAsync(int numberOfPagesToPop) and PopAsync(int numberOfPagesToPop). I did see this change - Supports easy changing of root page <--- can you explain what that easy changing is ?

    3. ListView and TableView ... Please give us an event for both to Force Refresh if need to be. There are many occasions where it doesn't do it automatically. And even better would be to merge these 2 together already and have a way to have full control over them.

    Specific platform properties call e.g. pseudo :

    
    var viewCell = new ViewCell();
    
    viewCell.iOS.Disclosure = true;
    viewCell.Android.SomeSpecificProperty  = foo;
    
    viewCell.BackgroundColor = Color.Green; //for all platforms
    

    What we noticed is that we want power over all platforms within Xamarin.Forms I am not expecting this options in 1.3. We are now writing renderers for the most simple things on specific platforms. Just thought I mention it.

    Thursday, October 9, 2014 6:11 PM
  • User3466 posted

    @JasonASmith, @StephaneDelcroix I wrote a short article outlining how it appears the FormsApplication class works:

    http://www.infinite-x.net/2014/10/09/xamarin-forms-1-3-0-preview-formapplication/

    If you have a chance, I'd appreciate a quick review to see if I got the parts right.

    Thursday, October 9, 2014 7:51 PM
  • User1004 posted

    @MitchMilam? you mean this, right ? http://www.infinite-x.net/2014/10/09/xamarin-forms-1-3-0-preview-formapplication/

    Thursday, October 9, 2014 7:54 PM
  • User1004 posted

    @MitchMilam? : looks good

    Thursday, October 9, 2014 7:57 PM
  • User3466 posted

    Yes, sorry. too quick on the click

    Thursday, October 9, 2014 7:57 PM
  • User61458 posted

    @MitchMilam? I've added your article to the next www.XamarinWeekly.com newsletter. It will come out tomorrow.

    Does anyone know why this release was not talked about at Evolve? Love what's going on in Xamarin Forms.

    Thursday, October 9, 2014 8:19 PM
  • User18718 posted

    @AdamWolf - It was mentioned in the Extending Forms talk at 3 today. That's how I knew to look for the preview. But it should have made the keynote. Exciting stuff.

    Good to know what's in the pipeline so that I don't waste too much time trying to come up with my own solution.

    Thursday, October 9, 2014 11:00 PM
  • User79243 posted

    Styles! Great if this work like in WPF/Silverlight

    Friday, October 10, 2014 6:19 AM
  • User258 posted

    @MitchMilam? I've referenced your article on the Xamarin Forms linked-in group at: https://www.linkedin.com/groups/Xamarin-Forms-13-Tech-Preview-8184705%2ES%2E5925657259500662788

    Friday, October 10, 2014 7:42 AM
  • User65389 posted

    @MitchMilam? :
    Thanks for your (good looking and easy to understand) work :-)
    This is the way, like (at least enhanced) updates should be documented generally.

    Friday, October 10, 2014 7:58 AM
  • User67129 posted

    Why did Forms not get a bigger mention at the keynote (if at all, I can't remember) its probably the most exciting part of Xamarin

    Friday, October 10, 2014 8:09 AM
  • User65389 posted

    +1 to jKay

    Friday, October 10, 2014 8:13 AM
  • User258 posted

    @JKay I agree. I had my hopes high for more feature and platform announcements. Basic mac support and perhaps windows 10 support leaps to mind :) No really, a public roadmap would be nice.

    Friday, October 10, 2014 9:01 AM
  • User5087 posted

    @JKay: I agree too.

    For me it seems, that Xamarin.Forms is no major project at Xamarin. Perhaps there are more news after Evolve, when @JasonASmith and his collegs have more time to work on the project ;)

    To say it correct: Insights is nice, but there are other third party tools, doing the same. The Android Player is good, but I don't have problems with the old one. But instead of this, Xamarin.Forms is a real killer tool for mobile development. So it would have been nice to hear some news about it, even if it was only about stability.

    Friday, October 10, 2014 9:57 AM
  • User67129 posted

    maybe the responses from this part of the forum are slightly skewed (being posted in the Xamarin.Forms part) but all announcements at keynote have already been done to some extent. Insights, emulator, code analysis tools. Forms is a brand new innovation and has the potential to be huge given enough time

    Friday, October 10, 2014 10:03 AM
  • User258 posted

    Forms is the only disruptive tech that Xamarin got.

    Friday, October 10, 2014 10:35 AM
  • User112 posted

    If I understood correctly, the broad 3rd party coalition (support) is all about Forms. I assume they'll have non-Forms versions as well (or better, the other way round) but the highlight was Forms.

    Friday, October 10, 2014 11:58 AM
  • User400 posted

    @MihaMarkic you understood correctly and I thought that was a major announcement. Getting all of this 3rd party control creators to support Forms is huge. I've been using Telerik controls for WP for a while and would love half of those controls on Forms

    Friday, October 10, 2014 11:38 PM
  • User352 posted

    Hi guys,

    It's been a crazy week and I would LOVE to get into this more. I wanted to respond to all your love about having Xamarin.Forms in the keynote. I would have loved to see more X.F love in the keynote, however I understand why. They had to cut content left and right, and choosing to show all the new components in forms + all the forms mentions in the keynote over talking about what are essentially release notes really does make sense.

    I also am REALLY good friends with the insights guys. We worked together back at Canonical and they are an absolutely amazing bunch. I am so happy to see their product finally see the light of day and to let them have their hour in the limelight. They earned it. Please please, if you use Xamarin.Forms, integrate Xamarin.Insights. This way you can help the Xamarin.Inisghts team as well as provide detailed crash reports for anything you might encounter.

    Also lastly there was some mention of my talk. Please dont over-hype it... I am a programmer and a geek, getting in front of people and presenting is pretty low on my skill list. I did it because people wanted it, but I wont say Im at all good at it. I hope you enjoy it but politely request feedback, good or bad, be kept from me :)

    Some specific responses:

    @ThomasSimutek? yes they are WPF/XAML style Styles

    @Charlenni? Xamarin.Forms is one of the largest product teams at Xamarin. It's apparent minor part in the keynote was by no means an indication of Xamarin's dedication. We are growing too so we can better support this incredibly diverse and wonderful community. I take every bug personally, and the failure of each bug is immense to me, but it makes me determined to fix every last issue for you. I want you all to succeed so much using Forms.

    @RobertAlMalak.0363? a flow view is obviously going to be done. There is much more to it though than simply supporting a grid. To do this right it needs to be a flow view with support for behavioral layout, data templating, and adaptive reflow depending on form factor. Anything short will fail hard when RT comes around into Forms. It's not something we can whip up in a weekend sadly. As for the other bits, we are working on some platform-specific extensions/apis that would be available in the non-PCL code to do some of the things you want without writing renderers. We are not going to add APIs that only make sense on a single platform, nor do I want to go further down the path of naming platforms. Device.OnPlatform already made that mistake and I am learning to regret it a bit as we look down RT.

    Lastly, I wanted to just say that if I met you at Evolve, I really thank you for being so kind and genuine. Not a single person was abusive or mean, not one. That was a big change for me coming from the Linux community. I really love being at Xamarin and serving you. We will continue to strive to make Xamarin.Forms everything we all know it can and should be.

    Saturday, October 11, 2014 1:21 AM
  • User5087 posted

    @JasonASmith: Thank you for your answer.

    I like, what you do. Very cool things. But it would be nice, if you could find between all this crazy things some time to inform the community (perhaps only the community outside of Evolve ;) ). We are sitting in front our computers and don't know, if Xamarin.Forms is a one men show or if there is a team. We don't know, what are the next steps. We don't know, if the workaround of a bug we did in the last two days is next week needless.

    Saying this, it would be nice, if you could, when you are recovered from this week and the months before ;), tell us, where the journey goes to and where we could expect changes.

    Saturday, October 11, 2014 7:01 AM
  • User112 posted

    Not a single person was abusive or mean, not one. That was a big change for me coming from the Linux community.

    o_O

    I don't even know what to comment on this.

    Saturday, October 11, 2014 8:31 AM
  • User79243 posted

    Think you did just fine @JasonASmith, it was very informative. I look forward to testing this, but wish there was a beta nuget repository one could add to nuget sources.

    Did I just miss what "dynamic resources" are or is there an SL/wpf translation to the term?

    Many thanks for pushing Forms, it is the key to success. The word needs to get out to public awareness that apps can be one-code. That is my whole business idea.

    Cheers

    Saturday, October 11, 2014 1:17 PM
  • User352 posted

    If its cool with you guys I will try to post up a summary of all the roadmap features we confirmed at Evolve 2014 in the coming week. I can't do it now, I just got home and I just need about 48 hours to rest. My voice is completely shot and Im barely awake.

    @ThomasSimutek? there is a XAML construct for DynamicResources that many people have used for a long time, googling should be helpful there.

    Saturday, October 11, 2014 11:29 PM
  • User28327 posted

    I love the new features! Adding Styles will be HUGE!

    Now my only problem is keeping up with all of these changes for my Xamarin Forms talk I am giving on Saturday. :-)

    Monday, October 13, 2014 1:51 AM
  • User28327 posted

    So I am having some trouble installing the nuget package. I added the package source to the package manager, but the package still doesn't show up. When I try to install it manually from the PM Console, I get this:

    PM> Install-Package Xamarin.Forms.1.3.0.6262-pre0.nupkg c:\xforms Install-Package : No compatible project(s) found in the active solution. At line:1 char:1 + Install-Package Xamarin.Forms.1.3.0.6262-pre0.nupkg c:\xforms + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetNoCompatibleProjects,NuGet.PowerShell.Commands.InstallPackageCommand

    Any ideas?

    Monday, October 13, 2014 2:09 AM
  • User28327 posted

    @JasonASmith? Just out of curiosity, is there any feel for when XAML intellisense for VS might be released?

    Monday, October 13, 2014 2:11 AM
  • User3466 posted

    @EricGrover? Take a look at the first part of this article.

    Monday, October 13, 2014 2:35 AM
  • User352 posted

    VS Intellisense is being worked on. I'm trying to get it resolved for both VS and VS + Resharper users (those are entirely separate beasts) however it looks like Resharper is the only thing we will be able to light up in the short term. Short term still being months. We are not ignoring it, it's just not trivial sadly :(

    Monday, October 13, 2014 3:26 AM
  • User3066 posted

    Thanks Jason, your openness is an invaluable plus for all Xamarin Developers, love what you're doing.

    Monday, October 13, 2014 4:49 AM
  • User3066 posted

    Are Application level resources supposed to be accessible from any page using {Static/DynamicResource} like Windows XAML apps? did a quick test but looks like they aren't resolved.

    Monday, October 13, 2014 6:14 AM
  • User112 posted

    @JasonASmith? Out of curiosity, what problems are you facing? The simple XML intellisense implementation should be fairly trivial (or not)? I guess you are working on "bindings mini language"? Why is Resharper even taken into consideration (Resharpre dummy here)?

    Monday, October 13, 2014 6:44 AM
  • User1004 posted

    @corcav1366? Application level resources are accessible throughout the app using {DynamicResource}.

    • {StaticResource}s haven't changed. They're still resolved at the time they're set, so the scope is usually the scope of the XAML file.
    • {DynamicResource}s are more like Bindings. They can be resolved later on, when the resource becomes available, and get notified when the resource changes. The scope of DynamicResource is any resource defined in a ResourceDictionary in the parent tree, up to the Application, which happen to also propagate the system-wide resources (the ones with the keys listed in Device.Styles).
    Monday, October 13, 2014 7:43 AM
  • User3066 posted

    @StephaneDelcroix why isn't supported in StaticResource also? don't you think this will confuse XAML devs coming from Windows Platform?

    Monday, October 13, 2014 9:37 AM
  • User3066 posted

    I'm trying DynamicResource but it doesn't work for me (tried both Xaml/Code and Page/Application level) no errors, but lookup doesn't work. Anyone else?

    Monday, October 13, 2014 10:15 AM
  • User1004 posted

    @corcav1366?: If you want {DynamicResource} to find Application-level resources, you have to use the new Application class of XF1.3 (otherwise, it'll only look in parents). If you do so, it works:

    public class App : Application
    {
        public App ()
        {
            MainPage = new XamlPage ();
            Resources = new ResourceDictionary {
                {"foo", "bar"}
            };
        }
    }
    
    <?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="XamlPage">
        <Label Text="{DynamicResource foo}" VerticalOptions="Center" HorizontalOptions="CenterAndExpand"/
    </ContentPage>
    

    Displays "bar", as one would expect!

    Monday, October 13, 2014 11:03 AM
  • User3066 posted

    @StephaneDelcroix? Looks like a converter issue, resource is found but associated converters not, look at this sample: http://pastebin.com/SvHUMNxD

    Final result is "Red" text in gray color, using StaticResource label's text is in red.

    Monday, October 13, 2014 11:27 AM
  • User3066 posted

    What is the syntax for styles? tried this http://pastebin.com/2gRtFU9i but I get a NullReference exception, same just adding the style w/o any reference.

    Monday, October 13, 2014 12:14 PM
  • User1004 posted

    @corcav1366? there's no converter issue. you declare a string resource, so don't expect to it to behave like a color. that's exactly the same for {StaticResource}s

    so, instead of Red

    try

    <ContentPage.Resources>
                <ResourceDictionary>
                        <Color x:Key="color">Red</Color>
                </ResourceDictionary>
        </ContentPage.Resources>
    

    This is because the TypeConverter are only used at the time we parse the xaml, and not on assigning values. This is not a bug, it's a design choice. Try this:

    var label = new Label ();
    label.SetValue (Label.TextColorProperty, "Red");
    

    you won't get a Red text here, because the TextColorProperty is of type Color, not string.

    also, in this case, as the resource is defined in the same xaml, it's (slightly) less expensive to use a {StaticResource} than a {DynamicResource}.

    Monday, October 13, 2014 12:46 PM
  • User1004 posted

    @corcav1366? the xaml syntax for Style is not final yet. The syntax you used is the one we want to get to, but we're not there (yet). In the meantime, use this syntax (prefix the property by it's type):

    <Style x:Key="style1"  TargetType="Button" >
        <Setter Property="Button.VerticalOptions" Value="Center" />
        <Setter Property="Button.HorizontalOptions" Value="Center" />
    </Style>
    

    This helps the BindablePropertyConverter to resolve the Type. We will keep supporting this syntax in the future (for disambiguation and Attached BindableProperties) but we will also allow the shortcut you expect.

    Monday, October 13, 2014 12:55 PM
  • User3066 posted

    Hi @StephaneDelcroix? Using Color instead of String works and resources are found also at application level (BTW: Why do i need to use Dynamic instead of Static to lookup App wide resources?) but the string version works fine with StaticResource and is the suggested method in your documentation http://developer.xamarin.com/guides/cross-platform/xamarin-forms/xaml-for-xamarin-forms/xamlmarkupextensions/ the same problem happens when you use OnPlatform (see here http://pastebin.com/QhKx56nZ, ok with Static, not working with Dynamic) I'd expect StaticResource and DynamicResource to behave the same, apart from DynamicResource being able to update target when resource changes, at least this is the behavior on Windows XAML.

    Monday, October 13, 2014 1:22 PM
  • User28327 posted

    I got the preview up and going finally. I love having Styles! Unfortunately, I am getting this exception when I navigate back in my Android app:

    10-13 09:26:52.103 E/mono-rt (14362): [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument cannot be null. 10-13 09:26:52.103 E/mono-rt (14362): Parameter name: first 10-13 09:26:52.103 E/mono-rt (14362): at System.Linq.Check.FirstAndSecond (System.Object first, System.Object second) [0x00000] in :0 10-13 09:26:52.103 E/mono-rt (14362): at System.Linq.Enumerable.Except[KeyValuePair2] (IEnumerable1 first, IEnumerable1 second, IEqualityComparer1 comparer) [0x00000] in :0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.MergedResourceDictionary.OnParentResourcesChanged (IEnumerable1 values) [0x00000] in <filename unknown>:0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.MergedResourceDictionary.set_ParentResourceDictionary (IResourceDictionary value) [0x00000] in <filename unknown>:0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x00000] in <filename unknown>:0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in <filename unknown>:0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00000] in <filename unknown>:0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in <filename unknown>:0 10-13 09:26:52.103 E/mono-rt (14362): at System.Collections.ObjectModel.ObservableCollection1[Xamarin.Forms.Element].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in :0 10-13 09:26:52.103 E/mono-rt (14362): at System.Collections.ObjectModel.ObservableCollection1[Xamarin.Forms.Element].RemoveItem (Int32 index) [0x00000] in <filename unknown>:0 10-13 09:26:52.103 E/mono-rt (14362): at System.Collections.ObjectModel.Collection1[Xamarin.Forms.Element].Remove (Xamarin.Forms.Element item) [0x00000] in :0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.NavigationPage+d11.MoveNext () [0x00000] in :0 10-13 09:26:52.103 E/mono-rt (14362): --- End of stack trace from previous location where exception was thrown --- 10-13 09:26:52.103 E/mono-rt (14362): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 10-13 09:26:52.103 E/mono-rt (14362): at System.Runtime.CompilerServices.TaskAwaiter`1[Xamarin.Forms.Page].GetResult () [0x00000] in :0 10-13 09:26:52.103 E/mono-rt (14362): at Xamarin.Forms.Platform.Android.Platform+d5.MoveNext () [0x00000] in :0 The program 'Mono' has exited with code 0 (0x0).

    Monday, October 13, 2014 1:32 PM
  • User1004 posted

    Hi @corcav1366?: - you have to use DynamicResource when referencing Application-level resources, because at the time the Xaml is parsed, and the object is instantiated, it's not yet in the element tree, does not have a parent, and can't resolve resources defined in parents. - thanks for pointing to our doc that says 1/ is broken (it shouldn't be) and 2/ strings works (that's a surprise to me)

    your expectations are right. {Static-} and {Dynamic-} resources should -- and will -- behave the same

    Monday, October 13, 2014 1:35 PM
  • User3066 posted

    Hi @StephaneDelcroix? I understand that technical difficulty but please reconsider it for RTM, using {Dynamic-} for app wide lookup would be confusing and will also add (i presume) unnecessary overhead when all you need is to use app-wide static resources. FYI I tried using DynamicResource with Binding source w/o luck i presume the cause is the same as OnPlatform.

    Monday, October 13, 2014 2:05 PM
  • User1004 posted

    @corcav1366? using a {DynamicResource} converter in {Binding} is not supported.

    Monday, October 13, 2014 2:39 PM
  • User1004 posted

    @EricGrover? this is known, and the fix will be part of next build.

    Monday, October 13, 2014 2:46 PM
  • User28327 posted

    @JasonASmith It took Microsoft a long time to get intellisense working well for XAML too, so it is not surprising to hear that it is difficult.

    Also, any news regarding a visual designer for XAML would be good as well. Thanks!

    Monday, October 13, 2014 3:20 PM
  • User28327 posted

    @StephaneDelcroix I have Page level Styles working, but where would I define an Application scoped ResourceDictionary (with XAML)? Can you give us a bit of direction?

    Monday, October 13, 2014 3:22 PM
  • User3066 posted

    Thanks @StephaneDelcroix,? hope it will be fixed for RTM (for parity with StaticResouce that works fine with Source)

    Monday, October 13, 2014 3:48 PM
  • User28327 posted

    So when I try and build the 1.3.0 preview for WinPhone, I get the following build errors:

    Error 11 Cannot resolve dependency to assembly 'Xamarin.Forms.Platform.WP8, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. C:\Code\XWeather\XWeather.Mobile\XWeather.Mobile.WinPhone\App.xaml 1 1 XWeather.Mobile.WinPhone

    Error 12 Cannot resolve dependency to assembly 'Xamarin.Forms.Platform.WP8, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. C:\Code\XWeather\XWeather.Mobile\XWeather.Mobile.WinPhone\MainPage.xaml 1 1 XWeather.Mobile.WinPhone

    Monday, October 13, 2014 3:51 PM
  • User1004 posted

    @EricGrover? I see references to 1.2.3. could you please try to clean your references ?

    Monday, October 13, 2014 3:59 PM
  • User28327 posted

    @StephaneDelcroix Yeah, so I cleaned the solution, and made sure that all of my Xamarin Forms dlls were referencing 1.3.0

    Monday, October 13, 2014 4:02 PM
  • User28327 posted

    @StephaneDelcroix I figured it out. Xamarin.Forms.Labs must have an explicit reference to the earlier version of the Platform dll. Once I removed the reference, it built.

    Monday, October 13, 2014 4:10 PM
  • User1004 posted

    @EricGrover? GREAT

    Monday, October 13, 2014 6:37 PM
  • User3466 posted

    @EricGrover, @StephaneDelcroix Yes. there is an explicit forms build reference in the Labs project nugets.

    Monday, October 13, 2014 8:07 PM
  • User3466 posted

    @StephaneDelcroix question on Properties: Should they be accessible at the page-level, or do we need to pass them in from the Application?

    I have performed several experiments and have not been able to read properties from a page no matter how they are referenced.

    Tuesday, October 14, 2014 4:45 AM
  • User1004 posted

    @MitchMilam? I don't get the question. could you rephrase ?

    Tuesday, October 14, 2014 6:30 AM
  • User3466 posted

    @StephaneDelcroix consider this: I have a Profile page (Profile.cs, a ContentPage) where application settings are set by the user. I would like to use the new Application.Properties property to store these settings.

    From within Profile.cs I cannot seem to access the Application object to get/set the Properties. Should that object be visible to the pages within the Application? Or is that not how it works?

    Tuesday, October 14, 2014 11:56 AM
  • User1004 posted

    @MitchMilam? Application.Current is the current application

    Tuesday, October 14, 2014 12:07 PM
  • User3466 posted

    @StephaneDelcroix That is what I thought, but from Profile.cs, it is always null.

    Tuesday, October 14, 2014 12:15 PM
  • User1004 posted

    it's null until you call LoadApplication () from your platform projects.

    Tuesday, October 14, 2014 12:17 PM
  • User3466 posted

    Ah. And when the page is actually constructed we technically have not loaded the application.

    Would that be correct?

    Tuesday, October 14, 2014 12:54 PM
  • User1004 posted

    @MitchMilam? it all depends on how you build your application, but that's at least true for the MainPage, yes.

    But without using the static Application.Current, you can make sure your Application is always build before the pages, and inject the Application into the pages that needs it (you'd often do that by passing app as constructor parameter).

    Tuesday, October 14, 2014 1:28 PM
  • User6371 posted

    I'm curious about the motivation for deprecating the Font struct. I assume this is just about styles needing finer granularity?

    Tuesday, October 14, 2014 5:09 PM
  • User352 posted

    So that they can be controlled and overriden individual by Styles, which turns out to be important if you want to support DynamicType on iOS.

    Tuesday, October 14, 2014 8:07 PM
  • User79035 posted

    Hi all. Making AppDelegate inherit from FormsApplicationDelegate is a nice step, but why is the Window private and how could I get Access to it? My issue is - I got a solution, taken from samples and examples for composing an Email with MFMailComposeViewController. It worked fine, becouse it used this
    var rootController = ((AppDelegate)(UIApplication.SharedApplication.Delegate)).Window.RootViewController.PresentViewController(mailer, true, null); Now it's private and could not be found. This also is not working UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(mailer, true, null);

    I need access to the Window, or how can I get Access to the RootViewController ??

    By the way nice work!! greets

    Wednesday, October 15, 2014 10:18 AM
  • User2773 posted

    1.3.0 - great ;) I've just updated and I am experiencing some strange behavior on ListViews and TableViews. Tapped event ALMOST every time doesn't fire (almost because in certain positions, one out of ten tries it works ok). Do you have any idea what could cause that?

    Wednesday, October 15, 2014 1:17 PM
  • User2773 posted

    [Android] Click through settings now mostly match other platforms (Layouts on top of other elements no longer allow clickthrough unless explicitly requested)

    Ok, didn't see that earlier. Setting InputTransparent = true on element (Label, Image, etc) of a custom ViewCell resolved it.

    Wednesday, October 15, 2014 3:16 PM
  • User352 posted

    @DanielL ah crap good catch, will have to resolve that!

    Wednesday, October 15, 2014 5:50 PM
  • User74263 posted

    There seems to be a serious bug in the prerelease.

    When Element.Parent is set to null (e.g. when a page is popped from the navigation stack), the setter of Element.Parent sets this.resourceDictionary.ParentResourceDictionary to null.

    This invokes the setter of MergedResourceDictionary.ParentResourceDictionary, which calls MergedResourceDictionary.OnParentResourcesChanged with a null argument.

    However, MergedResourceDictionary.OnParentResourcesChanged is not written with that in mind, and calls values.Except (which is System.Linq.Enumerable.Except), which throws ArgumentNullException.

    You should fix MergedResourceDictionary.OnParentResourcesChanged to properly handle null argument values.

    Thursday, October 16, 2014 10:12 PM
  • User1004 posted

    @LucaB, this has been reported already, and is already fixed

    Friday, October 17, 2014 8:47 AM
  • User74263 posted

    Awesome.

    Could we have a newer release of the 1.3.0 branch, ideally on NuGet, and in general more frequent releases?

    The missing features that are being added in 1.3.0 are pretty essential (e.g. without Binding.Source you can't bind two properties on the same object to properties on different objects), so it would be really useful to have access to it.

    Even better would be if you opened the source code repository, even under a restrictive non-open source license, so that one could just run the tip of the development branch or manually backport features one needs into the stable version, and also step through it in the debugger (note that you can already decompile Xamarin.Forms with very readable results, so the loss of trade secrets isn't likely to be significant).

    Friday, October 17, 2014 5:27 PM
  • User352 posted

    Its coming soon

    Saturday, October 18, 2014 12:03 AM
  • User28327 posted

    @JasonASmith or @StephaneDelcroix do you have any example code, or documentation on how to use Triggers in the new release? Specifically, I would love to be able to kick off some animation from a DataTrigger. Thanks.

    Saturday, October 18, 2014 2:52 AM
  • User60112 posted

    Any expected date for the new release ?

    Monday, October 20, 2014 9:02 AM
  • User39613 posted

    +1 for the new release, NuGet availability and documentation please :)

    And is it possible to mix tags with Styles in XAML ? It would really be awesome !

    Monday, October 20, 2014 8:22 PM
  • User81435 posted

    I'll add in this thread things that I find using Xamarin.Forms 1.2.3 and could be simple to implement in 1.3.0.

    0 - Xamarin.Forms

    Vote to make it Open Source o/

    1 - Cell

    Height property could support binding.

    Right now one is forced to use Appearing event of the Cell to set its height, when the List/Table HasUnevenRows set to "true".

    Monday, October 20, 2014 8:29 PM
  • User40225 posted

    Sorry! This is the wrong thread. But no body seems to listen to my query at Xamarin.

    I have contacted Xamarin twice last week. Plus I also posted on General forum regarding my Xamarin.iOS trial license that expired in 1 day and I also sent private message to @JosephHill . But no body has responded yet.

    Is everyone at Xamarin on a long holiday? It is so painful to see your sales being so careless. I am a paid customer. Still you don't care?

    How do I escalate this issue? Details are in above link.

    Again, sorry to post it here.

    Tuesday, October 21, 2014 8:50 AM
  • User1089 posted

    I do hope many of the blatant bugs submitted will be addresses before release I'm especially afflicted by this one https://bugzilla.xamarin.com/show_bug.cgi?id=20670

    Tuesday, October 21, 2014 12:48 PM
  • User26235 posted

    Looking forward to the iOS ListView perf improvements and the ListView ContextActions! @JasonASmith Just to clarify -- would you be able to use the ContextActions for swipe left / right menus? I have a label over a background image and I would like to implement a swipe right to move the label out of view to only see the background image, and a swipe left to show a menu instead of the label, more or less as if a CarouselPage was in the cell.

    Tuesday, October 21, 2014 6:33 PM
  • User81435 posted

    2 - Validation

    Pretty straight forward how it should work. Ah and Binding should support specifying Validation Rules ;-)

    Tuesday, October 21, 2014 8:35 PM
  • User74223 posted

    Would it be possible to add a dependency property to the ResourceDictionary, so that we can define styles at a global scope and link to the styles through that property? I'm thinking something like the Source property in the Microsoft XAML implementation. ( link to documentation )

    Wednesday, October 22, 2014 12:36 AM
  • User66766 posted

    @JasonASmith? when can we expect the next release and the roadmap?

    Thursday, October 23, 2014 9:29 PM
  • User65168 posted

    They changed something really cool on Xamarin. When Xamarin updates happen, you now see what was fixed or updated, instead of a link to the same version. I'm talking about the beta versions. Really cool! thanks for doing that!

    Friday, October 24, 2014 1:53 PM
  • User2773 posted

    1.3.0 pre0 is very stable on Android. Good work!

    What about:

    1. Picker items data binding? That should be an easy one.

    2. Labels wrapping inside Grid cell? (It doesn't work in Android)

    A few questions about XF.Android:

    1. Do you plan to take advantage of GridLayout, CardView and RecyclerView(in ListViews) from v7 support library?

    2. What about Material themes? Are these supported?

    Saturday, October 25, 2014 12:11 PM
  • User311 posted

    @JasonASmith?: finally had time to view your Evolve session yesterday and I was seriously laughing all the time ;-). I hope you have had a well deserved vacation time - if you had any.

    My question for the roadmap: AFAICT Forms does not support the RT Windows Phone variant (aka Universal apps), I was wondering in what sort of timeframe this will be supported. I'm working with Bluetooth Low Energy appliances that only work on the RT variant.

    Other than that: I really like the way that you can choose for XAML or C# coded UI's, and the syntax is concise and simple. My personal preference is coded, and I hope that for all the new features (styling, templates) added it will always be possible to do it either in code or in XAML. As opposed to storyboards in code in Silverlight for example, which are nigh impossible to do in code.

    As far as a designer, a live compiled preview rendering is all I would need to speed up development further. Would be nice to have but moh features are better.

    Monday, October 27, 2014 9:56 AM
  • User67129 posted

    @danielL I have just learnt that a Picker cannot bind to a list of items... seems crazy this hasn't been implemented! There goes my MVVM gold star :(

    Monday, October 27, 2014 11:21 AM
  • User12820 posted

    Sweet!

    Monday, October 27, 2014 8:22 PM
  • User46478 posted

    Guys, i have problem removing page from stack. And i have not time to wait final release of 1.3. What to do? Can i use it at all? Because i read that on 1.3 have included this functionality but after final maybe it could not be added there. Advice me please...

    Tuesday, October 28, 2014 1:18 PM
  • User3466 posted

    I was playing around with the new Font-related methods and am curious if this is the correct usage for .FontSize?

    LabelMain.FontSize = Device.GetNamedSize(NamedSize.Large, LabelMain);

    Tuesday, October 28, 2014 4:41 PM
  • User74263 posted

    Can we have a new snapshot of the code and more frequent releases? (see http://forums.xamarin.com/discussion/26796/can-we-get-more-frequent-releases-and-the-source-code ...)

    Come on... 10 days since "it's coming soon", 20 days after last pre-release, a month since last release and no release, no roadmap, no words, no response to major bugs filed including exact instructions on how to fix the code...

    And it's not like it works already, it's full of bugs and missing major features...

    There are customers of yours that (mistakenly?) made a choice to rely on this software.

    Tuesday, October 28, 2014 9:02 PM
  • User28327 posted

    @LucaB I think we need to have a little bit of patience. These guys have been slinging code out at a pretty darn fast rate. As developers I think we can relate to how hard it is to write good quality code.

    Wednesday, October 29, 2014 1:05 AM
  • User3066 posted

    Is this bug going to be fixed in version 1.3? http://forums.xamarin.com/discussion/comment/74194#Comment_74194

    Wednesday, October 29, 2014 7:41 AM
  • User40009 posted

    @JKay? Don't give on that MVVM star just yet!

    Xamarin-Forms-Labs has a simple example of a Bindable Picker.

    It's partially inefficient and doesn't follow along with a true binding, but you could take that code and flush it out into something more applied if you'd like. At any rate, I'm still in favor of doing a custom control that exposes bindings and getting that MVVM star :)

    Ryan

    Wednesday, October 29, 2014 3:22 PM
  • User49731 posted

    @JasonASmith? - Looking forward to 1.3 but couple of key things I believe are worth considering to fix/include ...

    Firstly I know there's been hints about ListView context menu as answer to the request for LongTap and/or Swipe gesture availability .. whilst I'm sure most people are asking for LongTap (in addition to already available Tab) gesture in ListView (and elsewhere too!) for using for context menus I'm sure also there's other uses people could/would want it for and hence I think it might be a mistake to provide just a context menu facility without also allowing access to LongTap and/or Swipe gesture itself. If you provide the gesture(s) (as with Tap gesture) then everybody's happy as though wanting to use for context menu can and those with other uses can also us it .. if it's just context menu then it's limited. Also whilst I appreciate that iOS general uses a Swipe rather than LongTap the api provides for LongTap and there's plenty of apps out that use that on iOS so again, rather than only allowing LongTap on Android/WP and Swipe on iOS if you provide both on all then people can do what they need/want and either stick to Swipe only in iOS or use LongTap .. personally I want my app to work the same way on all platforms so I'd use LongTap.

    Secondly, there's still no way to determine when using NaviagtionPage and Content Page(s) when a Page is being dismissed/closed by Back button (hard or soft) due to the mis-sequence between platforms of the NaviationPage.Popped event as detailed here :

    https://forums.xamarin.com/discussion/comment/84500

    Whilst it is possible in WP by catching Page being popped in NavigationPage.Popped and then in Page's OnDisappearing comparing "This" to captured Page to tell if it's being closed (rather than hidden by another Page being pushed, an ActionMenu hiding it or even a PickList field popping up a list which also invokes the Page's OnDisappearing) this can't be done in Android or iOS as the NaviagtionPage.Popped event occurs AFTER the Page's OnDisappearing event which seems wrong to me.

    Apart from the sequence of events being totally different between the platforms which in itself must be wrong surely (?) if this was consistent and matched the sequence in WP then it'd be possible .. even if this meant introducing say a NavigationPage.Popping(Page beginpopped) pre-event always occurring first before any OnDisappearing/onAppearing a d then followed by a .Popped event afterwards perhaps?

    Unless I'm missing something obvious (?), there's no other way to tell in a Page's OnDisappearing whether it's due to Back button or action or for any other reason causing it to be hidden (rather than closed) and hence no way to ensure clean up operations which is what I need for example.

    So hope these two points make sense (?!?!? ;)) and any thoughts much appreciated!

    Derek

    Wednesday, October 29, 2014 4:30 PM
  • User5087 posted

    @EricGrover: That's correct. But shouldn't there be some time to inform the users? A small list, what they want to do in 1.3 and what not? And a short timeline, so that we could see, if we expect 1.3 final for end of 2014 or end of 2015?

    I think they doing a good job with Xamarin.Forms, but I'm a little bit disappointed about their public relations work. I either love programing, but there should be some time for informing the users.

    Friday, October 31, 2014 7:38 AM
  • User65389 posted

    +1 to Charlenni.

    Friday, October 31, 2014 8:35 AM
  • User25841 posted

    Completely get the pressure and workload the Xamarin guys must be under.... and my opinion is that they are doing a phenomenal job and that we should support where we can.

    However, I must agree that a more regular update would be SO SO SO useful... as developers I imagine we are all (trying to?) planning our releases as well and I seem to be living in hope at the moment. I can completely understand that the guys most probably need a break and completely get the reticence to rush out updates.... but then some clues now and then would just help to allay the fears for those of us that are hugely invested in Forms and also stop me from checking the forums every 5m in hope??

    Anyway, really has been a while... holding thumbs for some news soon.

    Either way, once again, hats off to the Xamarin.Forms team... keep up the good work.

    Friday, October 31, 2014 4:14 PM
  • User62982 posted

    @JKay My team has just released a toolkit library that includes a bindable Picker; we're using it in several of our projects, and it allows us to keep our views/viewmodels cleanly separated. I hope that'll help you get that star!

    Friday, October 31, 2014 5:00 PM
  • User33 posted

    Picker items data binding? That should be an easy one.

    Planned, but not for 1.3.

    Do you plan to take advantage of GridLayout, CardView and RecyclerView(in ListViews) from v7 support library?

    We do intend to switch to RecyclerView for our ListViews in the future.

    What about Material themes? Are these supported?

    Not currently, we intend to have basic support for this in 1.3.

    Guys, i have problem removing page from stack. And i have not time to wait final release of 1.3. What to do? Can i use it at all? Because i read that on 1.3 have included this functionality but after final maybe it could not be added there. Advice me please...

    The currently preview release of 1.3 does not include this functionality, no.

    @DerekPapworth? given a compelling use case, it's still possible that we'll add long tap in the future, but we feel that context actions hits the majority of demand in a significantly better manner, so it's the priority for the moment. Once 1.3 final is out, we can revisit for a feature release.

    Friday, October 31, 2014 5:13 PM
  • User49731 posted

    Hi Eric,

    Far enough on the context action front .. although still think lots of people would value longtap gesture in general :) .. guess I'll have to stick to my customer renderer solution for a while sigh :)

    More importantly though, any feedback on the Navigation sequence mismatch in Android and iOS (ok in WP) as in both platforms with the OnPopped event coming after the OnDisappearing of the page being popped there's no way to tell on a page (in OnDisappearing) if it's being popped or just that say a dropdown field is showing it's selection etc., .. this (to me at least and I suspect others?) is pretty vital when wanting to do some/any work when a page is "closing"?

    Thanks and echo the keep up the good work sentiment, .Forms is becoming a vital part of Xamarin so hope you guys working on it are getting the internal spotlight a lot! :)

    Derek

    Friday, October 31, 2014 5:37 PM
  • User2773 posted
    internal class Toolbar
    internal class ToolbarItemEventArgs
    

    @ermau Toolbar classes are internal. Will you allow to create custom renderers for them? Currently, I cannot add icon font support for toolbar items.

    BTW: Why so many useful classes are internal only?

    Friday, October 31, 2014 5:54 PM
  • User33 posted

    More importantly though, any feedback on the Navigation sequence mismatch in Android and iOS (ok in WP) as in both platforms [..]

    I didn't respond to that bit because I don't know the answer, I will bring it up internally and get an answer.

    @ermau Toolbar classes are internal. Will you allow to create custom renderers for them? Currently, I cannot add icon font support for toolbar items.

    Those classes aren't what you think they are ;) Toolbars in general are... tricky.

    BTW: Why so many useful classes are internal only?

    When a class gets opened, generally speaking we're locked into whatever API is there, especially in the core. A lot of the classes that are internally simply aren't ready for public consumption. They might be horrible to use, not properly support extension, or what have you. We'd rather take the time to polish things up before we open them to avoid breaking things in the future and to avoid questions on how to use something that might not have been asked with a better API. Good API design takes a significant amount of time, so we have to balance things.

    Friday, October 31, 2014 6:14 PM
  • User2773 posted

    @ermau?

    Those classes aren't what you think they are ;) Toolbars in general are... tricky.

    Can you explain it? I do only need to change font of toolbar elements. I am 99% sure that it would work.

                            Button button = new Button(base.Context);
                            button.Text = child.Name;
                        // HAVE TO SET FONT HERE - why might that not work?
                            button.SetBackgroundColor(new Color(0, 0, 0, 0).ToAndroid());
                            button.Click += delegate(object sender, EventArgs e)
                            {
                                child.Activate();
                            };
                            child2 = button;
    

    I cannot override any ToolbarRenderer methods when those classes are internal. Why might that not work? ;)

    Friday, October 31, 2014 6:50 PM
  • User74263 posted

    @ermau If they are at least partially useful and there's no alternative to using them, you should make them public and slap an [Obsolete("experimental: may change at any time")] attribute on them.

    Saturday, November 1, 2014 9:06 AM
  • User112 posted

    I see what's Xamarin's concern about that. Once they open the Pandora box a lot of people would nag about breaking changes loudly. Perhaps not you or me but I am certain there will be noise. That said an open source version would be very welcome but that's another topic.

    Saturday, November 1, 2014 11:55 AM
  • User75581 posted

    i agree make it open source is better for xamarin forms. now it is too many buggy problem or slow performance for a release app. or you will receive a lot of bad comment on your app and company.

    Sunday, November 2, 2014 2:34 AM
  • User65404 posted

    Seems that SelectedItem on ListView in v1.3 isn't working. Should I be reporting this anywhere?

    Sunday, November 2, 2014 6:06 PM
  • User40009 posted

    @mattwhetton? I looked real quick on BugZilla and didn't see anything.. but you might want to be more specific with your explanation of the bug.

    What doesn't work? and on what system, iOS or Android or Both?

    Is it when you click on it it doesn't trigger the event? that the ListView.SelectedItemProperty is always null?

    In my brief use of 1.3 so far, I have used ListView and I didn't notice anything wrong but I might not be using it the same as you.

    Ryan

    Sunday, November 2, 2014 6:38 PM
  • User74263 posted

    @mattwhetton If you are using Android with ViewCells, they are broken due to https://bugzilla.xamarin.com/show_bug.cgi?id=24029

    Sunday, November 2, 2014 8:47 PM
  • User40009 posted

    @LucaB? That's very interesting.... I've noticed on Andriod if you put a tap gesture listener on something BEHIND another view on an AbsoluteLayout it clicks through unless you add a touch listener to prevent that but on iOS it works as I'd expect.. maybe this is why.

    Ryan

    Sunday, November 2, 2014 8:55 PM
  • User65404 posted

    Thanks @RyanHatfield? and @LucaB?

    I am using view cells so this does sound like my issue.

    Noted about more detail - was more wondering where the correct place to report these types of issue is, given that 1.3 is not released.

    Sunday, November 2, 2014 9:57 PM
  • User40009 posted

    @mattwhetton? I'd certainly ask here first, but there is a bugzilla queue for version version 1.3.0

    Monday, November 3, 2014 2:59 AM
  • User3466 posted

    @mattwhetton? as Ryan said, just file a bug with some repro code and steps and select Forms 1.3.0

    Monday, November 3, 2014 3:29 AM
  • User2773 posted

    @JasonASmith? @ermau Is there a lack of helper class to set FontSize as NamedSize (double vs enum) or am I missing something?

    Monday, November 3, 2014 7:41 PM
  • User3466 posted

    @DanielL? I brought this up earlier. This is how it looks to work to me, but was waiting for confirmation:

    LabelMain.FontSize = Device.GetNamedSize(NamedSize.Large, LabelMain);
    
    Monday, November 3, 2014 11:36 PM
  • User1004 posted

    @DanielL, @MitchMilam: yes, that's correct, and in this pre-release, it's the only way.

    The next pre-release version will come with a XAML TypeConverter for it

    <Label FontSize="Large" />
    

    Note that in 1.3, you're encouraged to use Styles, and instead of setting a Large FontSize, you'll probably use the (system-defined) TitleStyle style.

    Label.Style = Device.TitleStyle;
    

    or, using a different syntax, but for the same result:

    Label.SetDynamicResource (Label.StyleProperty, "TitleStyle");
    

    or, in XAML

    <Label Style="{DynamicResource TitleStyle}" />
    
    Tuesday, November 4, 2014 8:45 AM
  • User2773 posted

    @MitchMilam? @StephaneDelcroix? Thanks for info!

    Is there any more detailed information about using styles in XF 1.3?

    Tuesday, November 4, 2014 9:08 AM
  • User3466 posted

    @DanielL? take a look at this demo for some info on basic styles.

    Tuesday, November 4, 2014 2:50 PM
  • User65389 posted

    @MitchMilam?:
    Thanks for the link...
    But.. where are the styles defined...?
    E.G.
    Style = Device.Styles.BodyStyle
    (where is the style "BodyStyle" defined?)

    Tuesday, November 4, 2014 4:29 PM
  • User38938 posted

    The setters of each of the predefined styles are defined by the individual platforms.

    Tuesday, November 4, 2014 4:37 PM
  • User65389 posted

    ... and who "predefines" where the styles..?
    Are the styles pre-defined out-oft the box (XF) and/or are the developers able to change it and add own styles?

    Tuesday, November 4, 2014 4:50 PM
  • User74223 posted

    @DanielL - I have written a small tutorial/demonstration in XAML here: d-loader.dk/using-styles-in-xamarin-forms

    Tuesday, November 4, 2014 4:50 PM
  • User2773 posted

    @MitchMilam? @D-loader? Thanks for the info. The details I wanted to know are (similar to @FredyWenger? question) :

    Device.Styles - What are the values/styles of those styles for each platform? Are they created from platform specific guidelines or something different? Do they only change basic things like colors, font sizes, etc?

    Style - Can we add custom properties for use with custom renderers?

    Tuesday, November 4, 2014 5:06 PM
  • User65389 posted

    and... can the styles also be used (and defined) directly in code (without XAML) and for all platforms (including WP)...?

    Tuesday, November 4, 2014 5:11 PM
  • User49731 posted

    @ermau? - Hi Eric, did you get any internal answer re. the Popping event sequence issue cross-platform mentioned earlier in this thread?

    I've not had any Xamarin feedback on this issue from the original thread (https://forums.xamarin.com/discussion/comment/84500) or since and it's pretty critical I feel so be good to know it'll be sorted in 1.3 hopefully.

    Thanks!

    Tuesday, November 4, 2014 5:42 PM
  • User4713 posted

    Hey. Struggling with a crash when instantiating my App class on a Windows phone emulator. This appeared seemingly out of the blue, can't understand what I did to get this problem. It seems to crash in the DeserializeProperties function in the Application constructor, but I haven't even gotten close to using properties at all yet.

    Any help will be appreciated.

    A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in System.Runtime.Serialization.ni.dll

    Additional information: Expecting element 'ArrayOfKeyValueOfstringanyType' from namespace 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'.. Encountered 'None' with name '', namespace ''.

    Tuesday, November 4, 2014 6:14 PM
  • User4713 posted

    You know, sometimes I wonder how I managed to end up as a developer.

    I had asked Visual Studio to stop on all exceptions. Talk about being an idiot.

    Please disregard my post.

    Tuesday, November 4, 2014 6:23 PM
  • User1004 posted

    @DanielL if your custom control uses BindableProperties, yes, you can set them using a Style Setter

    Tuesday, November 4, 2014 7:21 PM
  • User33 posted

    Device.Styles - What are the values/styles of those styles for each platform? Are they created from platform specific guidelines or something different? Do they only change basic things like colors, font sizes, etc?

    We pull the values from the platforms from the closest available representation. For iOS that means reading the Dynamic Type values (and, because you can use DynamicResource, updating them when the user changes that setting.) For Windows Phone, we read the platform provided styles. For Android, we read values from the current theme.

    Wednesday, November 5, 2014 7:50 PM
  • User68480 posted

    @RobertAlMalak.0363 Did you ever find out how to change the root page?

    This also goes to anyone who knows the answer.

    I'm trying to dig through the code, and there are a few obsolete tags I'm wading through (Android only):

    1. Activity is changed to FormsApplicationActivity. Ok, I'll go with that. I don't know the ramifications, but moving on...

    2. When I go to use SetPage, it gives me that it's marked with the obsolete attribute: "Please use protected LoadApplication(Application app) instead". Huh? So, in order to set the page, I have to load an application? If I go to the FormsApplicationActivity.LoadApplication method in Xamarin Studio (F12 on the method):

    protected void LoadApplication(Application app) { this.application = app; Application.Current = this.application; this.application.SendStart(); this.application.PropertyChanged += new PropertyChangedEventHandler(this.AppOnPropertyChanged); this.SetMainPage(); }

    How do I call this method instead of SetPage? Is it the SetMainPage method that is easily changing the root page? If this is related to restarting a new activity similar to http://forums.xamarin.com/discussion/comment/81153? So does changing the root page equate to restarting my app?

    I'd go on with my investigations here, but this thread seems already overloaded as it is and I'm just looking for a (hopefully) simple example ;) My appetite was whetted when it was mentioned in the first post on the 1.3 release that it would be easy to change the root page! So....how I do dat?

    Thursday, November 6, 2014 6:02 PM
  • User79035 posted

    Hi all, The folloing is not working by me, is this a bug?

    You can not change the App.MainPage if it is a Navigation Page with only a root child with another NavigationPage on Android.

    Scenario: NavigationPage(new LoginPage) and change it after successful login to NavigationPage(new DashboardPage) In this case the Navigation works, but the View is not rendered? The same works if I got 2 or more Pages in the NavigationPage.

    The only solution that I got is to render my Login View without NavigationPage, but i would, it is nicer. greets

    Tuesday, November 11, 2014 8:41 AM
  • User790 posted

    I am very late to this thread. Where can I get the bits for 1.3? The original post link appears to just be an image.

    Tuesday, November 11, 2014 11:34 AM
  • User112 posted

    @CarlBarton? See top thread (Xamarin.Forms Pre-release 1)

    Tuesday, November 11, 2014 2:51 PM
  • User790 posted

    Thanks, I saw the zip image but apparently did not cursor the link inside.

    Tuesday, November 11, 2014 2:53 PM
  • User1798 posted

    I've just started experimenting with Xamarin.Forms for use with new screens in an existing application, starting with our Android app.

    Using version 1.2.3 I'm able to call..

    Forms.Init(this, bundle); SetPage(Page); // Where Page is a property

    ..in the OnCreate for the activity I want to use.

    On trying 1.3 pre-release however, I'm running into the issue that it throws an exception when I try to open the activity a second time. The exception says the application can only be loaded once, which given the new api makes sense. This is however a blocker on me using it in our existing application. I cannot rewrite it to use entirely Xamarin.Forms, so need a way to bind the Page to the Activity in OnCreate that can be repeated.

    As an aside, I wasn't able to work out how to call LoadApplication and then how to set the page - is there some sample code somewhere?

    Thursday, November 20, 2014 11:13 AM
  • User2773 posted

    @JustinCaldicott?

    App class

        public class App : Application
        {
            public App()
            {
                MainPage = PagesFactory.GetNavigation();  //here create your instance of main page
            }
    
            protected override void OnResume()
            {
                base.OnResume();
            }
    
            protected override void OnSleep()
            {
                base.OnSleep();
            }
    
            protected override void OnStart()
            {
                base.OnStart();
            }
        }
    

    Android MainActivity:

    public class MainActivity : FormsApplicationActivity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
    }
    
    Thursday, November 20, 2014 12:49 PM
  • User1798 posted

    Thanks Daniel.

    How would this work if you wanted to integrate Xamarin.Forms with an existing application? I'd like to use Xamarin.Forms for new pages, and gradually replace older ones as we make changes to them. Our MainActivity (and many others in the stack) uses standard Xamarin.Android and we need to open activities that use Xamarin.Forms.

    Thursday, November 20, 2014 1:36 PM
  • User2773 posted

    I didn't use it in such scenario... but did you see it? https://github.com/xamarin/xamarin-forms-samples/tree/master/Native2Forms

    It's the "old way" (XF < 1.3, but it should be similar).

    Thursday, November 20, 2014 2:05 PM
  • User1798 posted

    Thanks Daniel,

    That's the way I had it, but that approach throws an exception the second time you open the Xamarin.Forms based activity, when using 1.3.

    Maybe 1.3 is designed to work all-or-nothing? The presence of an Application class with a MainPage property in the API certainly gives me that impression. That would surely be a limiter on the adoption of Xamarin.Forms though?

    Thursday, November 20, 2014 10:08 PM
  • User78799 posted

    I tried to install pre- from nuget but it failed and then it couldn't rollbak and now I don't have any xamarin forms installed :-(

    Installing 'Xamarin.Forms 1.3.0.6275-pre1'. Successfully installed 'Xamarin.Forms 1.3.0.6275-pre1'. Updating 'Xamarin.Forms' to version '1.3.0.6275-pre1' in project XXXXXX. Removing 'Xamarin.Forms 1.2.3.6257' from XXXXXX. Successfully removed 'Xamarin.Forms 1.2.3.6257' from XXXXXX. Adding 'Xamarin.Forms 1.3.0.6275-pre1' to XXXXXX. Install failed. Rolling back... Could not install package 'Xamarin.Forms 1.2.3.6257'. You are trying to install this package into a project that targets 'portable-net45+win+wp80+Xamarin.iOS10+MonoAndroid10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

    Thursday, November 27, 2014 8:08 PM
  • User78799 posted

    I found the solution: http://kb.xamarin.com/customer/portal/articles/1772629-you-are-trying-to-install-this-package-into-a-project-that-targets-xamarin-ios10

    Thursday, November 27, 2014 8:39 PM
  • User78799 posted

    Cannot run the app:

    "Could not load type 'CreateDefaultValueDelegate`2'."

    " at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)\n at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:537 "

    MS on Could not load type error:

    Visual Studio attempted to wire up an event-handling method and could not find one or more parameter types for the method. This is usually caused by a missing reference.

    So are there some other assembly to reference?

    Thursday, November 27, 2014 8:53 PM
  • User78799 posted

    Well I had not added the new version to the iOS project...

    Thursday, November 27, 2014 8:59 PM
  • User63505 posted

    I just updated my app to the latest pre-release build "1.3.0.6280-pre2" & I'm having a few weird problems on my Nexus 10 relating to the MasterDetailPage.

    1) If I open up the navigation drawer using the action bar I cannot close it with swipe gestures. (If I open it with a swipe gesture it will close just fine with a swipe.)

    2) The "Master.Icon" for the control shifts significantly to the left after setting new Detail content. This isn't an issue seen on initial load. Only after I set new detail content through use of the drawer. When the app first opens it is positioned correctly.

    3) Occasionally opening the drawer will shift all of my detail content to the right so that none of it is hidden when the drawer is open. This doesn't happen all of the time. I'm less concerned about this one for the time for the time being because I can't say with certainty that this isn't an issue on my end. I just thought I'd mention it in case anyone else ran into it.

    I also have a Nexus 4 & 7 I test with and I couldn't reproduce any of these issues on those 2 devices. I only encountered the issues on my Nexus 10. All 3 of my Nexus devices are running 5.0 Lollipop. My app is targeted for 4.4 KitKat.

    I do like the updated width of the drawer. It's no longer consuming my entire screen on the tablets.

    Thursday, December 11, 2014 2:35 AM
  • User2773 posted

    MasterDetailPage.MasterBehavior : Used to control how the MasterDetailPage renderers the split view between the Master and Detail. Allowed values are:

    public enum MasterBehavior
    {
        SplitOnLandscape,
        Split,
        Popover,
        SplitOnPortrait
    }
    

    Did you check it?

    Thursday, December 11, 2014 1:02 PM
  • User63505 posted

    Thanks for the tip. Setting the behavior to Popover fixed all 3 of those issues.

    Sunday, December 14, 2014 9:00 PM
  • User4609 posted

    I have been testing the new Persistent Properties [Xamarin.Forms.Application.Current.Properties] and cant seem to make it persist past the life of the application. Is there a missing commit function?
    If I do this... Xamarin.Forms.Application.Current.Properties["IpAddress"] = "1.2.3.4"; It is persistent for the life of the application. When the application is restarted the property "IpAddress" and its value are gone.

    Saturday, January 3, 2015 2:00 PM
  • User79767 posted

    The LoadApplication function call seems to be blocking (on Android at least), do we need to trigger the call in a background thread so it lets the UI thread continue? Even though I doubt this would be the case but otherwise it seems to make cause the application to become unresponsive...

    Tuesday, January 6, 2015 12:56 PM
  • User61409 posted

    I am programmatically setting the SelectedItem of a ListView (ListView.SelectedItem = ViewModel.Items[0]). In 1.2, this worked great. In 1.3 iOS, the row gets selected but the visual feedback (row highlight) isn't working anymore. Works fine in Android. Thanks!

    Wednesday, January 7, 2015 10:51 PM
  • User65389 posted

    @MortenAuneLyrstad:

    Have you ever solved your problem?

    Hey. Struggling with a crash when instantiating my App class on a Windows phone emulator. This appeared seemingly out of the blue, can't understand what I did to get this problem. It seems to crash in the DeserializeProperties function in the Application constructor, but I haven't even gotten close to using properties at all yet.

    Any help will be appreciated.

    A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in System.Runtime.Serialization.ni.dll Additional information: Expecting element 'ArrayOfKeyValueOfstringanyType' from namespace 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'.. Encountered 'None' with name '', namespace ''.

    If yes, how...?

    I have a similar problem (not exactly the same, but similar) at it also don't go away after update to 1.3.1.
    Thanks for a reply.

    Thursday, January 15, 2015 1:29 PM
  • User43808 posted

    @NikolayZashev I'm having exactly the same problem. Have you found a solution yet?

    Hi all. Making AppDelegate inherit from FormsApplicationDelegate is a nice step, but why is the Window private and how could I get Access to it? My issue is - I got a solution, taken from samples and examples for composing an Email with MFMailComposeViewController. It worked fine, becouse it used this var rootController = ((AppDelegate)(UIApplication.SharedApplication.Delegate)).Window.RootViewController.PresentViewController(mailer, true, null); Now it's private and could not be found. This also is not working UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(mailer, true, null);

    I need access to the Window, or how can I get Access to the RootViewController ??

    By the way nice work!! greets

    Monday, March 16, 2015 9:20 AM
  • User79035 posted

    @kaolick Hi, no, i don't. I just removed this feature from App :/ Unfortunately, but I think with some release it will be fixed. I hope untill the next time I need it ^^

    Monday, March 16, 2015 10:26 AM
  • User43808 posted

    @NikolayZashev I finally got it working with your 2nd line (totally didn't see it before). This is what I'm doing (btw. in my App-class I have a public event SendEmail).

        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();
    
            LoadApplication(new App());
    
            (Xamarin.Forms.Application.Current as App).SendEmail += SendEmailWithPNG;
    
            return base.FinishedLaunching(uiApplication, launchOptions);
        }
    
        void SendEmailWithPNG()
        {
            if (MFMailComposeViewController.CanSendMail) {
                Console.WriteLine("Can send email");
                var exporter = new PNGExporter();
                var mailer = new MFMailComposeViewController();
                mailer.SetToRecipients(new string[]{ "abc@xyz.com" });
                mailer.SetSubject("PNG");
                mailer.SetMessageBody("Sent from iOS", false);
                mailer.AddAttachmentData(exporter.CreateImage("Hello, PNG").AsPNG(), "image/png", "test.png");
                mailer.Finished += (sender, args) => {
                    Console.WriteLine(args.Result);
                    BeginInvokeOnMainThread(() => args.Controller.DismissViewController(true, null));
                };
    
                UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(mailer, true, null);
            } else {
                Console.WriteLine("Cannot send email");
            }
        }
    
    Monday, March 16, 2015 11:54 AM