The layout of WPF Program Development and the layout of wpf Program Development
UniformGrid: Special Grid. All cells are of the same size.
Canvas: similar to the canvas of html5, it can also be laid out based on coordinates like winform.
Grid: The table of the webpage
GridSplitter: The Separator in the Grid. You can drag it to adjust the size.
<GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" Height="10" Background="Blue" Grid.ColumnSpan="3"/>
// ShowsPreview = "True" drag and drop will not be adjusted immediately, the mouse is released to adjust, DragIncrement = "10" each drag width
// Note: Set Auto for Col or Row of the Grid to adjust the value based on the Content size.
SharedSizeGroup: Share size in Grid
Add additional attributes in the outer layout of the GridGrid. IsSharedSizeScope = "True" sets the allowable alignment size.
Set in the required Column
SharedSizeGroup = "abc" to align
<StackPanel Grid. isSharedSizeScope = "True"> <Grid x: Name = "LayoutRoot_grid1" ShowGridLines = "True" Background = "Cornsilk"> <Grid. columnDefinitions> <ColumnDefinition Width = "Auto" SharedSizeGroup = "abc"/> <ColumnDefinition Width = "Auto"/> <ColumnDefinition/> </Grid. columnDefinitions> <Label Margin = "5"> ceshishisshw a long text article determines that the price of the house is a waste of Aston on the price of the southern part of the city where I love you. column = "1"> moretext </Label> <Label Grid. column = "2" Margin = "2"> it is the card swipe fee in the room in Lhasa </Label> </Grid> <Grid x: name = "LayoutRoot_grid2" ShowGridLines = "True" Background = "Azure"> <Grid. columnDefinitions> <ColumnDefinition Width = "Auto" SharedSizeGroup = "abc"/> <ColumnDefinition/> </Grid. columnDefinitions> <Label Margin = "5"> Aston waste </Label> <Label Grid. column = "1"> moretext </Label> </Grid> </StackPanel>
Effect:
Grid of the UniformGrid rule
Specify the rows and columns to create a frame of the same size. // you have used this Grid to create a small game like 2048.
InkCanvas (Advanced Development)
EditingMode attributes:
1. Ink (default value of EditingMode)-draw a stroke with the mouse or pointer.
2. InkAndGesture-the same as Ink, but can also recognize users' gestures. The list of gestures (Up, Down, Circle, ScratchOut, and Tap) is saved in the System. Windows. Ink. ApplicationGesture Enumeration type.
3. GestureOnly-only recognizes gestures and does not draw strokes you enter.
4. EraseByStroke (default value of EditingModeInverted) -- erase a stroke when it is touched.
5. EraseByPoint-only erase the stroke part directly touched (like a traditional pencil eraser ).
6. Select-When triggered, Select a stroke or any UIElement so that they can be deleted, moved, or adjusted within the InkCanvas range.
7. None-no response is made to the mouse or pointer.