Created
May 24, 2017 12:00
-
-
Save atzimler/94c7c1c39f7c03383a9453b3a4ba9516 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LeftRightLayoutControl : StackPanel | |
| { | |
| private Grid _grid; | |
| private StackPanel _left; | |
| private StackPanel _right; | |
| public LeftRightLayoutControl() | |
| { | |
| _grid = new Grid(); | |
| _grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); | |
| _grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }); | |
| _grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }); | |
| _left = new StackPanel(); | |
| Grid.SetRow(_left, 0); | |
| Grid.SetColumn(_left, 0); | |
| _grid.Children.Add(_left); | |
| _right = new StackPanel(); | |
| Grid.SetRow(_right, 0); | |
| Grid.SetColumn(_right, 1); | |
| _grid.Children.Add(_right); | |
| Children.Add(_grid); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment