This control is used to access default video player from the operating system, using this control we can play different type of video formats and audio formats, while working with video brush we have to decide playing source in the media element control, we have to refer media element control reference in the video brush. Example:- open new silver light Application Go to XAML code In the grid tag <grid X:name = “Layout Root” Background = “white”> <Media element X: Name = “M1” source = “d:/advit.wmv” opacity = “0”> </Media Element> <path X:name = “p1” Height = “300” width = “300” stroke = “Red” stroke thickness = “10”> <path.data> <Rectangle Geometry Rect = “10, 10, 200, 200”> <I rectangle Geometry> </path. Data> <path.Fill> <video brush source name = “m1”> </video brush> </path. Fill> </path> </grid>
The path control is used to create work space for defining collection of geometries, path.Data tag using for defining one geometry. Rectangle geometry tag used to define rectangle geometry. Rect property used to decide rectangle geometry size, this property takes four parameters
Open new silverlight application Add button control on the grid layout Go to button click event Private void button click (object sender, routed E.Vent Args e) { Rectangle r = new rectangle (); r.Hieght = 200; r.width = 200; Radial gradient brush b = new radial gradient brush (); Gradient stop g1 = new gradient stop(); G1. Offset = .2; G1.color = cdors. Red;
gradient stop g2 = new gradient stop(); g2. Offset = .4; g2. Color = colors. Green;
gradient stop g3 = new gradient stop(); g3. Color = colors. Blue; b.gradient stops . add (g3); r.fill = b; Layout Root. Children. Add (r);
You liked the article?
Like : 0
Vote for difficulty
Current difficulty (Avg): Medium
1/15
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.
Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox