Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPF-62014-Updated ReadMe file #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/gitleaks.yaml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]" "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE"
exit 1
83 changes: 80 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
## 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
<Window x:Class="DockingManagerPrism.App.MainWindow "
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
xmlns:prism="http://prismlibrary.com/"
Title="MainWindow" Height="350" Width="525">
</Window>

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
<syncfusion:DockingManager prism:RegionManager.RegionName="MainRegion" UseDocumentContainer="True" DockFill="True" DockFillDocumentMode="Normal"/>

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
<Window x:Class="DockingManagerPrism.App.MainWindow "
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
xmlns:prism="http://prismlibrary.com/"
Title="MainWindow" Height="350" Width="525">
</Window>

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
<syncfusion:DockingManager prism:RegionManager.RegionName="MainRegion" UseDocumentContainer="True" DockFill="True" DockFillDocumentMode="Normal"/>

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