-
Notifications
You must be signed in to change notification settings - Fork 775
Expand file tree
/
Copy pathActionsView.xaml
More file actions
49 lines (44 loc) · 2.85 KB
/
ActionsView.xaml
File metadata and controls
49 lines (44 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!-- Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Page
x:Class="Features.CrossPlatform.Views.ActionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Features.CrossPlatform.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cal="using:Caliburn.Micro"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<Style x:Key="ActionButtonStyle" TargetType="Button">
<Setter Property="Margin" Value="0,10,0,0"/>
<Setter Property="Width" Value="600"/>
</Style>
</Page.Resources>
<StackPanel >
<TextBlock Text="actions" Style="{StaticResource SubheaderTextBlockStyle}" Margin="40,10,40,0"/>
<StackPanel Margin="40,20">
<TextBlock>
<Run Text="Output:" FontWeight="Bold"/>
<Run Text="{Binding Output}"/>
</TextBlock>
<TextBox Header="Name" x:Name="UserName" Margin="0,10,0,0" Width="600" HorizontalAlignment="Left"/>
<Button x:Name="Clear" Content="Clear" Style="{StaticResource ActionButtonStyle}"/>
<Button x:Name="SimpleSayHello" Content="Simple Say Hello" Style="{StaticResource ActionButtonStyle}"/>
<Button cal:Message.Attach="SimpleSayHello" Content="Simple Say Hello (using Message.Attach)" Style="{StaticResource ActionButtonStyle}"/>
<Button cal:Message.Attach="[Event DoubleTapped] = [SimpleSayHello]" Content="Simple Say Hello (Custom Event - Double Tapped)" Style="{StaticResource ActionButtonStyle}"/>
<Button x:Name="FullSyntax" Content="Simple Say Hello (Full Behaviour Syntax)" Style="{StaticResource ActionButtonStyle}">
<Interactivity:Interaction.Behaviors>
<Interactivity:EventTriggerBehavior EventName="Click">
<cal:ActionMessage MethodName="SimpleSayHello" AssociatedObject="{Binding ElementName=FullSyntax}" />
</Interactivity:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</Button>
<Button x:Name="SayHello" Content="Say Hello (with parameter)" Style="{StaticResource ActionButtonStyle}"/>
<Button cal:Message.Attach="SayHello(UserName)" Content="Say Hello (with parameter and Message.Attach)" Style="{StaticResource ActionButtonStyle}"/>
<Button x:Name="SayGoodbye" Content="Say Goodbye (async method)" Style="{StaticResource ActionButtonStyle}"/>
</StackPanel>
</StackPanel>
</Page>