layout - Zooming in specific part of screen in WPF -


i implementing 1 small wpf application has multiple rows , multiple columns. 0th row , 0th column contains mediaelement , 1st row , 0th column contains full screen button. when user clicks on full screen button want switch gird has 2 rows , 1 column. 0th row , 0th column occupy of screen space having inside mediaelement , 1st row , 0th column show minimize button bring original ui back. in traditional windows used toggle visibility of full screen panel hosting windowsmedia player achieve behavior. how can achieve in wpf?

adding xaml code.

<window x:class="learnenglish.mainwindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         title="mainwindow"         height="350"         width="525">   <grid>     <grid.rowdefinitions>       <rowdefinition height="5*" />       <rowdefinition height="1*" />     </grid.rowdefinitions>     <grid.columndefinitions>       <columndefinition width="5*" />       <columndefinition width="2*" />       <columndefinition width="2*" />       <columndefinition width="1*" />     </grid.columndefinitions>     <mediaelement loadedbehavior="manual"                   name="me"                   source="c:\users\pritam\documents\freecorder\screen\northern ireland scene 1  learnenglish  british council.wmv"                   volume="{binding elementname=txtvolume,path=text}"                   grid.columnspan="2">      </mediaelement>      <button click="button_click"             grid.row="1"             margin="4">play</button>     <button click="button_click"             grid.row="1"             grid.column="1"             margin="4">full screen</button>     <button click="button_click"             grid.row="1"             grid.column="1"             margin="4"             visibility="hidden">restore</button>    </grid> </window> 

when user clicks on 'full screen' button want 'mediaelement' occupy of scree space ( hiding other controls ) , leaving 'restore' button in bottom-right hand side of screen.

regards, hemant

you can in xaml using togglebutton , trigger on ischecked property sets width / height of columns / rows don't want see 0. use x:name name elements want change, make easier write trigger.

in order able access controls, should define trigger on parent control contains other controls, e.g. in usercontrol, panel, datatemplate or controltemplate. in order access properties on different controls, use names targetname property on setters. there corresponding sourcename property on trigger itself, don't have define trigger on togglebutton itself.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -