All the controls missing in WPF. Over 1 million downloads.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
3.0 KiB

<!--**************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
************************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Text.Views.MultiLineTextEditorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="MultiLineTextEditor">
<local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe">
The MultiLineTextEditor is a TextBox that allows you to edit text that is too long to display in a regular TextBox. The popup is resizable to accommodate any text.
</Paragraph>
</local:DemoView.Description>
<local:DemoView.Resources>
<DataTemplate x:Key="multiLineTextEditorStyle" >
<xctk:MultiLineTextEditor
TextWrapping="Wrap"
Text="{Binding Path=Review}"
Content="{Binding Path=Review}"
HorizontalContentAlignment="Left"
VerticalContentAlignment="Center"
Height="24" />
</DataTemplate>
</local:DemoView.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="1" Margin="10">
<TextBlock Text="Usage:" Style="{StaticResource Header}" />
<DataGrid x:Name="_dataGrid" ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Title" Binding="{Binding Path=Title}" IsReadOnly="True"/>
<DataGridTemplateColumn Header="Review" Width="150" CellTemplate ="{StaticResource multiLineTextEditorStyle}"/>
<DataGridTextColumn Header="Rating" Binding="{Binding Path=Rating}" IsReadOnly="True"/>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</Grid>
</local:DemoView>