Using the SaveSettings feature of UltraDockManager (installed from NetAdvantage_NET_20082_CLR20_Product.exe), I am able to save settings to the user.config file and recover them using LoadComponentSettings(). However, I can't load the default settings from app.config. ResetComponentSettings() blows out the user settings, but LoadComponentSettings() does nothing after the Reset. I assume that LoadComponentSettings is looking only in the user.config instead of defaulting back to app.config. Is there some other way for me to do this?
Mike.
Resetting the component settings just clears the saved data from the application settings. It does not switch to the default data so the next call to LoadComponentSettings loads default info. If you want to switch between multiple layout files, the best way would be to use the SaveAsXml or SaveAsBinary methods (and their corresponding LoadFromXml and LoadFromBinary methods). You can save one file when the application starts so you have a snapshot of the default settings. Then you can save the settings again when the application closes so you can load that after saving the default layout. To reset, just load back the default layout file.
Hi,
I want to create default layout xml using the way you mentioned above.The problem is.. layout size in xml is saved by pixel.example:<Size xsi:type="a3:Size" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/System.Drawing/System.Drawing"><width>350</width><height>521</height></Size>
The problem is: The monitor resolution of user can be different!Let say I have monitor res: 640x480 and I want a panel width 50% of my screen (which is 320 on mine). It will be saved into layout.xml as: <width>320</width>
And then, when another user open the application using big resolution monitor, my panel will seems too small.Is there another way to implement default layout setting that can be applied to multiple user with multiple monitor resolution?Thanks.
Hello,
In the following forum thread was discussed similar issue and also there is a sample where is shown how your goal could be achieved.
http://community.infragistics.com/forums/t/54533.aspx
Let me know if you have any further questions.