■ UltraGrid 클래스에서 알파 블렌딩을 설정하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
using System; using System.Drawing; using Infragistics.Win; using Infragistics.Win.UltraWinEditors; using Infragistics.Win.UltraWinGrid; private UltraGrid ultraGrid; private UltraCheckEditor ultraCheckEditor; private UltraNumericEditor ultraNumericEditor; ... #region UltraGrid 레이아웃 초기화 하기 - ultraGrid_InitializeLayout(sender, e) /// <summary> /// UltraGrid 레이아웃 초기화 하기 /// </summary> /// <param name="sender">이벤트 발생자</param> /// <param name="e">이벤트 인자</param> void ultraGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e) { e.Layout.Appearance.ImageBackground = Image.FromFile(@"c:\sunset.jpg"); } #endregion #region UltraCheckEditor 체크 값 변경시 처리하기 - ultraCheckEditor_CheckedValueChanged(sender, e) /// <summary> /// UltraCheckEditor 체크 값 변경시 처리하기 /// </summary> /// <param name="sender">이벤트 발생자</param> /// <param name="e">이벤트 인자</param> private void ultraCheckEditor_CheckedValueChanged(object sender, EventArgs e) { if(this.ultraCheckEditor.Checked == true) { this.ultraGrid.DisplayLayout.Override.RowAppearance.BackColorAlpha = Alpha.UseAlphaLevel; this.ultraGrid.DisplayLayout.Override.RowAppearance.AlphaLevel = short.Parse(this.ultraNumericEditor.Value.ToString()); } else { this.ultraGrid.DisplayLayout.Override.RowAppearance.BackColorAlpha = Alpha.Opaque; this.ultraGrid.DisplayLayout.Override.RowAppearance.AlphaLevel = 0; } } #endregion #region UltraNumericEditor 값 변경시 처리하기 - ultraNumericEditor_ValueChanged(sender, e) /// <summary> /// UltraNumericEditor 값 변경시 처리하기 /// </summary> /// <param name="sender">이벤트 발생자</param> /// <param name="e">이벤트 인자</param> private void ultraNumericEditor_ValueChanged(object sender, EventArgs e) { this.ultraGrid.DisplayLayout.Override.RowAppearance.AlphaLevel = short.Parse(this.ultraNumericEditor.Value.ToString()); } #endregion |