I am starting a new web application, and wanted to use the app styling from scratch, so I copied over the master page used in the sample app, and ran the app styling add-in to transfer over the relevant style files.
It works quite well, I've started building pages and it hangs together. I can select the repeater control, select a style and it changes the entire page automatically.
Except when I attempt to use the new akido editors - If I drop a WebTextEditor onto a page, the styling functions rendered moot - the relevant calls to AppStylingManager.Settings.StyleSetName are being made, but the resulting page has the default styles applied - not the selected ones.
i can drop the old WebtextEdit control onto the page and it all works fine - but the new control is disabling something.
I am quite experienced with WinForms development, but still a neophyte with ASP.NET - what am I missing here?
Hi,
If application contains both Infragistics.WebUI and Infragistics.Web.UI controls, then there 2 AppStylingManagers because there are 2 unrelated framework dlls:Infragistics.Web.UI.Framework.AppStyling.AppStylingManagerInfragistics.WebUI.Shared.AppStyling.AppStylingManager
Both of them have identical implementations of set StyleSetName, which use HttlContent.Current to "share" same property value. Implementation is similar to below
get { if (HttpContext.Current != null) { object prop = HttpContext.Current.Items[_styleSetNameRegKey]; if (prop != null) return (string)prop; } return this._styleSetName; } set { if (HttpContext.Current != null) HttpContext.Current.Items[_styleSetNameRegKey] = value; else this._styleSetName = value; }
If that property is set dynamically and at the time there is no HttpContent.Current, then misbehavior is possible. If you change StyleSetName only for one manager, then you may try to set the other as well.
You're missing the point. App styling is working quite fine, so long as I use the static setting in web.config. I have all the paths correctly set up in web.config, along with local copies of all style data.
I copied over the styling code in the master page used in the official Samples - that puts a repeater control at the top of the page to allow the style to be selected at runtime and remembered. It's THIS code that ceased to work once I started building real web pages. I'm assuming that the sample code isn't using the right events to set AppStylingManager.Settings.StyleSetName - but what I don't understand is why it ceased to work once other infragistics (akido) controls were placed on a page?
If there is some odd dependency in the styling manager, why hasn't the sample code been updated to reflect that?
The Infragistics.Web.UI controls (Aikido) rely on presence of local to project ig_res directory, which should contain resources (css files and images) for controls. You may create that directory within your website and copy there resources used by controls. For example, create ig_res/Default and copy there ig_texteditor.css. Also add ig_res/Default/images and copy there igte_*.gif files. Similar for other controls.Easier to copy to website whole ig_res/Default/*.* content or ig_res/YourStyleName/*.*