4 changed files with 58 additions and 0 deletions
@ -0,0 +1,31 @@ |
|||
<UserControl xmlns="https://github.com/perspex"> |
|||
<StackPanel Orientation="Vertical" Gap="4"> |
|||
<TextBlock Classes="h1">TextBox</TextBlock> |
|||
<TextBlock Classes="h2">A control into which the user can input text</TextBlock> |
|||
|
|||
<StackPanel Orientation="Horizontal" |
|||
Margin="0,16,0,0" |
|||
HorizontalAlignment="Center" |
|||
Gap="16"> |
|||
<StackPanel Orientation="Vertical" Gap="8"> |
|||
<TextBox Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." Width="200" /> |
|||
<TextBox Width="200" Watermark="Watermark" /> |
|||
<TextBox Width="200" |
|||
Watermark="Floating Watermark" |
|||
UseFloatingWatermark="True" |
|||
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/> |
|||
<TextBox AcceptsReturn="True" TextWrapping="Wrap" Width="200" Height="125" |
|||
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est." /> |
|||
<TextBox Text="TextBox with horizontal scrollbar set to Auto." |
|||
ScrollViewer.HorizontalScrollBarVisibility="Auto" |
|||
Width="200" /> |
|||
</StackPanel> |
|||
|
|||
<StackPanel Orientation="Vertical" Gap="8"> |
|||
<TextBox Width="200" Text="Left aligned text" TextAlignment="Left" /> |
|||
<TextBox Width="200" Text="Center aligned text" TextAlignment="Center" /> |
|||
<TextBox Width="200" Text="Right aligned text" TextAlignment="Right" /> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</UserControl> |
|||
@ -0,0 +1,18 @@ |
|||
using Perspex.Controls; |
|||
using Perspex.Markup.Xaml; |
|||
|
|||
namespace ControlCatalog.Pages |
|||
{ |
|||
public class TextBoxPage : UserControl |
|||
{ |
|||
public TextBoxPage() |
|||
{ |
|||
this.InitializeComponent(); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
PerspexXamlLoader.Load(this); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue