We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using your controls in C++/CX project?

Thread ID:

Created:

Updated:

Platform:

Replies:

126343 Oct 9,2016 05:23 PM UTC Jan 16,2017 04:51 AM UTC UWP 37
loading
Tags: SfChart
Jim Young
Asked On October 9, 2016 05:23 PM UTC

Is it possible to use you UWP controls in a C++/CX project? I downloaded and installed the UWP controls and they were added to the VS toolbox but in my C++/CX project the controls are greyed out and disabled for use.

Mariappan S [Syncfusion]
Replied On October 10, 2016 12:41 PM UTC

Hi Jim,

Our UWP controls can be run in C++ by using Windows Runtime Component. In this you need add our control in Windows Runtime Component and refer this in C++ project. Please refer below link for more details.

Link: https://msdn.microsoft.com/en-us/library/windows/apps/mt609005.aspx?f=255&MSPPError=-2147217396

We have also prepared simple sample with our SfTabControl by referring below link.

Link: https://social.msdn.microsoft.com/Forums/en-US/8a286a01-0861-4e87-9f81-4657760f890e/uwpregarding-c-support-for-c-uwp-controls?forum=wpdevelop 

Please download the sample from the following link.

Sample link: SfTabControlSample

Regards, 
Mariappan S. 


Mariappan S [Syncfusion]
Replied On October 10, 2016 04:07 PM UTC

Hi Jim 

We have prepared KB article for “How to use Syncfusion UWP controls in C++ projects”. Please refer the below KB article for more details. 

Regards, 
Mariappan S. 


Sniper
Replied On October 12, 2016 08:55 AM UTC

How to Passing data to a Windows Runtime Component?


Victory Jessie Selvam D [Syncfusion]
Replied On October 17, 2016 06:56 AM UTC

Hi Sniper,

We have prepared a sample to select tab items dynamically by passing data through property to Windows Runtime Component. In the sample, we have created a CLR property SelectedHeader in the UserControl class which recieves header from C++ project and selects the corresponding item in SfTabControl. You can download the sample from following link:

Sample: TabControl_Selection_Change

Please explain us the requirement with more details if we have misunderstood your query.

Regards,
Jessie

Sniper
Replied On October 24, 2016 02:46 AM UTC

Thank you Jessie Selvam D
I mean When I use C++/CX to call the Windows runtime component, how do I pass the value to the runtime component.

Victory Jessie Selvam D [Syncfusion]
Replied On October 24, 2016 12:57 PM UTC

Hi Snipper,

You need to create a CLR property in the Windows Runtime component and pass value from C++ project to the run time component using this property. Already we have provided a sample using SfTabControl in our last update. In the sample, we have passed header value from C++ project to the runtime component using SelectedHeader property.

Please let us know more details about your requirement if we have misunderstood your query.

Regards,
Jessie

Sniper
Replied On November 10, 2016 07:28 AM UTC

Is the Sample?

Sniper
Replied On November 10, 2016 07:29 AM UTC


Victory Jessie Selvam D [Syncfusion]
Replied On November 10, 2016 11:49 AM UTC

Hi Sniper,

Yes, it was the sample provided by us to demonstrate "how to pass arguments to Windows Runtime Component from a C++ project". Also the code example for setting property value in C++ is given below.

Code example:

// tabControlView - Instance of TabControlView class in Windows Runtime component 
// SelectedHeader – CLR Property in TabControlView class 
 
tabControlView->SelectedHeader = (String^)button->Content; 

Regards,
Jessie

Sniper
Replied On November 11, 2016 09:38 AM UTC

Thank you Regards,Jessie.  I'will try Pass Vector to the Runtime Component.

Victory Jessie Selvam D [Syncfusion]
Replied On November 14, 2016 06:28 AM UTC

Hi Sniper,

Please let us know if you need any further assistance.

Regards,
Jessie


Sniper
Replied On November 15, 2016 03:58 AM UTC

Hi!
Regards,Jessie  how do I pass the vector or object data to the runtime component.  please give me a demo with pass the vector or object data to the runtime component. 

Victory Jessie Selvam D [Syncfusion]
Replied On November 16, 2016 11:43 AM UTC

Hi Sniper,

We can pass vector value from C++ project to Windows Runtime Component by creating a IList<T> property in the wrapper class. Code example and sample for setting vector value in C++ are given below.

Code Example

C++
Vector
<int>^ vector = ref new Vector<int>(); 
vector->Append(5); 
vector->Append(2); 
sortedListView->UnSortedList = vector;// sortedListView - instance of the wrapper class 
 
Windows Runtime Component 
private IList<int> unSortedList = new List<int>(); 
public IList<int> UnSortedList 
{ 
   get { return unSortedList; } 
   set { unSortedList = value; 
         RaisePropertyChanged("UnSortedList");} 
} 

Sample
Passing_Vector_to_WRC

Reference links
https://msdn.microsoft.com/en-IN/library/hh441569.aspx#Collections and arrays  
https://msdn.microsoft.com/en-in/library/hh700103.aspx

Regards,
Jessie

Sniper
Replied On November 21, 2016 01:58 AM UTC

Hi! Regards,Jessie  
use the (C++/CX ) call the  SyncfusionControls C# runtime component is a bit slow,  the program always  use 1s to loading the C# runtime component

Victory Jessie Selvam D [Syncfusion]
Replied On November 21, 2016 10:13 AM UTC

Hi Sniper,

We suggest you to use assemblies instead of "Syncfusion controls for UWP XAML" package so that CLR does not load unnecessary modules, which may take longer time on start up. You can find assemblies in the following folder location:

Assembly location:
[Installed drive]:\Program Files (x86)\Syncfusion\Essential Studio\<$version>\Assemblies for Universal Windows\10.0

We have compared the loading time of 100 instances of TextBox control and 100 instances of SfTextBoxExt control, it seems to take equal amount of time for both the controls from our side. Please let us know the Syncfusion control which you are using, so that we can check and provide a solution.

Regards,
Jessie

Sniper
Replied On November 23, 2016 03:14 AM UTC

Hi! Regards,Jessie  
Thanks for your reply
I use (C++/CX) call the C# runtime component is my own package with the Syncfusion Charts.  
     

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On November 23, 2016 12:25 PM UTC

Hi Sniper, 
  
Thanks for your update. 
  
We are unable to reproduce the problem (bit slow while loading the control) at our end while loading SfChart. We have prepared the sample based on this and it can be downloaded from below link, 
  
Sample: ChartRuntime 
  
If you are still able to reproduce the reported problem, please revert us by modifying the sample. It would be helpful for us to serve you better. 
  
Regards, 
Devi 




Sniper
Replied On November 24, 2016 07:33 AM UTC

Hi!Jessie  

Thanks for your reply

I have update the package to reproduce the reported problem.  run the program, click the MainPage ShowButton, use 1s to loading the C# runtime component


Attachment: ChartRuntime_37d6fd95.7z

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On November 25, 2016 12:38 PM UTC

Hi Sniper, 
  
Thanks for your update. 
  
We would like to inform you that, when we load the chart in UI, it takes little bit time to render the chart in UI for first time. Once chart gets rendered in UI, then it will not take time to navigate the page. We have modified the provided sample based on this and it can be downloaded from below link, 
  
Sample: ChartRuntime 
  
Regards, 
Devi 




Sniper
Replied On November 26, 2016 03:32 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

I recorded a video for this ChartRuntime Program,  run this program, first load the chart in UI use three seconds.  the kind of scene to  impact the user's experience 

Attachment: bandicam_20161126_112311506_f26aa866.7z

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On November 28, 2016 01:39 PM UTC

Hi Sniper, 
  
Thanks for your update. 
  
As we informed earlier, in UWP, when we load chart dynamically ,it will take some time to render chart elements (like series elements, gridlines, axis label etc.,) in UI at its first time. Once, the chart gets rendered, it will not take next loading time while navigating between the pages. 
  
Regards, 
Devi 


Sniper
Replied On November 29, 2016 11:23 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

I had a problem yesterday. when I deploy the UWP project to mobile phone, the Syncfusion charts is not show.

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 1, 2016 02:49 PM UTC

Hi Sniper, 
  
Thanks for your update. 
  
We have analyzed the reported problem and unable to reproduce the reported problem at our end. We prepared the sample and output image in below location. 
  
Sample: RuntimeSample  
  
If you are still able to reproduce the reported problem, please revert us by modifying provided sample. It would be helpful for us to serve you better. 
  
Regards, 
Devi 


Sniper
Replied On December 5, 2016 10:40 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

I have a problem with program design.  now I want pass value to runtime component in the viewmodel.  before running C++/CX program call C# runtime component, the control  assign value in  MainPage.xaml.cpp.  

Thank you!


Attachment: UseCSRuntime_2882cb35.7z

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 6, 2016 12:58 PM UTC

Hi Sniper, 
  
Thanks for your reply. 
  
We have analyzed the provided sample. As per user sample, you have created a new UserControl in MainPageViewModel and have added the property values (Demand and Year2010) to its ItemsSource. So it does not reflect on the second chart’s items source(UserControl2). Now we have modified the sample based on your requirement and it can be downloaded from below link, 
  
Sample: UseCSRuntime  
  
Regards, 
Devi 





Sniper
Replied On December 7, 2016 02:11 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

I want  create a  new UserControl in the MainPageViewModel and added the property values (Demand and Year2010) to its ItemsSource , because my program need to do  .  so what am I to do in my program?  

Thank you 

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 8, 2016 01:16 PM UTC

Hi Sniper, 
  
Thanks for your reply. 
  
We have achieved your requirement by passing the user control in view model constructor. Since your new user control is not added in visual tree (main window), we have passed the user control(UserControl2), which has already been added in the visual tree. We have modified the demo sample based on your requirement and it can be downloaded from below link, 
  
Sample: UseCSRuntime 
  
Regards, 
Devi  


Sniper
Replied On December 8, 2016 03:55 PM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

Yesterday. I call the runtime component Syncfusion sfchart control  with Different values, but the sfchart control not change, it just show the first initialise value. 

Thank you

Attachment: UseCSRuntime_a2f51f7e.7z

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 9, 2016 12:27 PM UTC

Hi Sniper, 

  

Thanks for you update. 

  

We are able to dynamically update the ItemsSource of UserControl by defining the ObservableCollection rather than using List collection. Because, we are able to update(modify) the item collection with the CollectionChanged event of ObservableCollection. 

We have modified the provided sample and it can be downloaded from below link, 

  

Sample: UseCSRuntimeModified 

  

Regards, 

Devi 

  


Sniper
Replied On December 15, 2016 01:41 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

I have a problem with my project.  Just about C++/CX, Has nothing to do with Syncfusion.  I pass value to property of class  in createtask, use the property value outside the class, the property value is not  change,  but  the property value  change  in  button click event. 

Please help 

Thanks


Attachment: CreateTask_800bda26.7z

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 15, 2016 02:08 PM UTC

Hi Sniper, 
  
Thanks for your update. 
  
In the provided sample, the corresponding property value (N.To String()) is not getting calculated, to call the asynchronous task .However, we are able to show the property value(N.To String()) in the dialog in the Loaded event of grid.
We have modified the demo sample and it can be downloaded from below link, 
  
Sample: CreateTask_(2) 
  
Regards, 
Devi 




Sniper
Replied On December 16, 2016 01:33 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

I want to know  why in the dialog in the Loaded event of grid the value is change, in the MainPage::MainPage() the value is not change. 

Please help 

Thanks

Sniper
Replied On December 16, 2016 05:27 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

use Grid Loaded event Solve the problem, just is Grid Show before.  if I want  to operate after Grid loading, for example when MainPage Grid is show, I click button2 the AsyncTask Class property N is not change.

please help 

Thanks


Attachment: CreateTask_5ae2e1e1.7z

Devi Aruna Maharasi Murugan [Syncfusion]
Replied On December 16, 2016 11:52 AM UTC

Hi Sniper,
 
 
As promised earlier we will provide the support only for Syncfusion product. Please let us know if you have any quires in our Syncfusion product. we will be happy to assist you.
 
 
Regards,
Devi


Sniper
Replied On January 14, 2017 07:35 AM UTC

Hi! Devi Aruna Maharasi Murugan

Thanks for your reply

My application has been completed, when I was ready to upload to the windows app store I found the package about more than and 100 MB , Syncfusion almost all controls are packaged in this application, I only use the sfchart controls, how to contain only sfchart, not containing all control.

Sniper
Replied On January 14, 2017 10:53 AM UTC

I have found it.   in the path   .....\Syncfusion\Essential Studio\14.2.0.26\Assemblies for Universal Windows\10.0

Santhiya Arulsamy [Syncfusion]
Replied On January 16, 2017 04:51 AM UTC

Hi Sniper,

Thanks for your update.

We are glad to know your problem has been solved.

Let us know if you need any further assistance on this

Thanks,
Santhiya A


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;