|
|
|
@ -2,8 +2,114 @@ |
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:infControls="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure" |
|
|
|
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" |
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|
|
|
Title="ChildWindow"> |
|
|
|
|
|
|
|
<infControls:DemoView.Resources> |
|
|
|
<ObjectDataProvider x:Key="WindowStates" MethodName="GetValues" |
|
|
|
ObjectType="{x:Type sys:Enum}" > |
|
|
|
<ObjectDataProvider.MethodParameters> |
|
|
|
<x:Type TypeName="extToolkit:WindowState"/> |
|
|
|
</ObjectDataProvider.MethodParameters> |
|
|
|
</ObjectDataProvider> |
|
|
|
<ObjectDataProvider x:Key="WindowStartupLocations" MethodName="GetValues" |
|
|
|
ObjectType="{x:Type sys:Enum}" > |
|
|
|
<ObjectDataProvider.MethodParameters> |
|
|
|
<x:Type TypeName="extToolkit:WindowStartupLocation"/> |
|
|
|
</ObjectDataProvider.MethodParameters> |
|
|
|
</ObjectDataProvider> |
|
|
|
</infControls:DemoView.Resources> |
|
|
|
|
|
|
|
<Grid> |
|
|
|
<TextBlock Text="ChildWindow View" /> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
<RowDefinition Height="*"/> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
|
|
|
|
<TextBlock Text="ChildWindow description goes here." |
|
|
|
TextWrapping="Wrap" /> |
|
|
|
|
|
|
|
<GroupBox Header="Features" Grid.Row="1" Margin="5" > |
|
|
|
<Grid Margin="5"> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
<ColumnDefinition Width="Auto" /> |
|
|
|
<ColumnDefinition Width="*" /> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<TextBlock Text="Caption:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<TextBox Name="_txtCaption" Grid.Column="1" Margin="5" Text="ChildWindow" VerticalAlignment="Center" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Name="textBlock2" Text="Left:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<extToolkit:DoubleUpDown x:Name="_txtLeft" Grid.Column="1" Grid.Row="1" Value="0" VerticalAlignment="Center" Margin="5" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="2" Name="textBlock3" Text="Top:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<extToolkit:DoubleUpDown x:Name="_txtTop" Grid.Column="1" Grid.Row="2" Value="0" VerticalAlignment="Center" Margin="5" /> |
|
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="IsModal:" VerticalAlignment="Center" Margin="2" Grid.Column="2" /> |
|
|
|
<CheckBox x:Name="_chkIsModal" Grid.Column="3" VerticalAlignment="Center" Margin="5" IsChecked="True" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Text="WindowState:" VerticalAlignment="Center" Margin="2" Grid.Column="2" /> |
|
|
|
<ComboBox Grid.Column="3" Grid.Row="1" Name="_cboWindowState" ItemsSource="{Binding Source={StaticResource WindowStates}}" SelectedIndex="1" VerticalAlignment="Center" Margin="5" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="2" Text="WindowStartupLocation:" VerticalAlignment="Center" Margin="2" Grid.Column="2" /> |
|
|
|
<ComboBox Grid.Column="3" Grid.Row="2" Name="_cboWindowStartupLocations" ItemsSource="{Binding Source={StaticResource WindowStartupLocations}}" SelectedIndex="0" VerticalAlignment="Center" Margin="5" /> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
</GroupBox> |
|
|
|
|
|
|
|
<Grid Grid.Row="2" Margin="10"> |
|
|
|
<extToolkit:ChildWindow Width="350" |
|
|
|
Caption="{Binding Text, ElementName=_txtCaption}" |
|
|
|
IsModal="{Binding IsChecked, ElementName=_chkIsModal}" |
|
|
|
Left="{Binding Value, ElementName=_txtLeft, Mode=TwoWay}" |
|
|
|
Top="{Binding Value, ElementName=_txtTop, Mode=TwoWay}" |
|
|
|
WindowStartupLocation="{Binding SelectedItem, ElementName=_cboWindowStartupLocations}" |
|
|
|
WindowState="{Binding SelectedItem, ElementName=_cboWindowState}"> |
|
|
|
<Grid Margin="10" > |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<RowDefinition Height="Auto" /> |
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
<RowDefinition Height="Auto"/> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
<ColumnDefinition Width="*"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="0" Text="First Name:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<extToolkit:WatermarkTextBox Grid.Row="0" Grid.Column="1" Margin="2" VerticalAlignment="Center" Watermark="Enter First Name" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Text="Last Name:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<extToolkit:WatermarkTextBox Grid.Row="1" Grid.Column="1" Margin="2" VerticalAlignment="Center" Watermark="Enter Last Name" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="2" Text="Date of Birth:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<extToolkit:DateTimeUpDown Grid.Row="2" Grid.Column="1" Format="ShortDate" Margin="2" VerticalAlignment="Center" Watermark="Enter Date of Birth" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="3" Text="Salary:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<extToolkit:IntegerUpDown Grid.Row="3" Grid.Column="1" FormatString="C2" Margin="2" VerticalAlignment="Center" Watermark="Enter Salary" /> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="4" Text="Favorite Color:" Margin="2" VerticalAlignment="Center" /> |
|
|
|
<extToolkit:ColorPicker Grid.Row="4" Grid.Column="1" Margin="2" VerticalAlignment="Center" /> |
|
|
|
|
|
|
|
<StackPanel Grid.Row="5" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0"> |
|
|
|
<Button Width="65" Margin="2">OK</Button> |
|
|
|
<Button Width="65" Margin="2">Cancel</Button> |
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
</extToolkit:ChildWindow> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</infControls:DemoView> |
|
|
|
|