|
8 | 8 | xmlns:model="using:OneNoteServiceSamplesWinUniversal.DataModel"
|
9 | 9 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
|
10 | 10 |
|
11 |
| - <Page.Resources> |
12 |
| - <Flyout x:Key="InputTextBoxFlyout" Placement="Right"> |
13 |
| - <TextBlock Style="{StaticResource SubtitleTextBlockStyle}" TextWrapping="Wrap">This example requires a user-specified input in the TextBox</TextBlock> |
14 |
| - </Flyout> |
15 |
| - <Flyout x:Key="InputComboBoxFlyout" Placement="Right"> |
16 |
| - <TextBlock Style="{StaticResource SubtitleTextBlockStyle}" TextWrapping="Wrap">This example requires a user-selected item in the drop down</TextBlock> |
17 |
| - </Flyout> |
18 |
| - </Page.Resources> |
| 11 | + <Page.Resources> |
| 12 | + <Flyout x:Key="InputTextBoxFlyout" Placement="Right"> |
| 13 | + <TextBlock Style="{StaticResource SubtitleTextBlockStyle}" TextWrapping="Wrap">This example requires a user-specified input in the TextBox</TextBlock> |
| 14 | + </Flyout> |
| 15 | + <Flyout x:Key="InputComboBoxFlyout" Placement="Right"> |
| 16 | + <TextBlock Style="{StaticResource SubtitleTextBlockStyle}" TextWrapping="Wrap">This example requires a user-selected item in the drop down</TextBlock> |
| 17 | + </Flyout> |
| 18 | + </Page.Resources> |
19 | 19 |
|
20 |
| - <!-- |
| 20 | + <!-- |
21 | 21 | This grid acts as a root panel for the page that defines two rows:
|
22 | 22 | * Row 0 contains the back button and page title
|
23 | 23 | * Row 1 contains the rest of the page layout
|
24 | 24 | -->
|
25 |
| - <Grid x:Name="ItemPageGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" |
| 25 | + <Grid x:Name="ItemPageGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" |
26 | 26 | DataContext="{Binding Item}">
|
27 |
| - <Grid.ChildrenTransitions> |
28 |
| - <TransitionCollection> |
29 |
| - <EntranceThemeTransition/> |
30 |
| - </TransitionCollection> |
31 |
| - </Grid.ChildrenTransitions> |
32 |
| - <Grid.RowDefinitions> |
33 |
| - <RowDefinition Height="140"/> |
34 |
| - <RowDefinition Height="*"/> |
35 |
| - </Grid.RowDefinitions> |
| 27 | + <Grid.ChildrenTransitions> |
| 28 | + <TransitionCollection> |
| 29 | + <EntranceThemeTransition/> |
| 30 | + </TransitionCollection> |
| 31 | + </Grid.ChildrenTransitions> |
| 32 | + <Grid.RowDefinitions> |
| 33 | + <RowDefinition Height="140"/> |
| 34 | + <RowDefinition Height="*"/> |
| 35 | + </Grid.RowDefinitions> |
36 | 36 |
|
37 |
| - <!-- Back button and page title --> |
38 |
| - <Grid Grid.Row="0"> |
39 |
| - <Grid.ColumnDefinitions> |
40 |
| - <ColumnDefinition Width="120"/> |
41 |
| - <ColumnDefinition Width="*"/> |
42 |
| - <ColumnDefinition Width="400"/> |
43 |
| - </Grid.ColumnDefinitions> |
44 |
| - <Button Margin="39,59,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}" |
| 37 | + <!-- Back button and page title --> |
| 38 | + <Grid Grid.Row="0"> |
| 39 | + <Grid.ColumnDefinitions> |
| 40 | + <ColumnDefinition Width="120"/> |
| 41 | + <ColumnDefinition Width="*"/> |
| 42 | + <ColumnDefinition Width="400"/> |
| 43 | + </Grid.ColumnDefinitions> |
| 44 | + <Button Margin="39,59,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}" |
45 | 45 | Style="{StaticResource NavigationBackButtonNormalStyle}"
|
46 | 46 | VerticalAlignment="Top"
|
47 | 47 | AutomationProperties.Name="Back"
|
48 | 48 | AutomationProperties.AutomationId="BackButton"
|
49 | 49 | AutomationProperties.ItemType="Navigation Button"/>
|
50 |
| - <TextBlock Text="{Binding Title}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" |
| 50 | + <TextBlock Text="{Binding Title}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" |
51 | 51 | IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,30,40"/>
|
52 |
| - <Grid Grid.Column="2" VerticalAlignment="Center"> |
53 |
| - <Grid.ColumnDefinitions> |
54 |
| - <ColumnDefinition Width="*"/> |
55 |
| - <ColumnDefinition Width="Auto"/> |
56 |
| - </Grid.ColumnDefinitions> |
| 52 | + <Grid Grid.Column="2" VerticalAlignment="Center"> |
| 53 | + <Grid.ColumnDefinitions> |
| 54 | + <ColumnDefinition Width="*"/> |
| 55 | + <ColumnDefinition Width="Auto"/> |
| 56 | + </Grid.ColumnDefinitions> |
57 | 57 | <TextBlock Text="{Binding ElementName=pageRoot, Path=Model.AuthUserName}" Grid.Column="0" x:Name="AuthUserName" Style="{StaticResource BodyTextBlockStyle}"
|
58 | 58 | IsHitTestVisible="False" TextWrapping="WrapWholeWords" HorizontalAlignment="Right" Margin="20,10,20,0"/>
|
59 |
| - </Grid> |
60 |
| - </Grid> |
| 59 | + </Grid> |
| 60 | + </Grid> |
61 | 61 |
|
62 |
| - <!-- Example input and output content --> |
63 |
| - <Grid Grid.Row="1"> |
64 |
| - <Grid.ColumnDefinitions> |
65 |
| - <ColumnDefinition Width="800" /> |
66 |
| - <ColumnDefinition Width="*"/> |
67 |
| - </Grid.ColumnDefinitions> |
68 |
| - <Grid Grid.Column="0" Margin="39,0,0,0"> |
69 |
| - <Grid.RowDefinitions> |
70 |
| - <RowDefinition Height="Auto"/> |
71 |
| - <RowDefinition Height="Auto"/> |
72 |
| - <RowDefinition Height="Auto"/> |
73 |
| - <RowDefinition Height="Auto"/> |
74 |
| - </Grid.RowDefinitions> |
75 |
| - <StackPanel Grid.Row="0" Orientation="Vertical"> |
76 |
| - <TextBlock Text="{Binding Subtitle}" Style="{StaticResource SubtitleTextBlockStyle}" Margin="5,0,0,2"/> |
77 |
| - <TextBlock Text="{Binding Description}" Style="{StaticResource SubtitleTextBlockStyle}" Margin="0,0,0,20"/> |
78 |
| - </StackPanel> |
79 |
| - <StackPanel Grid.Row="1" Orientation="Horizontal"> |
80 |
| - <StackPanel x:Name="InputSelectionPanel1" Orientation="Vertical" Width="Auto" Margin="0,0,20,0"> |
81 |
| - <TextBlock Text="Select an item from the drop-down to continue:" Style="{StaticResource SubtitleTextBlockStyle}" Margin="0,0,0,20"/> |
82 |
| - <ComboBox x:Name="InputComboBox1" ItemsSource="{Binding}" FlyoutBase.AttachedFlyout="{StaticResource InputComboBoxFlyout}" SelectionChanged="InputComboBox1_OnSelectionChanged"></ComboBox> |
83 |
| - </StackPanel> |
84 |
| - <StackPanel x:Name="InputSelectionPanel2" Orientation="Vertical" Width="Auto" Margin="10,0,20,0"> |
85 |
| - <TextBlock Text="Select an item from the drop-down to continue:" Style="{StaticResource SubtitleTextBlockStyle}" Margin="0,0,0,20"/> |
86 |
| - <ComboBox x:Name="InputComboBox2" FlyoutBase.AttachedFlyout="{StaticResource InputComboBoxFlyout}"></ComboBox> |
87 |
| - </StackPanel> |
88 |
| - </StackPanel> |
89 |
| - <TextBox Grid.Row="2" x:Name="InputTextBox" Text="Enter required text here" GotFocus="InputTextBox_OnGotFocus" LostFocus="InputTextBox_OnLostFocus" Margin="0,20,300,20" FlyoutBase.AttachedFlyout="{StaticResource InputTextBoxFlyout}"> |
90 |
| - </TextBox> |
91 |
| - <StackPanel Orientation="Horizontal" Grid.Row="3"> |
92 |
| - <Button x:Name="RunButton" Margin="0,20,0,20" Click="Button_Click">Run</Button> |
93 |
| - <Button x:Name="DebugButton" Margin="20,20,0,20" Click="Button_Click">Debug</Button> |
94 |
| - </StackPanel> |
95 |
| - </Grid> |
96 |
| - <Grid Grid.Column="1" x:Name="OutputRegionGrid" DataContext="{Binding ElementName=pageRoot, Path=Model}"> |
97 |
| - <Grid.RowDefinitions> |
98 |
| - <RowDefinition Height="Auto"/> |
99 |
| - <RowDefinition Height="Auto"/> |
100 |
| - <RowDefinition Height="Auto"/> |
101 |
| - <RowDefinition Height="Auto"/> |
102 |
| - <RowDefinition Height="Auto"/> |
103 |
| - </Grid.RowDefinitions> |
104 |
| - <Grid.ColumnDefinitions> |
105 |
| - <ColumnDefinition Width="Auto"/> |
106 |
| - <ColumnDefinition Width="*"/> |
107 |
| - <ColumnDefinition Width="Auto"/> |
108 |
| - </Grid.ColumnDefinitions> |
109 |
| - <TextBlock Grid.Column="0" Grid.Row="0" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">Response:</TextBlock> |
| 62 | + <!-- Example input and output content --> |
| 63 | + <Grid Grid.Row="1"> |
| 64 | + <Grid.ColumnDefinitions> |
| 65 | + <ColumnDefinition Width="800" /> |
| 66 | + <ColumnDefinition Width="*"/> |
| 67 | + </Grid.ColumnDefinitions> |
| 68 | + <Grid Grid.Column="0" Margin="39,0,0,0"> |
| 69 | + <Grid.RowDefinitions> |
| 70 | + <RowDefinition Height="Auto"/> |
| 71 | + <RowDefinition Height="Auto"/> |
| 72 | + <RowDefinition Height="Auto"/> |
| 73 | + <RowDefinition Height="Auto"/> |
| 74 | + </Grid.RowDefinitions> |
| 75 | + <StackPanel Grid.Row="0" Orientation="Vertical"> |
| 76 | + <TextBlock Text="{Binding Subtitle}" Style="{StaticResource SubtitleTextBlockStyle}" Margin="5,0,0,2"/> |
| 77 | + <TextBlock Text="{Binding Description}" Style="{StaticResource SubtitleTextBlockStyle}" Margin="0,0,0,20"/> |
| 78 | + </StackPanel> |
| 79 | + <StackPanel Grid.Row="1" Orientation="Horizontal"> |
| 80 | + <StackPanel x:Name="InputSelectionPanel1" Orientation="Vertical" Width="Auto" Margin="0,0,20,0"> |
| 81 | + <TextBlock Text="Select an item from the drop-down to continue:" Style="{StaticResource SubtitleTextBlockStyle}" Margin="0,0,0,20"/> |
| 82 | + <ComboBox x:Name="InputComboBox1" ItemsSource="{Binding}" FlyoutBase.AttachedFlyout="{StaticResource InputComboBoxFlyout}" SelectionChanged="InputComboBox1_OnSelectionChanged"></ComboBox> |
| 83 | + </StackPanel> |
| 84 | + <StackPanel x:Name="InputSelectionPanel2" Orientation="Vertical" Width="Auto" Margin="10,0,20,0"> |
| 85 | + <TextBlock Text="Select an item from the drop-down to continue:" Style="{StaticResource SubtitleTextBlockStyle}" Margin="0,0,0,20"/> |
| 86 | + <ComboBox x:Name="InputComboBox2" FlyoutBase.AttachedFlyout="{StaticResource InputComboBoxFlyout}"></ComboBox> |
| 87 | + </StackPanel> |
| 88 | + </StackPanel> |
| 89 | + <TextBox Grid.Row="2" x:Name="InputTextBox" Text="Enter required text here" GotFocus="InputTextBox_OnGotFocus" LostFocus="InputTextBox_OnLostFocus" Margin="0,20,300,20" FlyoutBase.AttachedFlyout="{StaticResource InputTextBoxFlyout}"> |
| 90 | + </TextBox> |
| 91 | + <StackPanel Orientation="Horizontal" Grid.Row="3"> |
| 92 | + <Button x:Name="RunButton" Margin="0,20,0,20" Click="Button_Click">Run</Button> |
| 93 | + <Button x:Name="DebugButton" Margin="20,20,0,20" Click="Button_Click">Debug</Button> |
| 94 | + </StackPanel> |
| 95 | + </Grid> |
| 96 | + <Grid x:Name="OutputRegionGrid" DataContext="{Binding ElementName=pageRoot, Path=Model}" Grid.ColumnSpan="2" Margin="730,0,0,0"> |
| 97 | + <Grid.RowDefinitions> |
| 98 | + <RowDefinition Height="Auto"/> |
| 99 | + <RowDefinition Height="Auto"/> |
| 100 | + <RowDefinition Height="Auto"/> |
| 101 | + <RowDefinition Height="Auto"/> |
| 102 | + <RowDefinition Height="Auto"/> |
| 103 | + </Grid.RowDefinitions> |
| 104 | + <Grid.ColumnDefinitions> |
| 105 | + <ColumnDefinition Width="Auto"/> |
| 106 | + <ColumnDefinition Width="*"/> |
| 107 | + <ColumnDefinition Width="Auto"/> |
| 108 | + </Grid.ColumnDefinitions> |
| 109 | + <TextBlock Grid.Column="0" Grid.Row="0" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">Response:</TextBlock> |
110 | 110 | <TextBox Text="{Binding StatusCode}" IsEnabled="{Binding IsResponseAvailable}" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Margin="20,10,0,0" IsReadOnly="True" MaxWidth="300" HorizontalAlignment="Left"/>
|
111 |
| - <TextBlock Grid.Column="0" Grid.Row="1" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">Body:</TextBlock> |
| 111 | + <TextBlock Grid.Column="0" Grid.Row="1" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">Body:</TextBlock> |
112 | 112 | <Border BorderThickness="{Binding BodyBorderThikness}" BorderBrush="Gray" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Margin="20,10,10,0">
|
113 | 113 | <TextBox Text="{Binding Body}" MaxHeight="400" x:Name="ResponseBody" ScrollViewer.VerticalScrollBarVisibility="Visible" IsEnabled="{Binding IsResponseAvailable}" IsReadOnly="True" TextWrapping="Wrap" AcceptsReturn="True" BorderThickness="0"/>
|
114 | 114 | </Border>
|
115 | 115 | <TextBlock Visibility="{Binding IsResponseListAvailable}" Grid.Column="0" Grid.Row="2" x:Name="ResponseListTextBlock" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">List of items in response:</TextBlock>
|
116 | 116 | <ComboBox SelectedItem="{Binding SelectedResponse, Mode=TwoWay}" Visibility="{Binding IsResponseListAvailable}" ItemsSource="{Binding ResponseList}" Grid.Column="1" Grid.Row="2" x:Name="ResponseListBox" Margin="20,10,0,0"></ComboBox>
|
117 |
| - <TextBlock Grid.Column="0" Grid.Row="3" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">OneNote client link:</TextBlock> |
| 117 | + <TextBlock Grid.Column="0" Grid.Row="3" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">OneNote client link:</TextBlock> |
118 | 118 | <TextBox Text="{Binding OneNoteClientUrl}" IsEnabled="{Binding IsResponseAvailable}" Grid.Column="1" Grid.Row="3" x:Name="ClientLinkTextBox" Margin="20,10,0,0" IsReadOnly="True"/>
|
119 | 119 | <Button IsEnabled="{Binding IsResponseAvailable}" Grid.Column="2" Grid.Row="3" x:Name="ClientLinkLaunchButton" Content="Launch" HorizontalAlignment="Left" Margin="10,20,10,0" VerticalAlignment="Top" Click="ClientLinkLaunchButton_OnClickLinkLaunchButton_Click"/>
|
120 |
| - <TextBlock Grid.Column="0" Grid.Row="4" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">OneNote web link:</TextBlock> |
| 120 | + <TextBlock Grid.Column="0" Grid.Row="4" TextAlignment="Left" VerticalAlignment="Center" Margin="20,20,0,5" Style="{StaticResource SubtitleTextBlockStyle}">OneNote web link:</TextBlock> |
121 | 121 | <TextBox Text="{Binding OneNoteWebUrl}" IsEnabled="{Binding IsResponseAvailable}" Grid.Column="1" Grid.Row="4" x:Name="WebLinkTextBox" Margin="20,10,0,0" IsReadOnly="True"/>
|
122 | 122 | <Button IsEnabled="{Binding IsResponseAvailable}" Grid.Column="2" Grid.Row="4" x:Name="WebLinkLaunchButton" Content="Launch" HorizontalAlignment="Left" Margin="10,20,10,0" VerticalAlignment="Top" Click="WebLinkLaunchButton_Click"/>
|
123 |
| - </Grid> |
124 |
| - </Grid> |
125 |
| - </Grid> |
| 123 | + </Grid> |
| 124 | + </Grid> |
| 125 | + </Grid> |
126 | 126 | </local:SharedBasePage>
|
0 commit comments