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/DockingDemo/DockingManagerMVVM/Image/DockingManager MVVM.png b/DockingDemo/DockingManagerMVVM/Image/DockingManager MVVM.png new file mode 100644 index 0000000..3743634 Binary files /dev/null and b/DockingDemo/DockingManagerMVVM/Image/DockingManager MVVM.png differ diff --git a/DockingDemo/DockingManagerMVVM/Image/ProjectView..png b/DockingDemo/DockingManagerMVVM/Image/ProjectView..png new file mode 100644 index 0000000..9b0d6ed Binary files /dev/null and b/DockingDemo/DockingManagerMVVM/Image/ProjectView..png differ diff --git a/README.md b/README.md index b7596b7..3fbd022 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,23 @@ # Working with WPF DockingManager and MVVM +## MVVM +This section explains how to adapt the Syncfusion docking manager to an MVVM application. Since the WPF DockingManager is not an Items Control, it is not possible to have a traditional ItemsSource binding to a collection of objects in the view model. However this can be achieved by creating a wrapper or adapter for the DockingManager. -This repository contains a sample that shows the WPF DockingManager in MVVM application to create MVVM adapter. +1. DocumentsView - The pane that lists all the available documents and tooltip display the path of the document. +2. PropertiesView - The pane that shows the properties of a document. Our PropertyGrid control is used here. +3. DocumentView - The pane that uses the WPF flow-document reader to display the content of a file. +4. CommandView - The view has two commands: Open Document and Exit. Executing an Open Document action opens the Open File Dialog. The document that opened, added to the existing documents list. Other commands like Close Document and New Document can also be implemented the same way. +5. The project structure looks like this: -https://help.syncfusion.com/wpf/docking/pattern-and-practices#mvvm +![ProjectView](DockingDemo/DockingManagerMVVM/Image/ProjectView..png) + +## Docking Adapter +The adapter is simply a user control that contains DockingManager as its content. The adapter has two properties — ItemsSource and ActiveDocument. Binding a collection of objects to the ItemsSource property triggers a collection change where the adapter creates a corresponding Framework element, example: ContentControl in the DockingManager, setting the underlying data context of the control to the business model. + +## C# + + + + +![MVVM](DockingDemo/DockingManagerMVVM/Image/DockingManager%20MVVM.png) + +For more details please refer [DockingManager and MVVM](https://help.syncfusion.com/wpf/docking/pattern-and-practices#mvvmlight) \ No newline at end of file