iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello Crosslight Support,
as you surely know Xamarin has an app building pattern called Xamarin Forms. Xamarin Forms and Crosslight are in some points very similar. So I wonder if there is any chance to use Xamarin Forms in a Crosslight solution?
These days a third party component for Xamarin Forms is available from Syncfusion. With this component one can integrate charts, gauges, on device creation of Word, Excel and PDF documents to apps created with Xamarin Forms, which is a great feature. It would be great to have this together with Crosslight. Do you see any change to have this working?
Thanks,
Thomas
Dear Thomas,
Good questions! We do not recommend building apps using Unified View pattern such as in Xamarin Forms. It has numerous drawbacks such as limited UI definitions, poor maintainability, low adaptability, and more. Read my blog post to learn more about design pattern.
Integrating third party components to Crosslight is very easy and straightforward. It also doesn't need XamarinForms. You can integrate third party components by creating binding adapter using interfaces and base classes available in Crosslight.
We'll create an example to integrate one of the Syncfusion components soon.
Hope this helps,Jimmy
Dear Jimmy,
a working example would be great. Having this would give me a deeper understanding of Crosslight and I would have a first step in integrating Syncfusions components with Crosslight.
I hope you will find some time to create this sample soon.
Thanks and keep up the good work.
public SimpleViewModel(){ this.ChartTitle = "Weather Analysis"; this.PrimaryAxisType = AxisType.Category; this.PrimaryAxisTitle = "Month"; this.SecondaryAxisType = AxisType.Numerical; this.SecondaryAxisTitle = "Temperature"; ObservableCollection<SeriesData> seriesSource = new ObservableCollection<SeriesData>(); SeriesData seriesData = new SeriesData(); seriesData.Items.Add(new DataPoint("Jan", 42)); seriesData.Items.Add(new DataPoint("Feb", 44)); seriesData.Items.Add(new DataPoint("Mar", 53)); seriesData.Items.Add(new DataPoint("Apr", 64)); seriesData.Items.Add(new DataPoint("May", 75)); seriesData.Items.Add(new DataPoint("Jun", 83)); seriesData.Items.Add(new DataPoint("Jul", 87)); seriesData.Items.Add(new DataPoint("Aug", 84)); seriesData.Items.Add(new DataPoint("Sep", 78)); seriesData.Items.Add(new DataPoint("Oct", 67)); seriesData.Items.Add(new DataPoint("Nov", 55)); seriesData.Items.Add(new DataPoint("Dec", 45)); seriesSource.Add(seriesData); this.SeriesSource = seriesSource; }
2. Still in Core project, we the binding provider as well. Here’s the snippet example code in SimpleBindingProvide.cs:
public SimpleBindingProvider() { this.AddBinding("Chart", ChartProperties.ChartTitleProperty, "ChartTitle"); this.AddBinding("Chart", ChartProperties.PrimaryAxisTypeProperty, "PrimaryAxisType"); this.AddBinding("Chart", ChartProperties.PrimaryAxisTitleProperty, "PrimaryAxisTitle"); this.AddBinding("Chart", ChartProperties.SecondaryAxisTypeProperty, "SecondaryAxisType"); this.AddBinding("Chart", ChartProperties.SecondaryAxisTitleProperty, "SecondaryAxisTitle"); SeriesBindingDescription seriesBinding = new SeriesBindingDescription() { TitleMemberPath = "Title", ItemsMemberPath = "Items", IndependentValueMemberPath = "Independent", DependentValueMemberPath = "Dependent", SeriesType = SeriesType.Column }; this.AddBinding("Chart", ChartProperties.SeriesSourceProperty, "SeriesSource"); this.AddBinding("Chart", ChartProperties.SeriesBindingDescriptionProperty, seriesBinding, true); }
3. Move to Android project, we create the object Syncfusion Chart in MainLayout.axml file. Here’s the example snippet code:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffcdcdcd"> <com.syncfusion.widget.chart.SfChart android:id="@+id/Chart1" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </FrameLayout>
4. In SimpleActivity.cs Android project, we add a couple line of code inside InitializeView(). Here’s the code:
protected override void InitializeView() { base.InitializeView(); SfChart chart = this.FindViewById<SfChart>(Resource.Id.Chart1); if (chart != null) { this.RegisterViewIdentifier("Chart", chart); } }
And here’s the result from the project: (Crosslight_Syncfusion_Chart.png)
You could get the working sample from this link:http://git.intersoftpt.com/projects/CROS-SUPP/repos/crosslight-syncfusion-sample/browseRegards,Hans K.
Hello,
thanks for the Android sample. Unfortunately, I could not get it to work in my environment.
I downloaded the sample from the given location and I added Crosslight 2 Update 5 (2_0_5000_95).
After staring the sample on a device or on the simulator I get a runtime error and the app quits.
I have installed the latest updates from Xamarin.
Attached you find the output for the error on the device and on the simulator.
I hope this helps. Any ideas welcome.
Do you have samples for iOS and WP, too?
after doing some more investigation, the situation got worse.
Most of my older apps (Android) work. New apps created with Crosslight project wizard (2_0_5000_95) don't work (Android). I get the same error as reported above. An older app which uses the googlemap component (Android) doesn't work, too.
Current installation:
Xamarin 3.7.226.0
Xamarin.Android 4.18.0.38
Xamarin.iOS 8.2.0.0
As mentoined earlier, I updated to the latest versions today. Since then I experienced the problems. But before I worked with Crosslight 2 Update 4.
I hope you have any idea what the problem might be.
-------------------------------------------------------
I found this on the Xamarin page:
ACW's. That was accidentally broken.
Workaround: Use ACW names in Layout .axml, not C# type names.
This will be fixed in 4.18.0.32.
me again (please, see the previous two entries of this post for the whole story). I just switched to an older version of my development VM.
The Syncfusion chart sample works on this machine.
So, there must definitely be a problem with the latest versions of Xamarin and/or with the latest Android SDK.
Do you have any news, ideas, solutions for this problem?
Hi Thomas,
Please try the Crosslight nightly build 96 provided in the attachment. Please make sure you clean your projectsand perform rebuild to ensure the new assemblies are referenced.
Let me know if it resolves the Android problem.
Thanks,Jimmy
Hello Jimmy,
thanks a lot for this quick fix. I followed your instructions and the sample now works in my environment. A new project created with the project wizard now works, too.
Great. This kind of support is really outstanding.
But it is the third time I ran into such an issue. My strategy so far was "always install the latest versions". I know that Crosslight has many dependencies (Xamarin, Android SDK, Java, ...) which makes it difficult. So what strategy would you suppose for installing product updates? How do you handle this at Intersoft?
Maybe you could publish a kind of requirements list with each update of Crosslight. This list says for example: Crosslight 2 Update 5 works with Xamarin iOS version "xyz" to version "qwe", Xamarin Android version "xyz" to version "qwe". It was tested with Android SDK up to version "23". Please, do not install Mac OSX Yosemite, because there are the following issues.
Just as a proposal. Maybe it would make live easier for us developers and your support.
Glad to hear that your issues are now resolved with the latest build.
We don't usually experience breaking changes with Xamarin or Android, so we didn't expect to see this issue happened. FYI, when Crosslight 2.5 is released, it works fine with the current release of Xamarin. This issue apparently occurred due to breaking changes in the latest Xamarin Android build which is released after Crosslight 2.5. So we quickly create a patch and published build 96.
We highly recommend our customers to always install and use the latest version of our products as well as the dependent platforms/products. This helps us and our customers stay ahead with the latest technologies. If youencountered issues with one of the latest updates, best chance is our team is already aware with the issue and will publish an update very soon. So, don't be afraid to install the latest stable updates.
We appreciate your feedback regarding which Xamarin versions and OS are tested in the published build. We will implement that in our next documentation update. Again, thank you for your feedback and compliment.
Best,Jimmy
today I installed the latest updates of Xamarin and I run into the same problem as 2 weeks ago.
Building my Android projects with build 96 creates lots of errors (see attached screenshot).
Switching back to build 95 solved the problem. So it seems Xamarin fixed a problem which was fixed on the Crosslight side with build 96 and both fixes don't work well together.
What is your recommendation? Is switching back to build 95 the solution or will there be a build 97?
Hello,I apologize for any inconvenience this problem may have caused you.I suggest to use build 95 for now. The developer team will investigate the issue further more.Thank you for your understanding.Regards,Hans K.
Ok. I keep on developing with build 95 until I here anything different from you or Crosslight 3 will be released.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname