public Style GetPopupStyle(string containerName, PopupStyleName style) { if (!string.IsNullOrEmpty(containerName)) { string resourceKey = containerName + "_" + style.ToString(); if (Resources != null && Resources.Contains(resourceKey)) return Resources[resourceKey] as Style; } if (Resources != null && Resources.Contains(style.ToString())) return Resources[style.ToString()] as Style; if(Application.Current != null && Application.Current.Resources.Contains(style.ToString())) return Application.Current.Resources[style.ToString()] as Style; return null; }
public Style GetPopupStyle(string containerName, PopupStyleName style) { if (!string.IsNullOrEmpty(containerName)) { string resourceKey = containerName + "_" + style.ToString(); if (Resources != null && Resources.Contains(resourceKey)) { return(Resources[resourceKey] as Style); } } if (Resources != null && Resources.Contains(style.ToString())) { return(Resources[style.ToString()] as Style); } if (Application.Current != null && Application.Current.Resources.Contains(style.ToString())) { return(Application.Current.Resources[style.ToString()] as Style); } return(null); }