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.

           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
Developer Guides
Web Atoms Updates

17 Mar 2021
Simmi Kava
commented this post.
Simmi Kava
liked this post.
Show more
javascript (56)
developer (25)
javascriptdeveloper (16)
Xamarin.Forms (16)
Html (14)
typescript (12)
webatoms (12)
xamarin (11)
coding (10)
web-atoms (10)
arrays (9)
android (8)
javascript-developer (8)
csharp (7)
dotnet (7)
css (6)
update (6)
dotnet-standard (5)
function (5)
iOS (5)
methods (4)

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

PlaygroundSamples Repository