Browse Source

Moved the Emgu CV initialization code from MainPage.xaml.cs to App.xaml.cs

pull/768/merge
Canming Huang 6 months ago
parent
commit
16647f1638
  1. 2
      Emgu.CV.Example/MAUI/MauiDemoApp/App.xaml.cs
  2. 2
      Emgu.CV.Example/MAUI/MauiDemoApp/MainPage.xaml.cs
  3. 4
      cmake/Emgu.CV.runtime.maui.Package.README.md.in

2
Emgu.CV.Example/MAUI/MauiDemoApp/App.xaml.cs

@ -5,6 +5,8 @@
public App()
{
InitializeComponent();
Emgu.CV.Platform.Maui.MauiInvoke.Init();
}
protected override Window CreateWindow(IActivationState? activationState)

2
Emgu.CV.Example/MAUI/MauiDemoApp/MainPage.xaml.cs

@ -18,7 +18,7 @@ namespace MauiDemoApp
{
InitializeComponent();
Emgu.CV.Platform.Maui.MauiInvoke.Init();
#if DEBUG
CvInvoke.LogLevel = LogLevel.Verbose; //LogLevel.Debug;
#endif

4
cmake/Emgu.CV.runtime.maui.Package.README.md.in

@ -12,10 +12,10 @@ Release note can be found at
## Setup
Please make sure to call `Emgu.CV.Platform.Maui.MauiInvoke.Init()` before making any other calls to Emgu CV library in MAUI. You can put that in your MainPage.xaml.cs file:
Please make sure to call `Emgu.CV.Platform.Maui.MauiInvoke.Init()` before making any other calls to Emgu CV library in MAUI. You can put that in your App.xaml.cs file:
```csharp
public MainPage()
public App()
{
InitializeComponent();

Loading…
Cancel
Save