Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

wpf - How to make textbox resize as the window resize -


any property set make textbox resize according window size?

layout in wpf heavily influenced parent container. example, if creating form labels , input fields, consider using grid panel. controls in wpf default resize according layout behavior of parent. here example of window 2 labeled text boxes , 2 buttons resize along window.

<window>     <grid>         <grid.columndefinitions>             <columndefinition width="auto" />             <columndefinition width="*" />         </grid.columndefinitions>         <grid.rowdefinitions>             <rowdefinition height="auto" />             <rowdefinition height="auto" />             <rowdefinition height="*" />         </grid.rowdefinitions>          <label content="contact name" grid.row="0" grid.column="0" />         <textbox grid.row="0" grid.column="1" />          <label content="contact location" grid.row="1" grid.column="0" />         <textbox grid.row="1" grid.column="1" />          <stackpanel orientation="horizontal" horizontalalignment="right"                     verticalalignment="bottom" grid.row="2" grid.column="1">             <button content="ok" width="75" height="24" margin="3" />             <button content="cancel" width="75" height="24" margin="3" />         </stackpanel>      </grid> </window> 

or if wanted similar address bar layout of browser, like:

<window>     <dockpanel>         <dockpanel dockpanel.dock="top">             <button content="back" dockpanel.dock="left" />             <button content="forward" dockpanel.dock="left" />             <button content="refresh" dockpanel.dock="right" />             <textbox /> <!-- fill assumed last child -->         <dockpanel>         <statusbar dockpanel.dock="bottom" />         <webbrowser /> <!-- fill assumed last child -->     </dockpanel> </window> 

note in above example, nested 2 dockpanel's. have been achieved grid markup have been more cluttered. if new wpf, i'd highly suggest playing around various panels available you. once learn when apply particular panel particular layout, makes wpf easier work with.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -