Skip to main content

Posts

Showing posts with the label WPF Lecture By Shiva Sir

Canvas

Canvas:-   It is used to create a Container for Graphics and animation in WPF.for application software and forms elements, the canvas will not be used. it also provides multiple dimensions to arrange the element on a particular position on Window. Canvas uses Canvas.left,Canvas.Right,Canvas.Bottom and Canvas.Top property to arrange elements. <Canvas>         <Ellipse Width="100" Height="100" Fill="Aqua" Canvas.Left="100" Canvas.Top="120"></Ellipse>         <Rectangle Width="100" Height="100" Fill="Yellow" Canvas.Left="250" Canvas.Top="120"></Rectangle>     </Canvas>

DOCK PANEL in WPF

DOCK PANEL in WPF:- Dock Panel is used to arrange the child component top, left, right, and bottom. The Dock panel is best in dimension .it will automatically manage the element in left alignment. The default width and height of the Dock element is 100% <DockPanel>         <Button Height="100" Width="100" DockPanel.Dock="Left">1</Button>         <Button Height="100" Width="100" DockPanel.Dock="Right">7</Button>         <Button Height="100" Width="100" DockPanel.Dock="Top">8</Button>         <Button Height="100" Width="100" DockPanel.Dock="Bottom">2</Button>             </DockPanel>

WRAP PANEL IN WPF

WRAP PANEL IN WPF:- This panel Provide Content  Step by Step in the same row when row width will be completed then it will shift the component in new rows. Wrap panel containers mostly used to arrange data row-wise. By default UI Child Component width and height will be auto in Wrap Panel. The wrap panel also contains features for orientation, default orientation of the Wrap Panel is Horizontal and we can create change it to vertical. <WrapPanel Orientation="Vertical">         <Button Width="200" Height="30">1</Button>         <Button Width="200" Height="30">2</Button>         <Button Width="200" Height="30">3</Button>         <Button Width="200" Height="30">4</Button>         <Button Width="200" Height="30">5</Button>     </WrapPanel>

Stack Panel in WPF

Stack Panel in WPF:- It is the Container element of WPF which is used to show the record using vertical and horizontal dimensions. Stack panel display element according to the sequence. if we want to create multiple sub-container then the stack panel will work as the main container. By Default StackPanel has a Vertical orientation and Child Component Contains 100% width and automatic height. if StackPanel has Horizontal Orientation then Child Component Contains 100% height and automatic width.

GRID in WPF

GRID in WPF GRID is the default Container Component of WPF, which is used to represent WPF form elements and layout using Rows and Columns. It is by default integrated by WPF Window Component. <Grid.RowDefination> </Grid.RowDefination> <Grid.ColumnDefination> </Grid.ColumnDefination> <Window x:Class="WpfApp4.Window10"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"         xmlns:local="clr-namespace:WpfApp4"         mc:Ignorable="d"         Title="Window10">     <StackPanel>         <Grid Margin="0" Background="Yellow" Height="...