Workaround: create the ThemableColor this way SetBordersCommandParameter bordersParam = new SetBordersCommandParameter(); System.Drawing.Color color = Color.Blue; System.Windows.Media.Color mediaColor = System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B); bordersParam.BorderColor = new ThemableColor(mediaColor);
We can now use ColorHelper class to provide an easier way to create border colours out of the System.Drawing.Color. ColorHelper class that has methods for DColorToMColor, DrawingToThemableColor, MColorToDColor and ThemableToDrawingColor Example of using the ColorHelper class to set a colour: SetBordersCommandParameter bordersParam = new SetBordersCommandParameter(); bordersParam.OutsideBordersStyle = CellBorderStyle.Thin; bordersParam.BorderColor = ColorHelper.DrawingToThemableColor(System.Drawing.Color.Blue);