BY Akash Kava12 Sep 2021 Edit
Minor Version 1.6.246 Update

We are happy to announce following new features in this release Version 1.6.245.

Method Overloads Added

Method overloads for InvokeFunction, CreateNewInstance and InvokeMethod in IJSValue are added to reduce array allocation. There is no change in exiting APIs, they will continue to work as it is. C# compiler will automatically choose the method with same parameters instead of creating an array. However, internal implementation will allocate an array for parameter, but we have managed to reduce the array allocation by 50%.

New Type JSDelegate

We have added new Type JSDelegate which creates a typed delegate for JavaScript function. So you can easily assign JavaScript function as delegates. Example explained in next section.

TextToModel Delegate in AtomChips

We have added TextToModel property of type Func<string, object> which will be used by the control to convert entered text into any object model. If it is null, entered text will be added to SelectedItems array.

   <WA.AtomChips
           selectedItems={Bind.oneWay(() => this.viewModel.selectedItems)}
           textToModel={(text) => ({ label: text, value: 0 })}>
           ...

In example above, entered text will be set as label, and object literal will be added to selectedItems.

New Control - AtomExpander

We have added new AtomExpander control, which has following properties.

  1. IsExpanded - This is controlled by the drop down arrow, however, you can also bind it and update it from the code. If it is true, the details will be visible.
  2. Icon - ImageSource of an Image that will be be displayed on the left corner.
  3. Detail - You can set any View as child of Detail property, it will be hidden and it will be visible only when IsExpanded is set true.
  4. DetailTemplate - Instead setting detail, you can set this property as XF.DataTemplate and a new detail will only be created if control is in expanded state. As soon as control is collapsed, detail View will be destroyed.

New Control - AtomChoiceView

We have added new AtomChoiceView control, which is same as AtomXFComboBox but it is written in C#. It has following properties.

  1. ItemsSource - list of items to be displayed in popup, choices will be displayed even if it is empty.
  2. SearchEnabled - a text editor will be displayed as soon as the control is tapped, you can use Search property to filter your items source.
  3. DropDownHeight - height of the popup, default is 200
  4. Prompt - a selection message displayed if SelectedItem is null
  5. EmptyItemTemplate - Prompt that will be displayed if SelectedItem is null , Prompt will be ignored and this template will be displayed as Prompt.
  6. ItemTemplate - item template for the choices and selected item.
  7. SelectionStartCommand - it will be executed when the choice popup was opened.
  8. SelectionEndCommand - it will be executed when the choice popup was cancelled or closed.
  9. Search - the text that is entered in search box if SearchEnabled was set to true, you can use this to filter your items source.
BY Akash Kava
LikeCommentSave
LikeCommentSaveShare
0

POPULAR POSTS
17 Mar 2021
LATEST ACTIVITY
srikanth.naidu
liked this post.
malli
saved this post.
Show more
ARCHIVES
2021
2020
2019
2018
TAGS
javascript (41)
developer (25)
javascriptdeveloper (15)
coding (10)
Xamarin.Forms (10)
webatoms (8)
arrays (7)
xamarin (7)
android (6)
typescript (6)
function (5)
csharp (4)
iOS (4)
methods (4)
object (4)
update (4)
web-atoms (4)
arrayoperation (3)
decorators (3)
programming (3)
prototype (3)




Web Atoms: JSX (TSX + TypeScript) for Xamarin.Forms, Hot Reload Your App in Production Environment

PlaygroundSamples Repository