Skip to content

Commit 43c7df9

Browse files
committed
Start samples when loaded
1 parent cda0630 commit 43c7df9

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/ImageClassifier/ImageClassifier.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ public ImageClassifier()
125125
AllModelsGrid.ItemsSource = allModels;
126126
AllModelsGrid.SelectRange(new ItemIndexRange(0, 1));
127127
AllModelsGrid.SelectionChanged += AllModelsGrid_SelectionChanged;
128+
129+
BasicGridView.SelectedIndex = 0;
128130
}
129131

130132
private void EnsureInitialized()

Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/ImageSharpInterop/ImageSharpInterop.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public ImageSharpInterop()
6464
_inferenceSession = CreateLearningModelSession("ms-appx:///Models/squeezenet1.1-7.onnx");
6565
_postProcessingSession = CreateLearningModelSession(TensorizationModels.SoftMaxThenTopK(TopK));
6666

67+
BasicGridView.SelectedIndex = 0;
6768
}
6869

6970
#pragma warning disable CA1416 // Validate platform compatibility

Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/OpenCVInterop/OpenCVInterop.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
</Grid>
107107
</Border>
108108
<Grid Background="LightGray" HorizontalAlignment="Center" Height="200" Width="200" VerticalAlignment="Top">
109-
<Image x:Name="InputImage" Stretch="UniformToFill" Height="200" HorizontalAlignment="Center"/>
109+
<Image x:Name="InputImage" Stretch="UniformToFill" Height="200" HorizontalAlignment="Center"/>
110110
</Grid>
111111
<Button Content="Classify" x:Name="InferOriginal" IsEnabled="false" FontFamily="Segoe UI Light" Typography.Capitals="AllSmallCaps" Typography.StylisticSet4="True"
112112
Style="{StaticResource AccentButtonStyle}" Width="200"
@@ -120,7 +120,7 @@
120120
</Grid>
121121
</Border>
122122
<Grid Background="LightGray" HorizontalAlignment="Center" Height="200" Width="200" VerticalAlignment="Top">
123-
<Image x:Name="NoisyImage" Stretch="UniformToFill" Height="200" HorizontalAlignment="Center"/>
123+
<Image x:Name="NoisyImage" Stretch="UniformToFill" Height="200" HorizontalAlignment="Center"/>
124124
</Grid>
125125
<Button Content="Classify" x:Name="InferNoisy" IsEnabled="false" FontFamily="Segoe UI Light" Typography.Capitals="AllSmallCaps" Typography.StylisticSet4="True"
126126
Style="{StaticResource AccentButtonStyle}" Width="200"
@@ -134,7 +134,7 @@
134134
</Grid>
135135
</Border>
136136
<Grid Background="LightGray" HorizontalAlignment="Center" Height="200" Width="200" VerticalAlignment="Top">
137-
<Image x:Name="DenoisedImage" Stretch="UniformToFill" Height="200" HorizontalAlignment="Center"/>
137+
<Image x:Name="DenoisedImage" Stretch="UniformToFill" Height="200" HorizontalAlignment="Center"/>
138138
</Grid>
139139
<Button Content="Classify" x:Name="InferDenoised" IsEnabled="false" FontFamily="Segoe UI Light" Typography.Capitals="AllSmallCaps" Typography.StylisticSet4="True"
140140
Style="{StaticResource AccentButtonStyle}" Width="200"

Samples/WinMLSamplesGallery/WinMLSamplesGallery/Samples/OpenCVInterop/OpenCVInterop.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ public OpenCVInterop()
118118
_imagenetLabels = LoadLabels("ms-appx:///InputData/sysnet.txt");
119119
_inferenceSession = CreateLearningModelSession("ms-appx:///Models/squeezenet1.1-7.onnx");
120120
_postProcessingSession = CreateLearningModelSession(TensorizationModels.SoftMaxThenTopK(TopK));
121+
122+
BasicGridView.SelectedIndex = 0;
121123
}
122124

123125
#pragma warning disable CA1416 // Validate platform compatibility

0 commit comments

Comments
 (0)