@@ -15,55 +15,55 @@ Copyright (C) Microsoft Corporation. All rights reserved.
1515 xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
1616 mc : Ignorable =" d" >
1717
18- <Page .Resources>
19- <SolidColorBrush x : Key =" TranslucentBlackBrush" Color =" Black" Opacity =" 0.3" />
20- <Style x : Key =" TextBlockStyling" TargetType =" TextBlock" >
21- <Setter Property =" Foreground" Value =" Black" />
22- </Style >
23- </Page .Resources>
24-
25-
26- <Grid Background =" {ThemeResource ApplicationPageBackgroundThemeBrush}" >
27-
28- <Grid >
29- <Grid .RowDefinitions>
30- <RowDefinition Height =" 100" />
31- <RowDefinition Height =" 300*" />
32- <RowDefinition Height =" 30" />
33- </Grid .RowDefinitions>
34-
35- <!-- Input control panel -->
36- <Grid Name =" InputControlGrid" HorizontalAlignment =" Center" Padding =" 10,0,10,0" >
37- <Grid .ColumnDefinitions>
38- <ColumnDefinition Width =" Auto" />
39- <ColumnDefinition Width =" Auto" />
40- <ColumnDefinition Width =" Auto" />
41- </Grid .ColumnDefinitions>
42- <Grid .RowDefinitions>
43- <RowDefinition Height =" Auto" />
44- <RowDefinition Height =" Auto" />
45- <RowDefinition Height =" Auto" />
46- </Grid .RowDefinitions>
47-
48- <!-- Input control labels -->
49- <TextBlock x : Uid =" TxtInputMedia" FontSize =" 16" Grid.Row=" 0" Grid.Column=" 0" HorizontalAlignment =" Center" />
50- <TextBlock x : Uid =" TxtInputStyle" FontSize =" 16" Grid.Row=" 0" Grid.Column=" 1" HorizontalAlignment =" Center" />
51- <TextBlock x : Uid =" TxtInputDevice" FontSize =" 16" Grid.Row=" 0" Grid.Column=" 2" HorizontalAlignment =" Center" />
52-
53- <!-- Input control descriptions -->
54- <TextBlock x : Uid =" TxtInputMediaDescription"
18+ <Page .Resources>
19+ <SolidColorBrush x : Key =" TranslucentBlackBrush" Color =" Black" Opacity =" 0.3" />
20+ <Style x : Key =" TextBlockStyling" TargetType =" TextBlock" >
21+ <Setter Property =" Foreground" Value =" Black" />
22+ </Style >
23+ </Page .Resources>
24+
25+
26+ <Grid Background =" {ThemeResource ApplicationPageBackgroundThemeBrush}" >
27+
28+ <Grid >
29+ <Grid .RowDefinitions>
30+ <RowDefinition Height =" 100" />
31+ <RowDefinition Height =" 300*" />
32+ <RowDefinition Height =" 30" />
33+ </Grid .RowDefinitions>
34+
35+ <!-- Input control panel -->
36+ <Grid Name =" InputControlGrid" HorizontalAlignment =" Center" Padding =" 10,0,10,0" >
37+ <Grid .ColumnDefinitions>
38+ <ColumnDefinition Width =" Auto" />
39+ <ColumnDefinition Width =" Auto" />
40+ <ColumnDefinition Width =" Auto" />
41+ </Grid .ColumnDefinitions>
42+ <Grid .RowDefinitions>
43+ <RowDefinition Height =" Auto" />
44+ <RowDefinition Height =" Auto" />
45+ <RowDefinition Height =" Auto" />
46+ </Grid .RowDefinitions>
47+
48+ <!-- Input control labels -->
49+ <TextBlock x : Uid =" TxtInputMedia" FontSize =" 16" Grid.Row=" 0" Grid.Column=" 0" HorizontalAlignment =" Center" />
50+ <TextBlock x : Uid =" TxtInputStyle" FontSize =" 16" Grid.Row=" 0" Grid.Column=" 1" HorizontalAlignment =" Center" />
51+ <TextBlock x : Uid =" TxtInputDevice" FontSize =" 16" Grid.Row=" 0" Grid.Column=" 2" HorizontalAlignment =" Center" />
52+
53+ <!-- Input control descriptions -->
54+ <TextBlock x : Uid =" TxtInputMediaDescription"
5555 FontSize =" 10"
5656 Grid.Row=" 2" Grid.Column=" 0"
5757 HorizontalAlignment =" Center"
5858 TextWrapping =" WrapWholeWords"
5959 Width =" {Binding ActualWidth, ElementName=InputMediaList}" VerticalAlignment =" Top" Margin =" 5,0,5,0" />
60- <TextBlock x : Uid =" TxtInputStyleDescription"
60+ <TextBlock x : Uid =" TxtInputStyleDescription"
6161 FontSize =" 10"
6262 Grid.Row=" 2" Grid.Column=" 1"
6363 HorizontalAlignment =" Center"
6464 TextWrapping =" WrapWholeWords"
6565 Width =" {Binding ActualWidth, ElementName=UIStyleList}" VerticalAlignment =" Top" Margin =" 5,0,5,0" />
66- <TextBlock x : Uid =" TxtInputDeviceDescription"
66+ <TextBlock x : Uid =" TxtInputDeviceDescription"
6767 FontSize =" 10"
6868 Grid.Row=" 2" Grid.Column=" 2"
6969 HorizontalAlignment =" Center"
@@ -72,66 +72,66 @@ Copyright (C) Microsoft Corporation. All rights reserved.
7272 Width =" {Binding ActualWidth, ElementName=UIToggleInferenceDevice}"
7373 Margin =" 5,0,5,0" />
7474
75- <!-- Input models -->
76- <ListBox Name =" UIStyleList"
75+ <!-- Input models -->
76+ <ListBox Name =" UIStyleList"
7777 HorizontalAlignment =" Center"
7878 Grid.Row=" 1" Grid.Column=" 1"
7979 ItemsSource =" {x:Bind modelFileNames}"
8080 SelectedItem =" {Binding CurrentApp.ModelSource, Mode=TwoWay}"
8181 Margin =" 5,0,5,0" >
82- <ListBox .ItemsPanel>
83- <ItemsPanelTemplate >
84- <VirtualizingStackPanel Orientation =" Horizontal" />
85- </ItemsPanelTemplate >
86- </ListBox .ItemsPanel>
87- </ListBox >
88-
89- <!-- Input media -->
90- <StackPanel
82+ <ListBox .ItemsPanel>
83+ <ItemsPanelTemplate >
84+ <VirtualizingStackPanel Orientation =" Horizontal" />
85+ </ItemsPanelTemplate >
86+ </ListBox .ItemsPanel>
87+ </ListBox >
88+
89+ <!-- Input media -->
90+ <StackPanel
9191 Name =" InputMediaList"
9292 Orientation =" Horizontal"
9393 Grid.Row=" 1" Grid.Column=" 0"
9494 HorizontalAlignment =" Center"
9595 VerticalAlignment =" Top"
9696 Height =" {Binding ActualHeight, ElementName=UIStyleList}" >
9797
98- <Button Name =" UIButtonLiveStream"
98+ <Button Name =" UIButtonLiveStream"
9999 ToolTipService.ToolTip=" Camera preview"
100100 Command =" {Binding MediaSourceCommand}"
101101 CommandParameter =" LiveStream" >
102- <Button .Content>
103- <SymbolIcon Symbol =" Video" />
104- </Button .Content>
105- </Button >
106- <Button Name =" UIButtonAcquireImage"
102+ <Button .Content>
103+ <SymbolIcon Symbol =" Video" />
104+ </Button .Content>
105+ </Button >
106+ <Button Name =" UIButtonAcquireImage"
107107 ToolTipService.ToolTip=" Take a photo"
108108 Command =" {Binding MediaSourceCommand}"
109109 CommandParameter =" AcquireImage" >
110- <Button .Content>
111- <SymbolIcon Symbol =" Camera" />
112- </Button .Content>
113- </Button >
114- <Button Name =" UIButtonFilePick"
110+ <Button .Content>
111+ <SymbolIcon Symbol =" Camera" />
112+ </Button .Content>
113+ </Button >
114+ <Button Name =" UIButtonFilePick"
115115 ToolTipService.ToolTip=" Select an image from a file"
116116 Command =" {Binding MediaSourceCommand}"
117117 CommandParameter =" FilePick" >
118- <Button .Content>
119- <SymbolIcon Symbol =" OpenFile" />
120- </Button .Content>
121- </Button >
122- <Button Name =" UIButtonInking"
118+ <Button .Content>
119+ <SymbolIcon Symbol =" OpenFile" />
120+ </Button .Content>
121+ </Button >
122+ <Button Name =" UIButtonInking"
123123 ToolTipService.ToolTip=" Draw on a canvas"
124124 Command =" {Binding MediaSourceCommand}"
125125 CommandParameter =" Inking" >
126- <Button .Content>
127- <SymbolIcon Symbol =" Edit" />
128- </Button .Content>
129- </Button >
126+ <Button .Content>
127+ <SymbolIcon Symbol =" Edit" />
128+ </Button .Content>
129+ </Button >
130130
131- </StackPanel >
131+ </StackPanel >
132132
133- <!-- Inference device -->
134- <ToggleSwitch Name =" UIToggleInferenceDevice"
133+ <!-- Inference device -->
134+ <ToggleSwitch Name =" UIToggleInferenceDevice"
135135 OnContent =" GPU"
136136 OffContent =" CPU"
137137 IsOn =" {Binding CurrentApp.UseGPU, Mode=TwoWay}"
@@ -141,90 +141,98 @@ Copyright (C) Microsoft Corporation. All rights reserved.
141141 Grid.Row=" 1"
142142 Grid.Column=" 2"
143143 HorizontalAlignment =" Center" />
144- </Grid >
145-
146- <!-- Input/output media display grid -->
147- <Grid Grid.Row=" 1" >
148- <Grid .ColumnDefinitions>
149- <ColumnDefinition Width =" 200*" />
150- <ColumnDefinition Width =" 200*" />
151- </Grid .ColumnDefinitions>
152-
153- <!-- Inking canvas -->
154- <Viewbox Stretch =" Uniform" >
155- <StackPanel Name =" UIInkControls"
144+ </Grid >
145+
146+ <!-- Input/output media display grid -->
147+ <Grid Grid.Row=" 1" >
148+ <Grid .ColumnDefinitions>
149+ <ColumnDefinition Width =" 200*" />
150+ <ColumnDefinition Width =" 200*" />
151+ </Grid .ColumnDefinitions>
152+
153+ <!-- Inking canvas -->
154+ <Viewbox Stretch =" Uniform" >
155+ <StackPanel Name =" UIInkControls"
156156 Visibility =" Collapsed"
157157 Grid.Column=" 0" >
158- <InkToolbar TargetInkCanvas =" {x:Bind UIInkCanvasInput}" VerticalAlignment =" Top" />
159- <Viewbox Stretch =" Uniform"
158+ <InkToolbar TargetInkCanvas =" {x:Bind UIInkCanvasInput}" VerticalAlignment =" Top" />
159+ <Viewbox Stretch =" Uniform"
160160 MaxWidth =" 720"
161161 MaxHeight =" 720" >
162- <Grid BorderBrush =" Black"
162+ <Grid BorderBrush =" Black"
163163 BorderThickness =" 1" >
164- <Grid Name =" UIInkGrid"
164+ <Grid Name =" UIInkGrid"
165165 Background =" White"
166166 MinWidth =" 200"
167167 MinHeight =" 200"
168168 MaxWidth =" 720"
169169 MaxHeight =" 720" >
170- <InkCanvas Name =" UIInkCanvasInput" />
171- </Grid >
172- </Grid >
173- </Viewbox >
174- </StackPanel >
175- </Viewbox >
176-
177- <!-- Camera preview -->
178- <MediaPlayerElement
179- Name =" UIMediaPlayerElement"
180- Stretch =" Uniform"
181- AreTransportControlsEnabled =" False"
182- Canvas.ZIndex=" -1"
183- MaxWidth =" 720"
184- MaxHeight =" 720"
185- Grid.Column=" 0" />
186-
187- <!-- Input image preview -->
188- <Image Name =" UIInputImage"
189- Grid.Column=" 0"
190- Stretch =" Uniform"
191- MaxWidth =" 720"
192- MaxHeight =" 720" Source =" /Assets/Input.jpg" />
193-
194- <!-- Output image panel-->
195- <Grid Grid.Column=" 1" VerticalAlignment =" Stretch" >
196- <Image Name =" UIResultImage"
197- Stretch =" Uniform"
198- MaxWidth =" 720"
199- MaxHeight =" 720" Source =" /Assets/Output.jpg" />
200-
201- <Button Name =" UIButtonSaveImage"
202- Command =" {Binding SaveCommand}"
203- ToolTipService.ToolTip=" Save the image result to a file"
204- IsEnabled =" true"
205- Background =" #FF939393"
206- HorizontalAlignment =" Right"
207- VerticalAlignment =" Bottom" >
208- <Button .Content>
209- <SymbolIcon Symbol =" Save" />
210- </Button .Content>
211- </Button >
212- </Grid >
170+ <InkCanvas Name =" UIInkCanvasInput" />
171+ </Grid >
172+ </Grid >
173+ </Viewbox >
174+ </StackPanel >
175+ </Viewbox >
176+
177+ <!-- Camera preview -->
178+ <MediaPlayerElement
179+ Name =" UIInputMediaPlayerElement"
180+ Stretch =" Uniform"
181+ AreTransportControlsEnabled =" False"
182+ Canvas.ZIndex=" -1"
183+ MaxWidth =" 720"
184+ MaxHeight =" 720"
185+ Grid.Column=" 0" />
186+
187+ <!-- Input image preview -->
188+ <Image Name =" UIInputImage"
189+ Grid.Column=" 0"
190+ Stretch =" Uniform"
191+ MaxWidth =" 720"
192+ MaxHeight =" 720" />
193+
194+ <!-- Output image panel-->
195+ <Grid Grid.Column=" 1" VerticalAlignment =" Stretch" >
196+ <Image Name =" UIResultImage"
197+ Stretch =" Uniform"
198+ MaxWidth =" 720"
199+ MaxHeight =" 720" />
213200
214- </Grid >
201+ <MediaPlayerElement
202+ Name =" UIOutputMediaPlayerElement"
203+ Stretch =" Uniform"
204+ AreTransportControlsEnabled =" False"
205+ Canvas.ZIndex=" -1"
206+ MaxWidth =" 720"
207+ MaxHeight =" 720"
208+ />
215209
216- <StackPanel Name =" UICameraSelectionControls" Orientation =" vertical" Visibility =" Collapsed" VerticalAlignment =" Bottom" HorizontalAlignment =" Left" Grid.Row=" 1" >
217- <TextBlock Text =" Camera: " Style =" {StaticResource TextBlockStyling}" />
218- <ComboBox Name =" UICmbCamera" Foreground =" White" >
219- <ComboBox .Background>
220- <SolidColorBrush Color =" Black" Opacity =" 0.3" />
221- </ComboBox .Background>
222- </ComboBox >
223- <TextBlock Text =" Preview resolution: " Style =" {StaticResource TextBlockStyling}" />
224- <TextBlock Name =" UITxtBlockPreviewProperties" Text =" 0x0" Style =" {StaticResource TextBlockStyling}" />
225- </StackPanel >
210+ <Button Name =" UIButtonSaveImage"
211+ Command =" {Binding SaveCommand}"
212+ ToolTipService.ToolTip=" Save the image result to a file"
213+ IsEnabled =" true"
214+ Background =" #FF939393"
215+ HorizontalAlignment =" Right"
216+ VerticalAlignment =" Bottom" >
217+ <Button .Content>
218+ <SymbolIcon Symbol =" Save" />
219+ </Button .Content>
220+ </Button >
221+ </Grid >
222+ </Grid >
223+
224+ <StackPanel Name =" UICameraSelectionControls" Orientation =" vertical" Visibility =" Collapsed" VerticalAlignment =" Bottom" HorizontalAlignment =" Left" Grid.Row=" 1" >
225+ <TextBlock Text =" Camera: " Style =" {StaticResource TextBlockStyling}" />
226+ <ComboBox Name =" UICmbCamera" Foreground =" White" >
227+ <ComboBox .Background>
228+ <SolidColorBrush Color =" Black" Opacity =" 0.3" />
229+ </ComboBox .Background>
230+ </ComboBox >
231+ <TextBlock Text =" Preview resolution: " Style =" {StaticResource TextBlockStyling}" />
232+ <TextBlock Name =" UITxtBlockPreviewProperties" Text =" 0x0" Style =" {StaticResource TextBlockStyling}" />
233+ </StackPanel >
226234
227- <ProgressRing Name =" UIProcessingProgressRing"
235+ <ProgressRing Name =" UIProcessingProgressRing"
228236 MaxWidth =" 720"
229237 MaxHeight =" 720"
230238 IsActive =" true"
@@ -233,20 +241,20 @@ Copyright (C) Microsoft Corporation. All rights reserved.
233241 Grid.Row=" 2"
234242 Margin =" 10,0,0,0" Foreground =" #FF02487F" />
235243
236- <Border x : Name =" UIStatusBorder" Grid.Row=" 2" Background =" #CC348508" >
237- <StackPanel Orientation =" Horizontal" HorizontalAlignment =" Center" VerticalAlignment =" Center" >
238- <TextBlock Margin =" 0,0,10,0" Visibility =" Visible" >
244+ <Border x : Name =" UIStatusBorder" Grid.Row=" 2" Background =" #CC348508" >
245+ <StackPanel Orientation =" Horizontal" HorizontalAlignment =" Center" VerticalAlignment =" Center" >
246+ <TextBlock Margin =" 0,0,10,0" Visibility =" Visible" >
239247 <Run FontWeight =" Bold" x : Uid =" TxtCapture" ></Run >
240248 <Run Text =" {x:Bind dummyFPS}" ></Run >
241- </TextBlock >
242- <TextBlock Margin =" 10,0,0,0" Visibility =" Visible" >
249+ </TextBlock >
250+ <TextBlock Margin =" 10,0,0,0" Visibility =" Visible" >
243251 <Run FontWeight =" Bold" x : Uid =" TxtRender" ></Run >
244252 <Run Text =" {x:Bind dummyFPS}" FontWeight =" Normal" ></Run >
245- </TextBlock >
246- </StackPanel >
247- </Border >
253+ </TextBlock >
254+ </StackPanel >
255+ </Border >
248256
249- </Grid >
257+ </Grid >
250258
251- </Grid >
259+ </Grid >
252260</Page >
0 commit comments