|
ModelUtilsSetMaterialOpacity(Material, Double, Boolean, Boolean) Method |
Sets the opacity (or alpha color) of the specified material.
The material that is set as argument must not be frozen (it mush be cloned before sending to this method). Inner materials or brushes can be frozen - they will be cloned in this method when preserveFrozenMaterial is false.
Namespace: Ab3d.UtilitiesAssembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax public static void SetMaterialOpacity(
Material material,
double newOpacity,
bool setAlphaColor = true,
bool preserveFrozenMaterial = false
)
Parameters
- material Material
- material that is changed
- newOpacity Double
- new opacity value that is set to materials (1 means fully opaque - no transparency; 0 means fully transparent)
- setAlphaColor Boolean (Optional)
- when true (by default) then in SolidColorBrush the Alpha color is changed instead of Brush's Opacity.
- preserveFrozenMaterial Boolean (Optional)
- when false (false by default) then frozen materials are cloned so that their opacity can be changed; when true frozen materials are not changed
See Also