-
Notifications
You must be signed in to change notification settings - Fork 500
/
Copy pathScenario6.xaml
94 lines (91 loc) · 4.2 KB
/
Scenario6.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!--
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
-->
<common:LayoutAwarePage
x:Class="Controls_WebView.Scenario6"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Controls_WebView"
xmlns:common="using:SDKTemplate.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid x:Name="Input" Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock x:Name="Description" Style="{StaticResource BasicTextStyle}" TextWrapping="Wrap" Grid.Row="0">
This scenario shows you how to use the WebViewBrush. The WebView
control is hosted in its own HWND, so your app content can not appear on top
of it. To solve this problem, cover the WebView control with a Rectangle and
use the WebViewBrush for the Rectangle.Fill property. This will copy the
WebView contents into the rectangle, which will not cover other app content.
To view the problem, choose an item from the ComboBox below. Click Show
the solution to see how the ComboBox behaves when using the WebViewBrush.
</TextBlock>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Row="1">
<Button x:Name="Solution" Content="Show the solution" Margin="0,0,10,0" Click="Solution_Click"/>
</StackPanel>
</Grid>
<!--<snippetWebViewBrushXaml>-->
<Grid x:Name="Output" Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ComboBox x:Name="ComboBox1" Height="50" Width="200" HorizontalAlignment="Left" Margin="10,0,0,0">
<ComboBoxItem>
<x:String>First Item</x:String>
</ComboBoxItem>
<ComboBoxItem>
<x:String>Second Item</x:String>
</ComboBoxItem>
<ComboBoxItem>
<x:String>Third Item</x:String>
</ComboBoxItem>
<ComboBoxItem>
<x:String>Fourth Item</x:String>
</ComboBoxItem>
<ComboBoxItem>
<x:String>Fifth Item</x:String>
</ComboBoxItem>
<ComboBoxItem>
<x:String>Sixth Item</x:String>
</ComboBoxItem>
<ComboBoxItem>
<x:String>Seventh Item</x:String>
</ComboBoxItem>
</ComboBox>
<Border BorderThickness="1" BorderBrush="#FF707070" Grid.Row="1" Margin="10,0,0,0">
<Grid>
<WebView x:Name="WebView6" />
<Rectangle x:Name="Rect1"/>
</Grid>
</Border>
</Grid>
<!--</snippetWebViewBrushXaml>-->
<!-- Add Storyboards to the visual states below as necessary for supporting the various layouts -->
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState x:Name="FullScreenLandscape"/>
<VisualState x:Name="Filled"/>
<VisualState x:Name="FullScreenPortrait"/>
<VisualState x:Name="Snapped"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</common:LayoutAwarePage>