forked from johngallardo/CapabilityChecker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
46 lines (42 loc) · 1.98 KB
/
MainPage.xaml
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
<Page
x:Class="CapabilityChecker.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CapabilityChecker"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:model="using:CapabilityChecker"
mc:Ignorable="d"
>
<Page.Resources>
<ResourceDictionary>
<DataTemplate x:DataType="model:RemoteSystemModel" x:Key="RemoteSystemModelDisplay">
<StackPanel Margin="16" >
<TextBlock Text="{x:Bind Name}" />
<TextBlock Text="{x:Bind Kind}" />
<TextBlock Text="{x:Bind IsAppServiceCapable, Mode=OneWay}" />
<Button Content="Check AppService Capability" Click="Button_Click" />
<Button Content="Launch Site" Click="Button_Click_1" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Page.Resources>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"
Grid.Row="0"
>
<Button Content="LoadThis" Click="LoadThisClicked" />
<ContentPresenter ContentTemplate="{StaticResource RemoteSystemModelDisplay}"
Content="{x:Bind _model.ThisRemoteSystem, Mode=OneWay}"
Visibility="{x:Bind CollapsedIfNull(_model.ThisRemoteSystem), Mode=OneWay}"
/>
</StackPanel>
<ListView Grid.Row="1"
ItemsSource="{x:Bind _model.RemoteSystemModels}"
ItemTemplate="{StaticResource RemoteSystemModelDisplay}" />
</Grid>
</Page>