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.

53 lines
2.8 KiB

<!--*********************************************************************
Extended WPF Toolkit
Copyright (C) 2010-2012 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
This program can be provided to you by Xceed Software Inc. under a
proprietary commercial license agreement for use in non-Open Source
projects. The commercial version of Extended WPF Toolkit also includes
priority technical support, commercial updates, and many additional
useful WPF controls if you license Xceed Business Suite for WPF.
Visit http://xceed.com and follow @datagrid on Twitter.
********************************************************************-->
<sample:DemoView x:Class="Samples.Modules.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:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="MultiLineTextEditor"
Description="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.">
<sample:DemoView.Resources>
<DataTemplate x:Key="multiLineTextEditorStyle" >
<xctk:MultiLineTextEditor TextWrapping="Wrap" Text="{Binding Path=Review}" Content="{Binding Text, RelativeSource={RelativeSource Self}}" Height="24" />
</DataTemplate>
</sample: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>
</sample:DemoView>