|
<PageFunction x:Class="TaskList.EditTaskPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:CodeProject.Windows.Markup;assembly=CodeProjectCore"
xmlns:vm="clr-namespace:TaskList.ViewModel;assembly=TaskList.ViewModel"
xmlns:dm="clr-namespace:TaskList.DataModel;assembly=TaskList.DataModel"
x:TypeArguments="dm:Task"
c:ViewModel.Instance="{c:ViewModel {x:Type vm:EditTaskPageViewModel}}"
Loaded="Page_Loaded"
Title="EditTaskPage">
<DockPanel Margin="5">
<DockPanel.Resources>
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="ToolTip"
Value="{Binding RelativeSource={RelativeSource Self},
Path=(Validation.Errors)[0].ErrorContent}"/>
</Trigger>
</Style.Triggers>
</Style>
</DockPanel.Resources>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Bottom">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="4"/>
<Setter Property="Width" Value="60"/>
</Style>
</StackPanel.Resources>
<Button Name="okButton" IsDefault="True" IsEnabled="{Binding Task.IsValid}" Click="okButton_Click">OK</Button>
<Button Name="cancelButton" IsCancel="True" Click="cancelButton_Click">Cancel</Button>
</StackPanel>
<StackPanel>
<Label Content="Title"/>
<TextBox Name="title" Text="{Binding Task.Title, ValidatesOnDataErrors=True}"/>
<Label Content="Description"/>
<TextBox Text="{Binding Task.Description}" AcceptsReturn="True" TextWrapping="Wrap" Height="100"/>
<Label Content="Start Date"/>
<TextBox Text="{Binding Task.StartDate}"/>
<Label Content="End Date"/>
<TextBox Text="{Binding Task.EndDate}"/>
</StackPanel>
</DockPanel>
</PageFunction>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Windows developer with 10+ years experience working in the banking industry.