SilverScreen Solid Modeler

FromSolidBrush method

FromSolidBrush method

Previous topic Next topic  

FromSolidBrush method

Previous topic Next topic JavaScript is required for the print function  



static SS_RGB FromSolidBrush(System.Windows.Media.SolidColorBrush brush);


SolidColorBrush brush;   // A System.Windows.Media.SolidColorBrush object





using SilverSharp;


The FromSolidBrush method creates a SilverSharp.SS_RGB object from a System.Windows.Media.SolidColorBrush object.




brush is a System.Windows.Media.SolidColorBrush object



Return Value

FromSolidBrush returns a SilverSharp.SS_RGB object




This method is most useful when working with WPF applications



See Also

SS_RGB, ToSolidBrush




The following code sets SilverScreen's background color equal to the Background property of a WPF window:


C# Code for WPF


 using SilverSharp;

 using System.Windows.Media;


 . . .



 SS_RGB background = SS_RGB.FromSolidBrush(MessageBox.Background);


 SC.ss_command("paint background color {0}", background);