mirror of https://github.com/AMT-Cheif/Stylet.git
51 lines
2.7 KiB
XML
51 lines
2.7 KiB
XML
<Window x:Class="StyletIntegrationTests.ShellView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
Title="ShellView" Height="500" Width="500">
|
|
<DockPanel LastChildFill="False">
|
|
<GroupBox DockPanel.Dock="Top" Header="ShowDialog and DialogResult" Padding="10">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Command="{s:Action ShowDialogAndDialogResult}">Show Dialog</Button>
|
|
<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>
|
|
|
|
<GroupBox DockPanel.Dock="Top" Header="OnUnhandledException" Padding="10">
|
|
<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>
|
|
</GroupBox>
|
|
|
|
<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>
|
|
</GroupBox>
|
|
<GroupBox DockPanel.Dock="Top" Header="ActionTarget" Padding="10">
|
|
<DockPanel>
|
|
<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>
|
|
<TextBox DockPanel.Dock="Top">
|
|
<TextBox.InputBindings>
|
|
<KeyBinding Key="S" Modifiers="Ctrl" Command="{s:Action ShowActionTargetSaved}"/>
|
|
</TextBox.InputBindings>
|
|
<TextBox.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="Click Me" Command="{s:Action ShowActionTargetSaved}"/>
|
|
</ContextMenu>
|
|
</TextBox.ContextMenu>
|
|
</TextBox>
|
|
</DockPanel>
|
|
</GroupBox>
|
|
</DockPanel>
|
|
</Window>
|