Example #1
0
 public TaskPreviewGridView()
 {
     Appearance.Row.Font = FontResources.GetSegoeUIFont(4);
     OptionsSelection.EnableAppearanceHideSelection = false;
     OptionsView.AutoCalcPreviewLineCount           = true;
     OptionsView.EnableAppearanceEvenRow            = true;
     OptionsView.ShowGroupPanel      = false;
     OptionsView.ShowHorizontalLines = DevExpress.Utils.DefaultBoolean.False;
     OptionsView.ShowIndicator       = false;
     OptionsView.ShowPreview         = true;
     OptionsView.ShowVerticalLines   = DevExpress.Utils.DefaultBoolean.False;
     PreviewIndent      = 0;
     this.RowCellStyle += (s, e) => {
         e.Appearance.Font = FontResources.GetFont(e.Appearance.Font.FontFamily.Name, rowFontSize, e.Appearance.Font.Style);
         if (e.RowHandle == FocusedRowHandle && GridControl.Focused)
         {
             e.Appearance.BackColor = PaintAppearance.FocusedRow.BackColor;
         }
     };
     this.CustomDrawRowPreview += (s, e) => {
         if (e.RowHandle == FocusedRowHandle && GridControl.Focused)
         {
             e.Appearance.BackColor = PaintAppearance.FocusedRow.BackColor;
             e.Appearance.ForeColor = PaintAppearance.FocusedRow.ForeColor;
         }
     };
 }
Example #2
0
 void UpdateAppearance()
 {
     foreach (LabelControl lc in labels)
     {
         bool isSelected = EditValue.Equals(lc.Tag);
         lc.Font = FontResources.GetFont(lc.Font.FontFamily.Name, 10.25f, isSelected ? FontStyle.Bold : FontStyle.Regular);
         lc.Appearance.ForeColor = isSelected ? ColorHelper.QuestionColor : Color.Empty;
     }
 }
Example #3
0
 public void SetViewFontSize(float rowFontSize, float previewFontSize)
 {
     if (previewFontSize > 0)
     {
         Appearance.Preview.Font = FontResources.GetSegoeUIFont(previewFontSize);
     }
     if (rowFontSize > 0)
     {
         this.rowFontSize   += rowFontSize;
         Appearance.Row.Font = FontResources.GetSegoeUIFont(4);
     }
 }
Example #4
0
        public static void Apply(XtraTreeList.TreeList treeList)
        {
            treeList.BackColor = System.Drawing.Color.Transparent;
            treeList.Appearance.Empty.BackColor            = System.Drawing.Color.Transparent;
            treeList.Appearance.Empty.Options.UseBackColor = true;
            treeList.Appearance.Row.BackColor            = System.Drawing.Color.Transparent;
            treeList.Appearance.Row.Options.UseBackColor = true;
            treeList.LookAndFeel.StyleChanged           += LookAndFeel_StyleChanged;
            //
            var font = FontResources.GetSegoeUIFont(System.Drawing.FontStyle.Bold);

            treeList.Appearance.FocusedRow.Font                  = font;
            treeList.Appearance.FocusedRow.Options.UseFont       = true;
            treeList.Appearance.HideSelectionRow.Font            = font;
            treeList.Appearance.HideSelectionRow.Options.UseFont = true;
            treeList.Appearance.SelectedRow.Font                 = font;
            treeList.Appearance.SelectedRow.Options.UseFont      = true;
        }