diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml new file mode 100644 index 0000000..d9a8e36 --- /dev/null +++ b/.github/workflows/gitleaks.yaml @@ -0,0 +1,38 @@ +name: Secret Value found! +on: + push: + public: +jobs: + scan: + name: gitleaks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install the gitleaks + run: wget https://github.com/zricethezav/gitleaks/releases/download/v8.15.2/gitleaks_8.15.2_linux_x64.tar.gz + shell: pwsh + - name: Extract the tar file + run: tar xzvf gitleaks_8.15.2_linux_x64.tar.gz + - name: Generate the report + id: gitleaks + run: $GITHUB_WORKSPACE/gitleaks detect -s $GITHUB_WORKSPACE -f json -r $GITHUB_WORKSPACE/leaksreport.json + shell: bash + continue-on-error: true + - name: Setup NuGet.exe + if: steps.gitleaks.outcome != 'success' + uses: nuget/setup-nuget@v1 + with: + nuget-version: latest + - name: Install the dotnet + if: steps.gitleaks.outcome != 'success' + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '3.1.x' + - name: Install the report tool packages + if: steps.gitleaks.outcome != 'success' + run: | + nuget install "Syncfusion.Email" -source "https://nexus.syncfusion.com/repository/nuget-hosted/" + dir $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1 + dotnet $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1/Email.dll "citeam@syncfusion.com" "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" + exit 1 \ No newline at end of file diff --git a/README.md b/README.md index cb68427..589a779 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,83 @@ # Working with WPF DockingManager and Prism -This repository contains the sample that shows WPF DockingManager for creating MVVM applications using Prism. +Prism is a practice of building loosely coupled applications in WPF. It is intended to provide flexibility for testing and maintaining applications that are maintained in long term. -Prism 6.1 - https://help.syncfusion.com/wpf/docking/pattern-and-practices#configuring-dockingmanager-with-prism-61 -Prism 7.1 - https://help.syncfusion.com/wpf/docking/pattern-and-practices#configuring-dockingmanager-with-prism-71 \ No newline at end of file +## PRISM 6.1 +Essential WPF controls are flexible with all the Prism versions. This section explains about creating a simple application using DockingManager in PRISM 6.1 pattern. + +## Setting up WPF application +1. Create a WPF application and rename the file MainWindow.xaml as Shell.xaml and MainWindow.xaml.cs as Shell.xaml.cs. + +2. Rename the class name MainWindow as Shell in all the occurrences. + +3. Add reference to the following assemblies + +* Prism +* Prism.WPF +* Prism.Unity.WPF +* Microsoft.Practices.ServiceLocation +* Microsoft.Practices.Unity +* Microsoft.Practices.Unity.Configuration +* Microsoft.Practices.Unity.RegistrationByConvention + +4. In the Shell.xaml file, add the namespace definition for Prism Library as given below: + +# XAML + + + +5. Create an instance of the control in Shell.xaml file and set the attached property RegionManager.RegionName for it. Here we have used DockingManager control. + +# XAML + + +When we create an instance for Shell, it will resolve the value of the RegionManager.RegionName attached property and create a region for connecting it with the DockingManager. + +# Configuring DockingManager with Prism 7.1 + +This section explains about creating a simple application using DockingManager in PRISM 7.1 pattern. + +## Setting up WPF application + +Step 1: Create a WPF application and rename the file MainWindow.xaml as Shell.xaml and MainWindow.xaml.cs as Shell.xaml.cs. + +Step 2: Rename the class name MainWindow as Shell in all the occurrences. + +Step 3: Add the following required assembly references to the project: + +* Prism +* Prism.WPF +* Prism.Unity.WPF +* Microsoft.Practices.ServiceLocation +* Microsoft.Practices.Unity +* Microsoft.Practices.Unity.Configuration +* Microsoft.Practices.Unity.RegistrationByConvention + +Step 4: In the Shell.xaml file, add the namespace definition for Prism Library as given below: + +# XAML + + + +Step 5: Create an instance of the control in Shell.xaml file and set the attached property RegionManager.RegionName for it. Here we have used DockingManager control. + +# XAML + + +When we create an instance for Shell, it will resolve the value of the RegionManager.RegionName attached property and create a region for connecting it with the DockingManager. + +Step 6: Add the following required assembly references in App.xaml.cs file. + +Step 7: Inherit the App class from PrismApplication in App.xaml.cs file. + +Step 8: Override the methods CreateShell, RegisterTypes and CreateModuleCatalog \ No newline at end of file