Xamarin.Forms 1.3.0 Pre-release 1

TheRealJasonSmithTheRealJasonSmith Jason SmithUSXamarin Team Xamurai
edited November 2014 in Xamarin.Forms

Important notes:

  • Generators for XAML pages should to be updated to use the new tool MSBuild:UpdateDesignTimeXaml instead of MSBuild:Compile
  • Grid default is now *
  • While this release does technically ship a Xamarin.iOS Unified API version of Xamarin.Forms, due to bugs in the Unified API it probably wont work unless you are running alpha channel.

Features and enhancements

  • Styles support Behaviors and Triggers
  • DataTrigger and MultiTrigger added
  • VisualElement.IsFocused is now a BindableProperty
  • Bindings are culture unaware
  • iOS Unified Project support
  • Use * as default grid size
  • StaticResource searches in Application.Current.Resources too
  • Add NavigationPage.HasBackButton
  • Fix Fuchsia spelling, Obsolete the old spelling
  • TypeConverter on FontSize
  • SearchBar.CancelButtonColor (currently only supported on iOS)
  • ListView context actions
  • [Xaml] various Xamlg changes
  • [Xaml] Convert Trigger.Value on applying the trigger
  • [Xaml] Short property names allowed on Style setters
  • [iOS] reuse renderers
  • [iOS] use UiAlertController on iOS8
  • [Android] rename WebRenderer to WebViewRenderer

Bug fixes

EDIT- Release is now on nuget pre-release

«134

Posts

  • voidvoid Tim A. DKBeta ✭✭✭
    edited November 2014

    Yes!

  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭

    Nice... Testing!

  • KevinFordKevinFord Kevin Ford USUniversity, Certified XTC Partners ✭✭✭

    @JasonASmith‌,
    Thanks, the unified API support will be very useful.

  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭

    @JasonASmith‌ Was something changed in setting ListView's ViewCell height on Android? Height of cells with HasUnevenRows property set to true were automatically adjusted to content size in Pre0 and prior. Now, they're not. Is it by design? It was very useful. I know, that on iOS, height of cells have to be adjusted manually but... http://xamarin.uservoice.com/forums/258559-xamarin-forms-suggestions/suggestions/6205412-make-it-possible-to-set-listview-cell-s-height-to#comments

  • nadjibnadjib Nadjib Bait DZMember ✭✭✭✭
    edited November 2014

    hmmm ListView with Custom ViewCell doesnt fire ItemSelected and ItemTapped events in Android! I just updated XF, didn't touch my code, so I presume it's a bug in XF? ListViews are simply unusable !

    Update:
    Answer from @DanielL‌

  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭
  • nadjibnadjib Nadjib Bait DZMember ✭✭✭✭
    edited November 2014

    @DanielL‌ Thanks a lot Daniel, this resolved the problem... but a ViewCell children should always allow click through and it works in Windows Phone without adding InputTransparent = true

  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭

    @NadjibB‌ I think it's a bug. I didn't fill any bugzilla entry about this, I hope It'll get fixed.

  • nadjibnadjib Nadjib Bait DZMember ✭✭✭✭

    Same problem with a Custom Control I created (an image gallery based on StackLayout)... I set all its children InputTransparent = true, even the control itself, and it doesn't fire Tap Gesture... (the actual image in the gallery is itself a relative layout with bunch of controls inside, I all made them to InputTransparent = true)... WIndows Phone works normally

  • nadjibnadjib Nadjib Bait DZMember ✭✭✭✭
    edited November 2014

    @DanielL‌ if it is a bug, it's a serious one! not being able to... tap! my Android app is unusable with this bug.

    Thanks.

  • nadjibnadjib Nadjib Bait DZMember ✭✭✭✭
    edited November 2014

    I think I found the problem... it's occurring in nested controls.

    If you set InputTransparent = false in the parent control, only the parent will capture the Tap event, the tap doesn't get propagated to children.

    If you set it to True, its children also will become transparent to taps too...

    So tapping is litteraly broken with nested controls!

  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    Yep fix is in a branch, waiting review. Somehow I managed to not prioritize that for the pre1 release... Once you guys pointed it out I immediately realized the error and made sure the fix was in. Before uploading to nuget.org I will update the package with the fix.

  • nadjibnadjib Nadjib Bait DZMember ✭✭✭✭

    @JasonASmith‌ Thanks! we'll be shipping our app in a week or so, I hope we'll get the fix until then so we can update XF (we're annoyed with Android ListView's ViewCell first image bug in 1.2 and we want to update before we ship)

  • DH_HA1DH_HA1 Darren Haligas USMember ✭✭✭

    @JasonASmith‌ is the attached package the latest?

  • DH_HA1DH_HA1 Darren Haligas USMember ✭✭✭

    @JasonASmith‌ it appears i have lost the background Color on my iOS Buttons. Where there any changes made there?

  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    I am investigating this right now (after updates finish, cant even confirm yet)

  • DH_HA1DH_HA1 Darren Haligas USMember ✭✭✭

    Yep I can confirm that the backgroundcolor is not applied to the Button using both the BackgroundColor property and styles

    <ContentPage.Resources> <ResourceDictionary> <Style x:Key="BlueBtn" TargetType="Button"> <Setter Property="Button.TextColor" Value="Blue" /> <Setter Property="Button.BackgroundColor" Value="Red" /> <Setter Property="Button.FontSize" Value="30" /> </Style> </ResourceDictionary> </ContentPage.Resources> <ContentPage.Content> <StackLayout> <Button BackgroundColor="Aqua" x:Name="Btn" Text="test" Style="{StaticResource BlueBtn}"> </Button>

  • DH_HA1DH_HA1 Darren Haligas USMember ✭✭✭
    edited November 2014

    if i create a custom renderer and set the background color I can get it to work

    [assembly: ExportRenderer (typeof(Button), typeof(ExtendedButtonRenderer))]
    namespace sandbox.iOS
    {
        public class ExtendedButtonRenderer : ButtonRenderer
        {
            public ExtendedButtonRenderer ()
            {
    
            }
    
            protected override void OnElementChanged (ElementChangedEventArgs<Button> e)
            {
                base.OnElementChanged (e);
                this.Control.BackgroundColor = e.NewElement.BackgroundColor.ToUIColor ();
            }
        }
    }
    
  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    We found the issue. Certain changes for re-use resulted in the need to change the way the base class handled initialization of the Control. We forgot to update this base class, resulting in the BackgroundColor and IsEnabled property not working on initialization.

  • FredyWengerFredyWenger Fredy Wenger CHInsider ✭✭✭✭✭

    @DanielL:
    Do I understand you right - HasUnevenRows now also don't work in Android (where it has worked before), instead that it works now also in iOS?
    If yes - this is a killer for me...

    @JasonASmith‌:
    Are the follwing issues to Android solved:
    - Show false image in ListView (randomly) (we had contact to this issue)..?
    - ListView not scrollable in a ScrollView..?
    - If a StackLayout contains a ScrollView with another Stacklayout (that has to be scrollable), the (scrollable) StackLayout can be scrolled over the first (fix) Stacklayout (the second StackLayout then overlaps the first StackLayout) ..?
    When is planned to put the new version to nuget...?

    Thanks for a feedback.

  • DH_HA1DH_HA1 Darren Haligas USMember ✭✭✭
    edited November 2014

    @JasonASmith‌ excellent glad to help test it out. I will post more findings here if there are more.

    Will you be updating the package above today with the fixes?

  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭

    @FredyWenger‌ Yes, pre0 was fine, but pre1 doesn't automatically set ViewCell height to content size. I have to investigate it more, it could also be a padding issue. This change is also problematic for me... I can't understand why setting heigh manually is required. It should work automatically from beginning.

  • DerekPapworth.4183DerekPapworth.4183 Derek Papworth GBMember ✭✭

    @JasonASmith‌ - Hi Jason, excuse me copying/pasting part of my post on the tech preview thread of 1.3 but really could do with feedback on this issue (from there and original thread) as pretty critical I think ..

    " ...
    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.

    Any/all thoughts much appreciated!

    Thanks Derek

  • DerekPapworth.4183DerekPapworth.4183 Derek Papworth GBMember ✭✭

    p.s. Any brief/draft/basic documentation of new features and how to use etc. .. i.e. DataTrigger and MultiTrigger, Listview context menu, etc?

  • MihaMarkicMihaMarkic Miha Markic SI ✭✭✭✭

    FYI Jason mentioned reworking of Navigation for 1.3., hopefully it is still on track.

  • DirkWeltzDirkWeltz Dirk Weltz DEMember ✭✭✭

    I'm a little bit confused by the name of the thread. It would be good to have a 1.3.0 before the Pre-1 :)

    @JasonASmith: I'm confused about the things. I thought, all new things are in the 1.3.0 Preview and all Pre versions are only for bug finding. But now it seams, that each Pre brings new features. Is this correct? See we the working progress of the team with this Pre versions?

    You said some weeks ago, that you want to make a list or timeline, what we could expect in the next weeks and month. That would be helpfull for not doing things twice.

  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    @Charlenni‌ the reason we called the first release the Technology Preview is because the new features were things we were looking for feedback on. Pre1 is feature complete (minus the Navigation back stack modifcation). We try not to add new features after a pre-release. Unfortunately due to other constraints the navigation work was not able to land in time for pre1.

  • MAZMAZ Matthias Zimmermann CHMember ✭✭

    I'm experiencing Android Linker errors (Release) after update to this release:

    error MSB4018: The "LinkAssemblies" task failed unexpectedly. error MSB4018: Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Xamarin.Forms.BindableProperty Xamarin.Forms.BindableProperty::Create(System.Linq.Expressions.Expression`1<System.Func`2<!!0,!!1>>,!!1,Xamarin.Forms.BindingMode,Xamarin.Forms.BindableProperty/ValidateValueDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangedDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangingDelegate`1<!!1>,Xamarin.Forms.BindableProperty/CoerceValueDelegate`1<!!1>)' (defined in 'Xamarin.Forms.Labs, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Labs, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Xamarin.Forms.BindableProperty Xamarin.Forms.BindableProperty::Create(System.Linq.Expressions.Expression`1<System.Func`2<!!0,!!1>>,!!1,Xamarin.Forms.BindingMode,Xamarin.Forms.BindableProperty/ValidateValueDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangedDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangingDelegate`1<!!1>,Xamarin.Forms.BindableProperty/CoerceValueDelegate`1<!!1>) error MSB4018: at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) error MSB4018: at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) error MSB4018: at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessQueue() error MSB4018: at Mono.Linker.Steps.MarkStep.Process() error MSB4018: at Mono.Linker.Steps.MarkStep.Process(LinkContext context) error MSB4018: at Mono.Linker.Pipeline.Process(LinkContext context) error MSB4018: at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context) error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute() error MSB4018: --- End of inner exception stack trace --- error MSB4018: at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args) error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute() error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()

  • EricSinkEricSink Eric Sink USMember ✭✭

    Change request:

    Make Element.LogicalChildren protected instead of internal.

    Rationale:

    I would like to see the notion of "superview/subview" be fully separated from the layout stuff. And it's almost there.

    In other words, I want the ability to create a subclass of View which can have child views and keep track of them itself. This is almost possible, but not quite. Child views never get a renderer assigned to them.

    The reason why is that the VisualElementPackager.Load() uses LogicalChildren. In other words, Element.LogicalChildren appears to be the way that a View initially communicates to the renderer framework that it has child views.

    (It looks like I could work around this by adding all my child views after the renderer has been assigned to my superview. LogicalChildren is for the initial Load, but OnChildAdded() and OnChildRemoved() are used to keep things up to date thereafter, and these are protected, so I can call them from my subclass. So I think if I call them late enough, then child views will get renderers assigned. But if I could override LogicalChildren in my subclass then this delay tactic would not be necessary.)

    As a proof of concept, I used Mono.Cecil to hack Xamarin.Forms.Core.dll and change Element.LogicalChildren from internal to protected. Then I was able to override it in my subclass. Everything worked very nicely. I've tested the result on iOS and Android.

    Bottom line: The ability to have non-layout View subclasses with child views would open up a lot of capabilities. It's an easy change to make (if you ignore whatever ramifications and risks and slippery slope issues I can't see). And hopefully the idea of allowing the simple concept of a child view to exist separate from the Layout stuff is something you consider worthwhile.

    Thanks!

    E

    BTW, here's the shameful hack:

    #r "Mono.Cecil.dll"
    
    open Mono.Cecil
    
    let a = AssemblyDefinition.ReadAssembly("Xamarin.Forms.Core.dll")
    for t in a.MainModule.Types do
        if t.FullName = "Xamarin.Forms.Element" then
            for p in t.Properties do
                if p.Name = "LogicalChildren" then
                    let m = p.GetMethod
                    m.IsAssembly <- false
                    m.IsFamily <- true
    a.Write("Better.Xamarin.Forms.Core.dll")
    
  • EricSinkEricSink Eric Sink USMember ✭✭

    Update: The workaround I mentioned above (after the renderer gets assigned then call OnChildAdded for all the children) works fine on iOS but not on Android. I'm not sure why, but I think it's because EnsureChildOrder needs to work and it uses LogicalChildren.

    Overriding LogicalChildren in my View subclass (using my shamefully hacked up X.F.Core.dll) worked fine.

    So, er, yeah.

  • LGauLGau Loïs Gaudebert USUniversity

    Can you say more about "[Android] Allow user to override ActionBar TitleBar visibility " ? I have issue with the action bar and this adhesion on the MasterDetail Condrol

  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭
    edited November 2014

    @JasonASmith‌ Can You help?

    @JasonASmith‌ Was something changed in setting ListView's ViewCell height on Android? Height of cells with HasUnevenRows property set to true were automatically adjusted to content size in Pre0 and prior. Now, they're not. Is it by design? It was very useful. I know, that on iOS, height of cells have to be adjusted manually but... http://xamarin.uservoice.com/forums/258559-xamarin-forms-suggestions/suggestions/6205412-make-it-possible-to-set-listview-cell-s-height-to#comments


    EDIT: I changed ViewCell root from Grid to StackLayout and everything is fine. Did you change something in Grid sizing/layout options in PRE1?

  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    @DanielL will check. I think it now respects a couple extra properties and reflows text.

  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    @DanielL I am unable to reproduce your issue, can you show me? I am wondering if the reflow is causing your issue.

  • DH_HA1DH_HA1 Darren Haligas USMember ✭✭✭

    @JasonASmith‌ I am getting a NRE when I am calling PopToRootAsync on a Page that has a Map on it.

        System.NullReferenceException: Object reference not set to an instance of an object
          at Xamarin.Forms.Maps.iOS.MapRenderer.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
          at MonoTouch.Foundation.NSObject.Dispose () [0x00000] in /Developer/MonoTouch/Source/maccore/src/Foundation/NSObject2.cs:127
          at Xamarin.Forms.Platform.iOS.Platform.DisposeModelAndChildrenRenderers (Xamarin.Forms.Element view) [0x00000] in <filename unknown>:0
          at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00000] in <filename unknown>:0
          at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [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.4.0.38/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.4.0.38/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
          at GladStaff.BaseViewModel+<ExecuteHomeCommand>c__async0.MoveNext () [0x00092] 
    
  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭

    @JasonASmith‌ Here it is:

        public class XamarinViewCellGridEmptySpace : ContentPage
        {
            class SampleViewModel
            {
                public string TextLong { get; set; }
    
                public string TextShort { get; set; }
            }
    
            string[] strings = {
                "Lorem ipsum dolor sit amet enim",
                "Etiam ullamcorper",
                "Suspendisse a pellentesque dui, non felis",
                "Maecenas malesuada elit lectus felis, malesuada ultricies",
                "Curabitur et ligula",
                "Ut molestie a, ultricies porta urna",
                "Vestibulum commodo volutpat a, convallis ac, laoreet enim"
            };
    
            string[] stringsShort = {
                "Lorem",
                "Etiam",
                "Suspendisse",
                "Maecenas",
                "Curabitur",
                "Ut molestie",
                "Vestibulum"
            };
    
            ObservableCollection<SampleViewModel> items = new ObservableCollection<SampleViewModel>();
    
            public XamarinViewCellGridEmptySpace()
            {
                Title = "XamarinViewCellGridEmptySpace";
    
                var customersList = new ListView
                {
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    ItemTemplate = new DataTemplate(typeof(TemplateLayout)),
                    ItemsSource = items,
                    HasUnevenRows = true,
                };
    
                Content = customersList;
    
                for (int i = 0; i < strings.Length; i++)
                {
                    items.Add(new SampleViewModel() {
                        TextLong = strings[i],
                        TextShort = stringsShort[i]
                    });
                }
            }
    
            private class TemplateLayout : ViewCell
            {
                public TemplateLayout()
                {
                    var customerName = new Label() {
                        Style = Device.Styles.TitleStyle,
                        VerticalOptions = LayoutOptions.Fill,
                        HorizontalOptions = LayoutOptions.Fill,
                        InputTransparent = true,
                    };
                    customerName.SetBinding<SampleViewModel>(Label.TextProperty, v => v.TextLong, BindingMode.OneWay);
    
                    var customerShortName = new Label() {
                        VerticalOptions = LayoutOptions.Fill,
                        HorizontalOptions = LayoutOptions.Fill,
                        InputTransparent = true,
                    };
                    customerShortName.SetBinding<SampleViewModel>(Label.TextProperty, v => v.TextShort, BindingMode.OneWay);
    
                    var customerTaxId = new Label() {
                        HorizontalOptions = LayoutOptions.End,
                        VerticalOptions = LayoutOptions.Fill,
                        InputTransparent = true,
                    };
                    customerTaxId.SetBinding<SampleViewModel>(Label.TextProperty, v => v.TextShort, BindingMode.OneWay);
    
                    var customerAddress = new Label() {
                        HorizontalOptions = LayoutOptions.Fill,
                        VerticalOptions = LayoutOptions.Fill,
                        InputTransparent = true,
                    };
                    customerAddress.SetBinding<SampleViewModel>(Label.TextProperty, v => v.TextLong, BindingMode.OneWay);
    
                    var root = new Grid() {
                        HorizontalOptions = LayoutOptions.Fill,
                        VerticalOptions = LayoutOptions.Fill,
                        InputTransparent = true,
                        RowDefinitions = 
                        {
                            new RowDefinition { Height = GridLength.Auto },
                            new RowDefinition { Height = GridLength.Auto },
                            new RowDefinition { Height = GridLength.Auto },
                        },
                        ColumnDefinitions = 
                        {
                            new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) },
                            new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) },
                        }
                        };
    
                    root.Children.Add(customerName, 0, 2, 0, 1);
                    root.Children.Add(customerShortName, 0, 1, 1, 2);
                    root.Children.Add(customerTaxId, 1, 2, 1, 2);
                    root.Children.Add(customerAddress, 0, 2, 2, 3);
    
                    View = root;
                }
            }
        }
    

    Just look at attached screenshot, really weird.

  • TheRealJasonSmithTheRealJasonSmith Jason Smith USXamarin Team Xamurai

    @DH_HA‌ confirmed thank you. Events not being unsubscribed properly in there either.

  • DH_HA1DH_HA1 Darren Haligas USMember ✭✭✭

    @JasonASmith‌ glad to help. Can we expect another pre soon? Also is there documentation / examples for ListView Context Actions?

  • DanielLDanielL Daniel Luberda PLInsider ✭✭✭✭

    @DH_HA‌ Context Actions are quite simple. At ViewCell constructor:

                    this.ContextActions.Add(new MenuItem() {
                        Text = "Delete me",
                        IsDestructive = true,
                        Command = new Command(() => {
                            Logger.Info("DELETED");
                        })
                    });
    
  • DH.7958DH.7958 DH USMember

    @DanielL‌ any way to do that in xaml?

«134
Sign In or Register to comment.