public void UpdateAppearance() { if (!IsEOSCustomizationIgnored) { ControlTitle.SetTextColor(GetThemeProvider().GetEOSProperty <Color>(this, EOSConstants.NeutralColor1)); _arrowImage.Drawable.SetColorFilter(GetThemeProvider().GetEOSProperty <Color>(this, EOSConstants.NeutralColor3), PorterDuff.Mode.SrcIn); _divider.UpdateAppearance(); } }
public ControlItem() { IsExpanded = true; ClipToBounds = true; BorderBrush = Brushes.LightBlue; BorderThickness = new Thickness(1); Header = new ControlTitle(); var controlRecords = new ControlRecords(); controlRecords.SetBinding(ControlRecords.RecordsProperty, new Binding("Records")); Content = controlRecords; Loaded += ControlItemLoaded; }
protected void ComponentAdminControl(string ControlName, string UserModuleID) { bool IsSortable = true; string ctrlSrc = GetAppPath() + "/Modules/WBComponentAdmin/" + ControlName; if (Directory.Exists(Server.MapPath(ctrlSrc))) { List <ModuleControlInfo> lstModCtls = new List <ModuleControlInfo>(); string[] files = Directory.GetFiles(Server.MapPath(ctrlSrc)).Select(file => Path.GetFileName(file)).ToArray(); ctrlSrc = ctrlSrc + "/"; string[] ControlTitle; TabContainerManagePages.Visible = false; foreach (string fileName in files) { string NameOnly = Path.GetFileNameWithoutExtension(fileName); if (Path.GetExtension(fileName) == ".ascx") { ControlTitle = NameOnly.Split('-'); int len = ControlTitle.Length; if (len > 1) { NameOnly = String.Join("-", ControlTitle.Take(len - 1));//name can have dash. try { lstModCtls.Add(new ModuleControlInfo { ControlTitle = NameOnly, ControlSrc = ctrlSrc + fileName, DisplayOrder = Int32.Parse(ControlTitle.Last()) }); } catch { // having dash but not number in last IsSortable = false; lstModCtls.Add(new ModuleControlInfo { ControlTitle = NameOnly, ControlSrc = ctrlSrc + fileName }); } } else //with out dash { lstModCtls.Add(new ModuleControlInfo { ControlTitle = ControlTitle[0], ControlSrc = ctrlSrc + fileName }); IsSortable = false; } } } if (IsSortable) { lstModCtls = lstModCtls.OrderBy(o => o.DisplayOrder).ToList(); } foreach (ModuleControlInfo CtrlInfo in lstModCtls) { TabPanel tp = new TabPanel(); tp.HeaderText = CtrlInfo.ControlTitle; SageUserControl ctl = this.Page.LoadControl(CtrlInfo.ControlSrc) as SageUserControl; ctl.EnableViewState = true; ctl.SageUserModuleID = UserModuleID; tp.Controls.Add(ctl); TabContainerManagePages.Tabs.Add(tp); } TabContainerManagePages.Visible = true; } else { TabContainerManagePages.Visible = false; StringBuilder redirecPath = new StringBuilder(); redirecPath.Append(url.Scheme); redirecPath.Append("://"); redirecPath.Append(url.Authority); redirecPath.Append(PortalAPI.PageNotAccessibleURL); HttpContext.Current.Response.Redirect(redirecPath.ToString()); } }