c# - How to create ComponentResourceKey via code behind? -


How can I write under the code behind the code

  & lt; Style x: key = "{Component Resource {X: Type igDP: XamDataGrid}, Greyfroyd Stella}" & gt; & Lt; Setter Property = "TextBlock.Foreground" Value = "#FF 333333" /> & Lt; / Style & gt;   

What I'm doing here.

  Apply zero RecordAreasile () {Style RecordStyle = New Style (Typef (Detectorcardia)); Recordstyle Setter Add (new setter (Detourcardcalearia background background property, selected background)); Recordstyle Setter Add (new setter (datarkcardcaleresiae.forendexettextstyleproperty, ????????)); XamGrid.FieldLayoutSettings.DataRecordCellAreaStyle = RecordStyle; } The value of the optional properties is brushed.    

For example: RecordStyle. Setter Add (New setter (Detarcord CALAri.AforandAnnettextProperty, Brush. Red));

A brush is possible You can not just use solid brushes shown in your example, you can also use a gradient brush.

Comments