2014-04-04 05:04:53 -07:00
<Window x:Class="StyletIntegrationTests.ShellView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2014-04-23 09:47:42 -07:00
xmlns:s="https://github.com/canton7/Stylet"
2014-04-04 05:04:53 -07:00
Title="ShellView" Height="500" Width="500">
<DockPanel LastChildFill="False">
<GroupBox DockPanel.Dock="Top" Header="ShowDialog and DialogResult" Padding="10">
<StackPanel Orientation="Horizontal">
2015-09-24 02:34:19 -07:00
<Button Command="{s:Action ShowDialogAndDialogResult}" Content="Show Dialog"/>
2014-04-04 05:04:53 -07:00
<TextBlock Margin="50,0,0,0">Result: </TextBlock>
<TextBlock Margin="10,0,0,0" Text="{Binding ShowDialogAndDialogResultDialogResult}"/>
</StackPanel>
</GroupBox>
<GroupBox DockPanel.Dock="Top" Header="Window Lifecycle" Padding="10">
<Button Command="{s:Action ShowWindowLifecycle}">Show Window</Button>
</GroupBox>
2014-05-09 06:40:40 -07:00
2014-05-09 07:43:55 -07:00
<GroupBox DockPanel.Dock="Top" Header="OnUnhandledException" Padding="10">
2014-05-10 12:11:02 -07:00
<DockPanel>
<TextBlock DockPanel.Dock="Top" TextWrapping="WrapWithOverflow">Verify that pressing the button below shows a dialog, containing the message 'Unhandled Exception: Hello'.</TextBlock>
<Button DockPanel.Dock="Top" Command="{s:Action ThrowException}">Throw Exception</Button>
</DockPanel>
2014-05-09 07:43:55 -07:00
</GroupBox>
2014-05-10 12:11:02 -07:00
<GroupBox DockPanel.Dock="Top" Header="Dispatcher" Padding="10">
<DockPanel>
<TextBlock DockPanel.Dock="Top" TextWrapping="WrapWithOverflow">Verify that pressing the button shows a MessageBox saying 'Success'.</TextBlock>
<Button DockPanel.Dock="Top" Command="{s:Action TestDispatcher}">Test Dispatcher</Button>
</DockPanel>
2014-04-09 04:35:59 -07:00
</GroupBox>
2015-09-23 14:11:24 -07:00
<GroupBox DockPanel.Dock="Top" Header="ActionTarget" Padding="10">
<DockPanel>
2015-09-24 02:34:19 -07:00
<TextBlock DockPanel.Dock="Top" TextWrapping="WrapWithOverflow">
Verify that pressing ctrl+s in the text box creates a dialog. Also verify that right-clicking in the text box and clicking the menu item shows a dialog.
</TextBlock>
2015-09-23 14:11:24 -07:00
<TextBox DockPanel.Dock="Top">
<TextBox.InputBindings>
<KeyBinding Key="S" Modifiers="Ctrl" Command="{s:Action ShowActionTargetSaved}"/>
</TextBox.InputBindings>
2015-09-24 02:34:19 -07:00
<TextBox.ContextMenu>
<ContextMenu>
2015-09-24 04:12:25 -07:00
<MenuItem Header="{Binding Foo}" DataContext="{s:ViewModel}" Command="{s:Action ShowActionTargetSaved}"/>
2015-09-24 02:34:19 -07:00
</ContextMenu>
</TextBox.ContextMenu>
2015-09-23 14:11:24 -07:00
</TextBox>
</DockPanel>
</GroupBox>
2014-04-04 05:04:53 -07:00
</DockPanel>
</Window>