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

Startup Window based on Properties.Default values - WPF

Thread ID:

Created:

Updated:

Platform:

Replies:

132586 Sep 11,2017 07:41 AM UTC Sep 27,2017 01:17 PM UTC WPF 6
loading
Tags: General
Magesh N
Asked On September 11, 2017 07:41 AM UTC

I have to open different window based on default values.Following is the code:

---------------------------------

public void ChooseNextWindowBasedOnDefaultValue()
{
if (Settings.Default["DsrType"] == null || Settings.Default["DsrType"].ToString() == "" || Settings.Default["TimeSlot"].ToString() == "")
{
ShowMainWindow();
}

else if (Settings.Default["DsrType"].ToString().ToLower() == "excel")
{
ShowLoadExcelWindow();
}

else if (Settings.Default["DsrType"].ToString().ToLower() == "texteditor")
{
ShowTextEditorWindow();
}
}

---------------------------------------

Everything works fine in my local machine. When i install the setup in others machine and tried to run, no window is starting. where it went wrong? i think i couldn't read Default values in others machine.

Keerthana Jegannathan [Syncfusion]
Replied On September 12, 2017 09:27 AM UTC

Hi Mahesh, 
 
Thank you for contacting Syncfusion support. 
 
From your update, we suspect that you are trying to load the different types of windows based on certain condition. In your code, you have checked the specific settings for condition. So can you share more details about the settings which you are used? Also, as you mentioned that your setup is not running in other machines, please share the configuration details of your local machine.  If possible also share the simple sample which replicates the issue you are facing? That will helps us to analyze and provide the solution at earliest. 
 
Regards, 
Keerthana J 


Keerthana Jegannathan [Syncfusion]
Replied On September 12, 2017 09:28 AM UTC

 Hi Mahesh,


Thank you for contacting Syncfusion support.


From your update, we suspect that you are trying to load the different types of windows based on certain condition. In your code, you have checked the specific settings for condition. So can you share more details about the settings which you are used? Also, as you mentioned that your setup is not running in other machines, please share the configuration details of your local machine. If possible also share the simple sample which replicates the issue you are facing? That will helps us to analyze and provide the solution at earliest.


Regards,

Keerthana J
 


Magesh N
Replied On September 13, 2017 08:07 AM UTC

Hi Keerthana,


What you have suspected is correct. Based on default values, different windows will load. I have attached my code for window startup(StartuWindow.cs) and MainWindow(MainWindow.cs).In MainWindow.cs,i will override the default values.


Attachment: MainWindow.xaml_(2)_97f877f.zip

Keerthana Jegannathan [Syncfusion]
Replied On September 14, 2017 12:43 PM UTC

Hi Mahesh, 
 
Thanks for your update. 
 
We have checked your reported case by creating simple sample but we were unable to reproduce the reported behavior. Please find the sample which we have checked from below location 
 
 
We suspect that Settings of your application is not properly configured in other machines , so can you please ensure whether your default settings are loaded in the machines where you installed this setup? Based on your update, we will proceed further on this. 
 
Regards, 
Keerthana J  


Magesh N
Replied On September 26, 2017 09:01 AM UTC

Hi Keerthana,

I couldn't trace the problem. The sample you gave works fine.

In my local machine, setup gets installed and when i launch my application, it shows the window based on my default parameters.

In others machine, Setup is getting installed, the problem is when i launch my application, no window is displaying in UI.

I have attached my solution and setup file(.exe of my solution) for your reference.


Attachment: SolutionAndSetup_a7fbe768.zip

Keerthana Jegannathan [Syncfusion]
Replied On September 27, 2017 01:17 PM UTC

 
Hi Mahesh, 
 
Thanks for your update. 
 
We were able to run your updated sample, but we are facing error in installing your shared setup in our machine. 
 
Regards, 
Keerthana J 


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

;