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.
133 lines
7.1 KiB
133 lines
7.1 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.ChildWindow.Views.HomeView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
Title="ChildWindow">
|
|
|
|
<sample:DemoView.Resources>
|
|
<ObjectDataProvider x:Key="WindowStates" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="xctk:WindowState" />
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
<ObjectDataProvider x:Key="WindowStartupLocations" MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="xctk:WindowStartupLocation" />
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
</sample:DemoView.Resources>
|
|
|
|
<Grid>
|
|
<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" />
|
|
<xctk: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" />
|
|
<xctk: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">
|
|
<xctk: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" />
|
|
<xctk: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" />
|
|
<xctk: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" />
|
|
<xctk: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" />
|
|
<xctk: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" />
|
|
<xctk: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>
|
|
</xctk:ChildWindow>
|
|
</Grid>
|
|
</Grid>
|
|
</sample:DemoView>
|
|
|