## GridCell.SetStyle method

تعيين النمط على الخلية . لتحسين الأداء ، قم بتنفيذ طريقة "SetStyle" ، لا تنفذ خاصية "النمط" .

```csharp
public void SetStyle(Style value)
```

| معامل | يكتب | وصف |
| --- | --- | --- |
| style | Style | النمط المراد تعيينه. |

### أمثلة

```csharp
[C#]
Style style = sheet.GetCell(0, 0).GetStyle();
style.CellLocked = true;
style.VAlignment = VerticalAlignmentType.Top;
...
sheet.GetCell(0, 0).SetStyle(style);

[Visual Basic]
Dim style As Style =  sheet.GetCell(0,0).GetStyle() 
style.CellLocked = True
style.VAlignment = VerticalAlignmentType.Top
...
sheet.GetCell(0, 0).SetStyle(style)

```

### أنظر أيضا

* class [Style](../../../aspose.cells.griddesktop/style)
* class [GridCell](../../gridcell)
* مساحة الاسم [Aspose.Cells.GridDesktop.Data](../../gridcell)
* المجسم [Aspose.Cells.GridDesktop](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.GridDesktop.dll -->
