Beta 12.6 of C#/XAML for HTML5 released (20+ bug fixes)

JS-Support @Userware
Site Admin
Posts: 920
Joined: Tue Apr 08, 2014 3:42 pm

Beta 12.6 of C#/XAML for HTML5 released (20+ bug fixes)

Postby JS-Support @Userware » Wed Nov 22, 2017 10:49 am

Dear CSHTML5 users,

We are pleased to inform you that the Beta 12.6 of C#/XAML for HTML5 - the extension for Visual Studio that lets you build cross-platform HTML5 apps in standard C# and XAML - is available for download!


DOWNLOAD:
CSharpXamlForHtml5_v1_0_public_beta12_6.zip
(25.61 MiB) Downloaded 98 times

Learn More about C#/XAML for HTML5.


Here is what's new (since Beta 12.5):
This build contains many bug fixes. Please report any outstanding issues to support@cshtml5.com
  • Added "BitmapSource.SetSource(string dataUrl)" to load a bitmap from a "DataURL". This is particularly useful when used in conjunction with the FileOpenDialog extension which now also supports loading images as DataURL
  • Fixed the new WCF stack when the TimeZone was negative
  • The DataContractSerializer now correctly ignores properties that are not in the XML being deserialized
  • Ability to change DataGrid.SelectionMode on the fly
  • DataGridCells now correctly limit the display size of their content
  • TextBlock text no longer overflows outside of the TextBlock
  • Fixed Enum.TryParse
  • Fixed DataGrid left margin when SelectionMode==DataGridSelectionMode.Single
  • Fixed the Setter of Selector.SelectedValue (for example ComboBox.SelectedValue)
  • Fixed PasswordBox.Password property binding and PasswordChanged event.
  • Fixed implementation of GetHashCode and Equals for Tuple<...>
  • Fixed multiple issues related to ArcSegment
  • Fixed ToolTip issue where replacing a tooltip with another did not refresh the open tooltip
  • Fixed an issue where the TabControl did not refresh properly when adding/removing TabItems
  • Worked around an issue that prevented the XmlReader from working in browsers
  • Fixed an issue with the serialization of DateTime when the TimeZone was a negative 1 digit hour
  • Fixed an issue where the selection did not appear correctly when ItemsControl.ItemsPanelTemplate was set (for example in ListBox)
  • Fixed an issue with the "Interop.ExecuteJavaScript" method where passing a URL (or another type that overrides the "ToString" method) did not result in quotes being added to the javascript code to call.
  • Temporarily disabled support for ArrayList due to outstanding issues
  • Reverted the change about the WebSocket class: we recommend you to use the WebSocket Extension

Note: with the new WCF stack recently introduced, you can now remove the [XmlSerializerFormat] attribute that is located in the service class (on the server-side) (and don't forget to "update the service reference" in the CSHTML5 app) and benefit from faster application loading, faster WCF, smaller WCF-related output code, and improved compatibility.[/list]

Here is a small sample WCF project to test the new WCF stack:
TestCshtml5WCF_for_CSHTML5_Beta12_2.zip
(65.96 KiB) Downloaded 54 times



We are also working on many other features and we will release them as soon as they are ready.


You may also be interested to read:


Notes about installation:
  • Before installing this update, it is recommended that you close all the open instances of Visual Studio.
  • If for some reason you need to revert to the previous Beta, simply uninstall this one (from the Control Panel) and reinstall the previous Beta.


We hope you will enjoy this build! If you find any issues, please post them on the forums or send an email to support@cshtml5.com

Thank you.
Regards,
JS-Support

Nick
Posts: 47
Joined: Tue May 30, 2017 9:44 am
Contact:

Re: New Beta 12.6 released! [Download] (20+ bug fixes)

Postby Nick » Wed Nov 22, 2017 6:35 pm

"Temporarily disabled support for ArrayList due to outstanding issues" - for medium projects/solutions this is a "death point". Personally, I can't use this new version, must to instal previous version

JS-Support @Userware
Site Admin
Posts: 920
Joined: Tue Apr 08, 2014 3:42 pm

Re: New Beta 12.6 released! [Download] (20+ bug fixes)

Postby JS-Support @Userware » Thu Nov 23, 2017 12:38 am

Nick wrote:"Temporarily disabled support for ArrayList due to outstanding issues" - for medium projects/solutions this is a "death point". Personally, I can't use this new version, must to instal previous version

Hi Nick,
Were you able to successfully use ArrayList with the previous version? As discussed in the following topic, ArrayList is not supposed to work at all, no matter the version of CSHTML5:
http://forums.cshtml5.com/viewtopic.php?f=5&t=8181
Could you please post a code snippet containing ArrayList that works with the previous version of CSHTML5?
Thanks a lot.
Regards,
JS-Support

Nick
Posts: 47
Joined: Tue May 30, 2017 9:44 am
Contact:

Re: New Beta 12.6 released! [Download] (20+ bug fixes)

Postby Nick » Thu Nov 23, 2017 9:01 am

1) Install version 2.6, my app dosen't compile.
2) Revert to version 2.5. My app compile again

3) My sample code test for ArrayList and List

Work in simulator,
Dosen't work on browser:
- Console is empty
- Broser:

Unhandled exception at file:///C:/Users/Lautas/Documents/visual%20studio%202017/Projects/AppTest2/AppTest2/bin/Debug/Output/index.html line 4:
Unable to get property 'I167$MoveNext$void=32' of undefined or null reference ("this is all about this error")
More details can be found in the JavaScript Console output. ("No messages")

On version 2.6 on my app at compile I get some errors that say that the ArrayList is not implemented, but this compile errors do not appear on 2.5 version

Note:
Use Windows 10 with the latest updates, Visual Studio 2017 Ver 15.4.4, .NET Framework 4.7.02046


using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace AppTest2
{
public partial class MainPage : Page
{
private ArrayList a = new ArrayList();
private List<string> l = new List<string>();
public MainPage()
{
this.InitializeComponent();

Test();
}

private void Test()
{
a.Add("aa1"); l.Add("ll1");
a.Add("aa2"); l.Add("ll2");
a.Add("aa3"); l.Add("ll3");
foreach (var item in this.a)
{
Console.WriteLine(item);
}
foreach (var item in this.l)
{
Console.WriteLine(item);
}
var c = a.ToArray();
var d = l.ToArray();
}
}
}

sebas
Posts: 21
Joined: Fri Oct 27, 2017 7:03 am

Re: New Beta 12.6 released! [Download] (20+ bug fixes)

Postby sebas » Fri Nov 24, 2017 6:59 am

JsonConvert ....
Severity Code Description Project File Line Suppression State
Error The method "ArrayList..ctor" is not yet supported. You can see the list of supported methods at: http://www.cshtml5.com/links/what-is-supported.aspx - You can learn how to implement missing methods at: http://www.cshtml5.com/mscorlib.aspx - For assistance, please send an email to: support@cshtml5.com (Error location: "JsonConvert.ConvertCSharpNestedDictionariesAndListsToCSharpObject" in assembly "")


joaofig
Posts: 9
Joined: Sat Oct 28, 2017 6:32 am

Re: New Beta 12.6 released! [Download] (20+ bug fixes)

Postby joaofig » Sat Nov 25, 2017 5:16 am

I have dropped all JSON converters altogether and started using a more muscular approach. To decode a JSON string I use interop to call JSON.parse and retrieve a reference to the resulting JavaScript object as a C# object. All the manipulations are done from here using more interop calls like "$0[$1]" to retrieve a property from an object.

Things get a bit tougher when you have self-referenced JSON objects like the ones generated by NewtonSoft's converter. These use extra tags ("$id" and "$ref") for self-referential purposes. To get this type of objects fully decoded, you need to parse all the object tree looking for the "$id" tags and store the corresponding objects on a map (a JavaScript Array). Something like this:

Code: Select all

"use strict";

document.jsonGetRefMap = function (js) {
    var map = new Array();

    function isObject(x) {
        return x === Object(x);
    }

    function parseRef(js, map) {
        var p;
        var i;

        if (js === null) {
            return;
        }

        if (js.hasOwnProperty("$id")) {
            map[js["$id"]] = js;
        }

        for (p in js) {
            if (Array.isArray(js[p])) {
                for (i = 0; i < js[p].length; i++) {
                    if (isObject(js[p][i])) {
                        parseRef(js[p][i], map);
                    }
                }
            }
            else if (isObject(js[p])) {
                parseRef(js[p], map);
            }
        }
    }

    parseRef(js, map);
    return map;
}

This function takes a decoded JSON object and returns the map of all the referenced objects (the ones with a "$id" property). When reading an object that only has a "$ref" property, you can cross-reference the original object from the map. Note that this function does not decode arrays of arrays, but that is left as an exercise for the reader.

It's a bit of work, but you get the best of both worlds: the almost-native performance and the C# safety.

JS-Support @Userware
Site Admin
Posts: 920
Joined: Tue Apr 08, 2014 3:42 pm

Re: New Beta 12.6 released! [Download] (20+ bug fixes)

Postby JS-Support @Userware » Tue Nov 28, 2017 4:42 am

Nick wrote:"Temporarily disabled support for ArrayList due to outstanding issues" - for medium projects/solutions this is a "death point". Personally, I can't use this new version, must to instal previous version


We have fixed ArrayList in Beta 12.7, which will be available in a few days.
Thanks.
Regards,
JS-Support

TaterJuice
Posts: 112
Joined: Thu Mar 16, 2017 5:40 am
Contact:

Re: Beta 12.6 of C#/XAML for HTML5 released (20+ bug fixes)

Postby TaterJuice » Wed Nov 29, 2017 1:44 pm

SOOO excited to try this! I've been waiting on several of these fixes for some time now. ArcSegment, PasswordBox, Item-selection with ItemsPanelTemplate.

THANK YOU! Thank you so much!


Return to “Pre-Releases, Downloads and Announcements”

Who is online

Users browsing this forum: No registered users and 2 guests

 

 

cron