Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
41c9bb9
implemented BreadcrumbBar
IvanDmitriev1 Jan 14, 2023
f5f694e
properly implemented hiding of the icon
IvanDmitriev1 Jan 15, 2023
19c23b5
added BreadcrumbBarPage in Gallery
IvanDmitriev1 Jan 15, 2023
3d4873b
removed duplicate code
IvanDmitriev1 Jan 16, 2023
09d45a9
implemented ContentDialog
IvanDmitriev1 Jan 17, 2023
de4f9bd
added ContentDialogPage in Gallery
IvanDmitriev1 Jan 17, 2023
72b6f64
implemented DefaultButton property
IvanDmitriev1 Jan 17, 2023
5935f12
deleted DialogPage in gallery
IvanDmitriev1 Jan 17, 2023
83d385a
deleted Dialog control
IvanDmitriev1 Jan 17, 2023
06854d7
refactored MessageBox control
IvanDmitriev1 Jan 17, 2023
fb98117
added support for CancellationToken
IvanDmitriev1 Jan 17, 2023
908263c
implemented resizing to content width and height, added support for C…
IvanDmitriev1 Jan 17, 2023
f515b0d
implemented resizing to content width and height
IvanDmitriev1 Jan 17, 2023
0095ba0
hiding SecondSpacer if two buttons are disabled
IvanDmitriev1 Jan 17, 2023
516b391
Update MessageBox.xaml
IvanDmitriev1 Jan 17, 2023
815fe75
fixed title bar
IvanDmitriev1 Jan 18, 2023
b2f9ef0
disabled window resizing and positioning the window in the center of …
IvanDmitriev1 Jan 18, 2023
0a2ac3f
hide window for task bar
IvanDmitriev1 Jan 18, 2023
714ee09
corrected dialog width
IvanDmitriev1 Jan 19, 2023
8f5d71b
corrected MessageBox width
IvanDmitriev1 Jan 19, 2023
b27472a
added support for icons on buttons
IvanDmitriev1 Jan 19, 2023
bd51126
added support for icons on buttons, updated documentation
IvanDmitriev1 Jan 19, 2023
9f3a4b6
updated documentation
IvanDmitriev1 Jan 19, 2023
be96638
Fixing publishing issue #483 based @MrCosmo suggestion
Aybex Jan 20, 2023
8d9e011
added BreadcrumbBarItemClickedEvent delegate
IvanDmitriev1 Jan 21, 2023
538ae4b
unsubscribed from event
IvanDmitriev1 Jan 21, 2023
7ffeba8
added TitleBarButton
IvanDmitriev1 Jan 22, 2023
2693588
moved HwndSourceHook to the title bar
IvanDmitriev1 Jan 22, 2023
e035a1c
clean up
IvanDmitriev1 Jan 22, 2023
7e7b824
deleted SnapLayout and SnapLayoutButton
IvanDmitriev1 Jan 22, 2023
50822cc
Merge pull request #500 from IvanDmitriev1/breadcrumbBar
pomianowski Jan 22, 2023
0d396b8
implement dropdown animation with ease-out.
Jan 22, 2023
356e731
deleted restore button
IvanDmitriev1 Jan 23, 2023
7df93e4
clean up
IvanDmitriev1 Jan 23, 2023
2386f95
added closing the window by double clicking on the icon
IvanDmitriev1 Jan 23, 2023
83fe0de
changed location of the TitleBarButtonType
IvanDmitriev1 Jan 23, 2023
24a6f03
Merge pull request #508 from IvanDmitriev1/Snap-layout
pomianowski Jan 23, 2023
ef9a3d2
Fix props location
pomianowski Jan 23, 2023
386a029
Update breadcrumb
pomianowski Jan 23, 2023
5de0493
Add Monaco editor because why not
pomianowski Jan 23, 2023
cdf7f77
Fix typo
pomianowski Jan 23, 2023
af500a9
Fix typo
pomianowski Jan 23, 2023
7021685
Merge pull request #506 from Aybex/development
pomianowski Jan 23, 2023
ed0e862
Revert "deleted Dialog control"
IvanDmitriev1 Jan 24, 2023
f5338f4
Revert "deleted DialogPage in gallery"
IvanDmitriev1 Jan 24, 2023
8a60138
uncommented dialog control
IvanDmitriev1 Jan 24, 2023
6fcc1c3
added license
IvanDmitriev1 Jan 24, 2023
92ca10f
added Hiding event
IvanDmitriev1 Jan 24, 2023
f4eb431
deleted PART_ContentScroll
IvanDmitriev1 Jan 24, 2023
76f6f38
improved resizing, added DialogMaxWidth, DialogMaxHeight, DialogMargin
IvanDmitriev1 Jan 24, 2023
3c9c308
added TermsOfUseContentDialog
IvanDmitriev1 Jan 24, 2023
bd1bfe6
deleted Hiding
IvanDmitriev1 Jan 24, 2023
cfaa1cf
removed IDisposable
IvanDmitriev1 Jan 24, 2023
2c69cca
clean up
IvanDmitriev1 Jan 25, 2023
c4c07e8
clean up
IvanDmitriev1 Jan 25, 2023
ef0e5f3
nullable annotation
IvanDmitriev1 Jan 25, 2023
caf8faf
removed duplicated code in NavigationView.Base
IvanDmitriev1 Jan 25, 2023
b42807f
added BreadcrumbBar support
IvanDmitriev1 Jan 25, 2023
45c8ee5
Merge pull request #507 from mashisora/development
pomianowski Jan 25, 2023
20f2916
Merge pull request #504 from IvanDmitriev1/MessageBox
pomianowski Jan 25, 2023
da11d1e
added dictionaries
IvanDmitriev1 Jan 25, 2023
da992b5
start using NavigationViewsDictionary dictionaries
IvanDmitriev1 Jan 25, 2023
55ce6bb
moved navigation aware login to the NavigationViewContentPresenter
IvanDmitriev1 Jan 25, 2023
2fe8b52
removed duplicate code
IvanDmitriev1 Jan 25, 2023
19d338f
stared implementing navigation stack
IvanDmitriev1 Jan 26, 2023
837553b
fixed backwards navigation
IvanDmitriev1 Jan 26, 2023
3ff6db0
added multilevel navigation demo page
IvanDmitriev1 Jan 26, 2023
1b86771
implemented navigation without INavigationViewItem, added attached He…
IvanDmitriev1 Jan 26, 2023
e300d6e
implemented ClearNavigationStack method
IvanDmitriev1 Jan 26, 2023
f5691fe
almost implemented RecreateNavigationStackFromHistory method
IvanDmitriev1 Jan 26, 2023
e52b0bd
added a real complex navigation stack history
IvanDmitriev1 Jan 26, 2023
dc2705a
moved ActivateMenuItem to the INavigationViewItem
IvanDmitriev1 Jan 26, 2023
3ff75fd
added default value for the MenuItems and FooterMenuItems properties
IvanDmitriev1 Jan 26, 2023
994740d
optimized ClearNavigationStack method
IvanDmitriev1 Jan 26, 2023
c3438f2
improved multilevel navigation demo
IvanDmitriev1 Jan 26, 2023
56dad5e
added Navigating event
IvanDmitriev1 Jan 26, 2023
dba5cef
added license
IvanDmitriev1 Jan 27, 2023
6588c1e
added EnableDebugMessages property
IvanDmitriev1 Jan 27, 2023
216ff0b
start using System.Buffers.ArrayPool
IvanDmitriev1 Jan 27, 2023
370894a
small changes
IvanDmitriev1 Jan 27, 2023
0231438
added license
IvanDmitriev1 Jan 27, 2023
5f588bb
SelectedItem changed when it from menu
IvanDmitriev1 Jan 27, 2023
ac32a67
Clean up
IvanDmitriev1 Jan 28, 2023
37dffae
Changed naming
IvanDmitriev1 Jan 29, 2023
4f28a6b
Added support for c# 11
IvanDmitriev1 Jan 29, 2023
f40eb68
Wpf.Ui.csproj clean up
IvanDmitriev1 Jan 29, 2023
2beb78e
Fixed typo
IvanDmitriev1 Jan 29, 2023
8b2ec34
Implemented ui:Image
Aybex Jan 29, 2023
d1cae50
Merge branch 'development' of https://github.com/Aybex/wpfui into dev…
Aybex Jan 29, 2023
64f0c09
Added doc and liscense
Aybex Jan 30, 2023
d4c6cc9
Added Background
Aybex Jan 30, 2023
1f855a8
Updated Gallery to ui:Image
Aybex Jan 30, 2023
a10c21f
Merge pull request #512 from IvanDmitriev1/navigation
pomianowski Jan 31, 2023
e31508e
Merge pull request #502 from IvanDmitriev1/ContentDialog
pomianowski Jan 31, 2023
312b784
Merge pull request #516 from IvanDmitriev1/csharp-11-support
pomianowski Jan 31, 2023
4526e67
Updated navigation
IvanDmitriev1 Feb 1, 2023
9c7f1d0
Added BreadcrumbBar folder
IvanDmitriev1 Feb 1, 2023
b99c2c7
Added TitleBar folder
IvanDmitriev1 Feb 1, 2023
03a6b34
Added MessageBox folder
IvanDmitriev1 Feb 1, 2023
85f4113
Added ContentDialog folder
IvanDmitriev1 Feb 1, 2023
55fc713
Deleted Dialog control
IvanDmitriev1 Feb 1, 2023
999bdba
Removed strange Clipboard static class
IvanDmitriev1 Feb 1, 2023
04e8399
Changed to internal
IvanDmitriev1 Feb 1, 2023
3717d88
Added VirtualizingControls folder
IvanDmitriev1 Feb 1, 2023
fea8ba0
Added ThumbRate folder
IvanDmitriev1 Feb 1, 2023
44e0818
Changed .editorconfig so that it is the same as in the dotnet/runtime…
IvanDmitriev1 Feb 1, 2023
a1b734d
Added NumberBox folder
IvanDmitriev1 Feb 1, 2023
5d18782
Fixed a bug where the frame reacted to the back and forward mouse but…
IvanDmitriev1 Feb 1, 2023
393e5db
Fixed menu items in the NavigationViewItem
IvanDmitriev1 Feb 2, 2023
7917d2f
Added NewAutoSuggestBox
IvanDmitriev1 Feb 2, 2023
542f22f
Added new properties
IvanDmitriev1 Feb 2, 2023
aad74a4
Implemented selection object from suggest list
IvanDmitriev1 Feb 3, 2023
2fe9d92
Added events
IvanDmitriev1 Feb 3, 2023
9705c6f
Implemented UpdateTextOnSelect
IvanDmitriev1 Feb 3, 2023
203ae86
Closing SuggestionsList after selecting an item with the left mouse b…
IvanDmitriev1 Feb 3, 2023
0569ce7
Clean up
IvanDmitriev1 Feb 3, 2023
7d57da5
Addde control to the gallery
IvanDmitriev1 Feb 3, 2023
616c9af
Clean up
IvanDmitriev1 Feb 3, 2023
6b3063a
Implemented AutoSuggestionBoxTextChangeReason.ProgrammaticChange
IvanDmitriev1 Feb 3, 2023
4d16dee
Merge pull request #523 from IvanDmitriev1/NavigationViewItem-fix
pomianowski Feb 3, 2023
7af997b
Merge pull request #522 from IvanDmitriev1/Mouse-back-button-fix
pomianowski Feb 3, 2023
e5753ff
Update demo apps windows
pomianowski Feb 3, 2023
134fd21
AutoSuggestBoxPage update
IvanDmitriev1 Feb 3, 2023
3291c37
Merge branch 'development' into Control-updates
IvanDmitriev1 Feb 3, 2023
8f7e52a
Extend `NavigationViewItem` constructors
pomianowski Feb 3, 2023
c0c4d7d
Add Discord server
pomianowski Feb 3, 2023
dac048a
Added and implemented IContentDialogService
IvanDmitriev1 Feb 3, 2023
a724a77
Merge branch 'Control-updates' of https://github.com/IvanDmitriev1/wp…
IvanDmitriev1 Feb 3, 2023
da0b6b5
Add CLA bot
pomianowski Feb 3, 2023
ef92d12
The popup closes when the focus is lost
IvanDmitriev1 Feb 4, 2023
f1e8310
Started using DisplayMemberPath
IvanDmitriev1 Feb 4, 2023
31e10e5
Implemented default filtering
IvanDmitriev1 Feb 4, 2023
1ad3b8e
Added SuggestionsPopupClosed event
IvanDmitriev1 Feb 4, 2023
73c517b
AutoSuggestBoxPage cleanup
IvanDmitriev1 Feb 4, 2023
eeb5316
Deleted original AutoSuggestBox
IvanDmitriev1 Feb 4, 2023
63ac000
Renamed style
IvanDmitriev1 Feb 4, 2023
69bb841
TitleBar cleanup
IvanDmitriev1 Feb 4, 2023
9e4be77
Implemented closing AutoSuggestBox with escape key
IvanDmitriev1 Feb 4, 2023
6cce8d6
Deleted SuggestionsPopupClosed event
IvanDmitriev1 Feb 4, 2023
a2a6f70
Update AutoSuggestBox.cs
IvanDmitriev1 Feb 4, 2023
87f203c
Add `Menu` control to Gallery
pomianowski Feb 4, 2023
5f6b37d
Fixed bug
IvanDmitriev1 Feb 5, 2023
49bb5bf
Changed namespace
IvanDmitriev1 Feb 5, 2023
5dc7d16
Changed namespace
IvanDmitriev1 Feb 5, 2023
b311314
Update VisualStudioToolsManifest.xml
IvanDmitriev1 Feb 5, 2023
030e025
Adding original Image example in Gallery
Aybex Feb 5, 2023
bb95879
Added keyboard shortcut for AutoSuggestBox
IvanDmitriev1 Feb 6, 2023
b5c2601
Merge pull request #517 from Aybex/development
pomianowski Feb 6, 2023
2f67c00
Firs implementation of the pane toggle button
IvanDmitriev1 Feb 8, 2023
a99b6c8
Merge pull request #521 from IvanDmitriev1/Control-updates
pomianowski Feb 8, 2023
dd71c08
Added PaneTitle
IvanDmitriev1 Feb 8, 2023
1c0bb63
Merge branch 'development' into AutoSuggestBox-refactoring
IvanDmitriev1 Feb 8, 2023
3f17f96
Update NavigationView.Base.cs
IvanDmitriev1 Feb 8, 2023
beb7383
Found the way how to override margin effect but nope
IvanDmitriev1 Feb 8, 2023
9f39690
Merge branch 'development' into Navigation-expander
IvanDmitriev1 Feb 8, 2023
0d70824
Merge pull request #524 from IvanDmitriev1/AutoSuggestBox-refactoring
pomianowski Feb 8, 2023
eb83664
Merge branch 'development' into Navigation-expander
IvanDmitriev1 Feb 9, 2023
c4b6464
Implemented PaneTitle
IvanDmitriev1 Feb 9, 2023
07aaf3b
Implemented clicking on the AutoSuggestBox Symbol Button
IvanDmitriev1 Feb 9, 2023
2035199
Started using TitleBar in NavigationView
IvanDmitriev1 Feb 9, 2023
16785d2
Implemented changing the state of the navigationView when the window …
IvanDmitriev1 Feb 9, 2023
912e5c0
Implemented navigation taking into account the panel in a compact state
IvanDmitriev1 Feb 9, 2023
0ab6463
Cleanup
IvanDmitriev1 Feb 9, 2023
abad074
Update NavigationView.Navigation.cs
IvanDmitriev1 Feb 9, 2023
a6fb3c3
Fixed mistake
IvanDmitriev1 Feb 10, 2023
fb43b69
Fixed style issues
IvanDmitriev1 Feb 11, 2023
33e89b6
Refactored Activate and Deactivate methods in the NavigationViewItem
IvanDmitriev1 Feb 11, 2023
6f93a4c
Update NavigationView.xaml
IvanDmitriev1 Feb 11, 2023
90c52aa
Merge pull request #527 from IvanDmitriev1/Navigation-expander
pomianowski Feb 11, 2023
7cbce94
Added IconElement
IvanDmitriev1 Feb 21, 2023
7674ae8
Added ImageIcon
IvanDmitriev1 Feb 21, 2023
0a567c2
Fixed major problems
IvanDmitriev1 Feb 22, 2023
183be6c
Added license
IvanDmitriev1 Feb 22, 2023
b8295ce
Added IconElement to the Button
IvanDmitriev1 Feb 23, 2023
78bf7ab
Added IconElement to the TextBox
IvanDmitriev1 Feb 23, 2023
939b4ba
Added IconElement to the Snackbar, CardAction, CardExpander
IvanDmitriev1 Feb 23, 2023
dacabd9
Added IconSource
IvanDmitriev1 Feb 23, 2023
5e211c0
Added IconElement to the BreadcrumbBar and NavigationViewItem
IvanDmitriev1 Feb 24, 2023
ff39c79
Added IconElement to the TitleBar and ContentDialog
IvanDmitriev1 Feb 24, 2023
fe2cc8b
Fixed activation of the NavigationViewItem
IvanDmitriev1 Feb 24, 2023
1a07b5a
Improved SymbolIconExtension
IvanDmitriev1 Feb 24, 2023
e2ff25c
Changed SymbolIcon to IconElements.SymbolIcon
IvanDmitriev1 Feb 24, 2023
9c9bfdc
Added IconElement to the MenuItem
IvanDmitriev1 Feb 24, 2023
b48259b
Deleted original SymbolIcon
IvanDmitriev1 Feb 24, 2023
e49765e
Small fixes
IvanDmitriev1 Feb 24, 2023
17b0152
Clean-up
IvanDmitriev1 Feb 24, 2023
770238b
Update FontIconPage.xaml
IvanDmitriev1 Feb 24, 2023
a0e82b8
Updated documentation
IvanDmitriev1 Feb 24, 2023
db8423f
Update IconElementConverter.cs
IvanDmitriev1 Feb 25, 2023
02a6ef6
Update MainWindow.xaml
IvanDmitriev1 Mar 3, 2023
3bba186
Enable CanContentScroll only on virtualization
Korjam Feb 27, 2023
5ae2524
Merge pull request #551 from Korjam/bugfix/550-tree-view-scroll
pomianowski Mar 3, 2023
6f0ca2d
Add OnNavigatedFrom handler
Nice3point Mar 13, 2023
74fdf9a
Merge pull request #559 from Nice3point2/development
pomianowski Mar 15, 2023
52c54cd
Update docs
pomianowski Mar 15, 2023
8b47ac5
Merge branch 'development' of github.com:lepoco/wpfui into development
pomianowski Mar 15, 2023
74578a8
Deleted not deleted xaml namespace
IvanDmitriev1 Mar 16, 2023
ad09c69
Deleted not deleted xaml namespace
IvanDmitriev1 Mar 16, 2023
2b54a5b
Changed ContentControl to ContentPresenter
IvanDmitriev1 Mar 16, 2023
91a7089
Merge pull request #543 from IvanDmitriev1/IconElement-implementation
pomianowski Mar 17, 2023
1204d38
Add TabView placeholders
pomianowski Mar 17, 2023
e278df5
Discard tuples in color extensions
pomianowski Mar 17, 2023
b336516
Update monaco controller
pomianowski Mar 17, 2023
00fc6a7
Update docs
pomianowski Mar 17, 2023
ea33434
feat: Add Expander to Control Gallery
xmine64 Apr 1, 2023
7d83ce6
fix(Expander): update animation to match WinUI
xmine64 Apr 1, 2023
a40fa42
fix(Styles): use inner border on Button and CheckBox
xmine64 Apr 1, 2023
6798bb7
Added Bottom on NavigationViewPaneDisplayMode
a3305 Apr 7, 2023
d662f06
Small improvements to the ContentDialog
IvanDmitriev1 Apr 7, 2023
ce7c071
Added support for ContentTemplateSelector in the ContentDialog
IvanDmitriev1 Apr 7, 2023
7f7b63a
Updated MessageBox just like ContentDialog
IvanDmitriev1 Apr 7, 2023
0af438f
Removed OnTemplateButtonClick method
IvanDmitriev1 Apr 10, 2023
423c2bd
Update MessageBox.cs
IvanDmitriev1 Apr 10, 2023
1914263
Merge pull request #583 from IvanDmitriev1/ContentDialog-improvements
pomianowski Apr 17, 2023
358f726
Merge pull request #574 from xmine64/expander_animation
pomianowski Apr 21, 2023
ef5b1ad
Merge pull request #575 from xmine64/button_inner_border
pomianowski Apr 21, 2023
59bd758
Merge branch 'development' of github.com:lepoco/wpfui into development
pomianowski Apr 23, 2023
922c67c
Update docs
pomianowski Apr 23, 2023
dd52f2a
Bump preview version
pomianowski Apr 23, 2023
98ccb6d
Merge pull request #582 from zh3305/development
pomianowski Apr 23, 2023
afe2cd0
Merge branch 'development' of github.com:lepoco/wpfui into development
pomianowski Apr 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .clabot
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"contributors": [
"pomianowski"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: nuget restore src\Wpf.Ui.sln

- name: Build the solution
run: msbuild src\Wpf.Ui.sln -p:Configuration=Release -p:Platform="Any CPU" -p:GITHUB_ACTIONS=True -m -graph -isolate
run: msbuild src\Wpf.Ui.sln -p:Configuration=Release -p:Platform="Any CPU" -p:GITHUB_ACTIONS=True -p:ContinuousIntegrationBuild=true -m -graph -isolate

- name: Publish the package to NuGet.org
run: nuget push src\Wpf.Ui\bin\Release\*.nupkg -NonInteractive -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json'
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: DotNet Docs

on:
pull_request:
branches: [development]
push:
branches: [development]

workflow_dispatch:

jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- name: Chekout
uses: actions/checkout@v3
- name: Dotnet Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x

- run: dotnet tool update -g docfx
- run: docfx docs/docfx.json

- name: Deploy

uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
## files generated by popular Visual Studio add-ons.
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# DocFX
docs/api/

# User-specific files
*.rsuser
*.suo
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contribution Guidelines

and as always, todo

## Prerequisites

## Code

### Code style

## Other general information

## Acknowledgement
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
[Created with ❤ in Poland by lepo.co](https://dev.lepo.co/)
A simple way to make your application written in WPF keep up with modern design trends. Library changes the base elements like `Page`, `ToggleButton` or `List`, and also includes additional controls like `Navigation`, `NumberBox`, `Dialog` or `Snackbar`.

[![GitHub license](https://img.shields.io/github/license/lepoco/wpfui)](https://github.com/lepoco/wpfui/blob/master/LICENSE) [![Nuget](https://img.shields.io/nuget/v/WPF-UI)](https://www.nuget.org/packages/WPF-UI/) [![Nuget](https://img.shields.io/nuget/dt/WPF-UI?label=nuget-downloads)](https://www.nuget.org/packages/WPF-UI/) [![VS 2022 Downloads](https://img.shields.io/visual-studio-marketplace/i/lepo.WPF-UI?label=vs-2022-downloads)](https://marketplace.visualstudio.com/items?itemName=lepo.WPF-UI) [![Github Downloads](https://img.shields.io/github/downloads/lepoco/wpfui/total.svg?label=github-downloads)](https://github.com/lepoco/wpfui/releases)
[![Sponsors](https://img.shields.io/github/sponsors/lepoco)](https://github.com/sponsors/lepoco)
[![Discord](https://img.shields.io/discord/1071051348348514375?label=discord)](https://discord.gg/AR9ywDUwGq) [![GitHub license](https://img.shields.io/github/license/lepoco/wpfui)](https://github.com/lepoco/wpfui/blob/master/LICENSE) [![Nuget](https://img.shields.io/nuget/v/WPF-UI)](https://www.nuget.org/packages/WPF-UI/) [![Nuget](https://img.shields.io/nuget/dt/WPF-UI?label=nuget)](https://www.nuget.org/packages/WPF-UI/) [![VS 2022 Downloads](https://img.shields.io/visual-studio-marketplace/i/lepo.WPF-UI?label=vs-2022)](https://marketplace.visualstudio.com/items?itemName=lepo.WPF-UI) [![Sponsors](https://img.shields.io/github/sponsors/lepoco)](https://github.com/sponsors/lepoco)

![ua](https://user-images.githubusercontent.com/13592821/184498735-d296feb8-0f9b-45df-bc0d-b7f0b6f580ed.png)

Expand Down
118 changes: 118 additions & 0 deletions docs/codesnippet/Rtf/Hyperlink/RtfDocumentProcessor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace RtfDocumentProcessors
{
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Composition;
using System.IO;
using System.Linq;
using System.Web;
using System.Xml.Linq;

using Microsoft.DocAsCode.Plugins;
using Microsoft.DocAsCode.Utility;

[Export(typeof(IDocumentProcessor))]
public class RtfDocumentProcessor : IDocumentProcessor
{
[ImportMany(nameof(RtfDocumentProcessor))]
public IEnumerable<IDocumentBuildStep> BuildSteps { get; set; }

public string Name => nameof(RtfDocumentProcessor);

public ProcessingPriority GetProcessingPriority(FileAndType file)
{
if (file.Type == DocumentType.Article &&
".rtf".Equals(Path.GetExtension(file.File), StringComparison.OrdinalIgnoreCase))
{
return ProcessingPriority.Normal;
}
return ProcessingPriority.NotSupported;
}

public FileModel Load(FileAndType file, ImmutableDictionary<string, object> metadata)
{
var content = new Dictionary<string, object>
{
["conceptual"] = File.ReadAllText(Path.Combine(file.BaseDir, file.File)),
["type"] = "Conceptual",
["path"] = file.File,
};
return new FileModel(file, content);
}

#region Save
public SaveResult Save(FileModel model)
{
HashSet<string> linkToFiles = CollectLinksAndFixDocument(model);

return new SaveResult
{
DocumentType = "Conceptual",
ModelFile = model.File,
LinkToFiles = linkToFiles.ToImmutableArray(),
};
}
#endregion

#region CollectLinksAndFixDocument
private static HashSet<string> CollectLinksAndFixDocument(FileModel model)
{
string content = (string)((Dictionary<string, object>)model.Content)["conceptual"];
var doc = XDocument.Parse(content);
var links =
from attr in doc.Descendants().Attributes()
where "href".Equals(attr.Name.LocalName, StringComparison.OrdinalIgnoreCase) || "src".Equals(attr.Name.LocalName, StringComparison.OrdinalIgnoreCase)
select attr;
var path = (RelativePath)model.File;
var linkToFiles = new HashSet<string>();
foreach (var link in links)
{
FixLink(link, path, linkToFiles);
}
using (var sw = new StringWriter())
{
doc.Save(sw);
((Dictionary<string, object>)model.Content)["conceptual"] = sw.ToString();
}
return linkToFiles;
}
#endregion

#region FixLink
private static void FixLink(XAttribute link, RelativePath filePath, HashSet<string> linkToFiles)
{
string linkFile;
string anchor = null;
if (PathUtility.IsRelativePath(link.Value))
{
var index = link.Value.IndexOf('#');
if (index == -1)
{
linkFile = link.Value;
}
else if (index == 0)
{
return;
}
else
{
linkFile = link.Value.Remove(index);
anchor = link.Value.Substring(index);
}
var path = filePath + (RelativePath)linkFile;
var file = (string)path.GetPathFromWorkingFolder();
link.Value = file + anchor;
linkToFiles.Add(HttpUtility.UrlDecode(file));
}
}
#endregion

public void UpdateHref(FileModel model, IDocumentBuildContext context)
{
}
}
}
45 changes: 45 additions & 0 deletions docs/codesnippet/Rtf/RtfBuildStep.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace RtfDocumentProcessors
{
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Composition;
using System.Threading.Tasks;
using System.Threading.Tasks.Schedulers;

using MarkupConverter;
using Microsoft.DocAsCode.Plugins;

[Export(nameof(RtfDocumentProcessor), typeof(IDocumentBuildStep))]
public class RtfBuildStep : IDocumentBuildStep
{
#region Build
private readonly TaskFactory _taskFactory = new TaskFactory(new StaTaskScheduler(1));

public void Build(FileModel model, IHostService host)
{
string content = (string)((Dictionary<string, object>)model.Content)["conceptual"];
content = _taskFactory.StartNew(() => RtfToHtmlConverter.ConvertRtfToHtml(content)).Result;
((Dictionary<string, object>)model.Content)["conceptual"] = content;
}
#endregion

#region Others
public int BuildOrder => 0;

public string Name => nameof(RtfBuildStep);

public void Postbuild(ImmutableList<FileModel> models, IHostService host)
{
}

public IEnumerable<FileModel> Prebuild(ImmutableList<FileModel> models, IHostService host)
{
return models;
}
#endregion
}
}
74 changes: 74 additions & 0 deletions docs/codesnippet/Rtf/RtfDocumentProcessor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace RtfDocumentProcessors
{
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Composition;
using System.IO;

using Microsoft.DocAsCode.Common;
using Microsoft.DocAsCode.Plugins;

[Export(typeof(IDocumentProcessor))]
public class RtfDocumentProcessor : IDocumentProcessor
{
#region BuildSteps
[ImportMany(nameof(RtfDocumentProcessor))]
public IEnumerable<IDocumentBuildStep> BuildSteps { get; set; }
#endregion

#region Name
public string Name => nameof(RtfDocumentProcessor);
#endregion

#region GetProcessingPriority
public ProcessingPriority GetProcessingPriority(FileAndType file)
{
if (file.Type == DocumentType.Article &&
".rtf".Equals(Path.GetExtension(file.File), StringComparison.OrdinalIgnoreCase))
{
return ProcessingPriority.Normal;
}
return ProcessingPriority.NotSupported;
}
#endregion

#region Load
public FileModel Load(FileAndType file, ImmutableDictionary<string, object> metadata)
{
var content = new Dictionary<string, object>
{
["conceptual"] = File.ReadAllText(Path.Combine(file.BaseDir, file.File)),
["type"] = "Conceptual",
["path"] = file.File,
};
var localPathFromRoot = PathUtility.MakeRelativePath(EnvironmentContext.BaseDirectory, EnvironmentContext.FileAbstractLayer.GetPhysicalPath(file.File));

return new FileModel(file, content)
{
LocalPathFromRoot = localPathFromRoot,
};
}
#endregion

#region Save
public SaveResult Save(FileModel model)
{
return new SaveResult
{
DocumentType = "Conceptual",
FileWithoutExtension = Path.ChangeExtension(model.File, null),
};
}
#endregion

#region UpdateHref
public void UpdateHref(FileModel model, IDocumentBuildContext context)
{
}
#endregion
}
}
44 changes: 18 additions & 26 deletions docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
{
"src": [
{
"files": ["*.csproj"],
"exclude": ["**/bin/**", "**/obj/**"],
"src": "../src/Wpf.Ui"
"files": ["src/Wpf.Ui/*.csproj"],
"src": "../"
}
],
"dest": "documentation",
"dest": "api",
"properties": {
"TargetFramework": "net6.0"
"TargetFramework": "net7.0"
},
"disableGitFeatures": false,
"disableDefaultFilter": false
Expand All @@ -19,41 +18,34 @@
"build": {
"content": [
{
"files": ["tutorial/**.md", "tutorial/**/toc.yml", "toc.yml", "*.md"]
},
{
"files": ["documentation/**.yml", "documentation/index.md"]
"files": ["**/*.{md,yml}"],
"exclude": ["_site/**", "obj/**"]
}
],
"resource": [
{
"files": ["images/**", "manifest.webmanifest", "robots.txt"]
"files": [
"**/images/**",
"codesnippet/**",
"manifest.webmanifest",
"robots.txt"
],
"exclude": ["_site/**", "obj/**"]
}
],
"overwrite": [
{
"exclude": ["obj/**", "_site/**"]
}
],
"dest": "_site",
"xrefService": ["https://xref.docs.microsoft.com/query?uid={uid}"],
"postProcessors": ["ExtractSearchIndex"],
"globalMetadata": {
"_appTitle": "WPF UI",
"_appName": "WPF UI",
"_appFaviconPath": "images/favicon.ico",
"_appLogoPath": "images/wpfui.png",
"_appFooter": "",
"_description": "A simple way to make your application written in WPF keep up with modern design trends.",
"_copyrightFooter": "",
"_enableSearch": false,
"_disableSideFilter": false,
"_enableNewTab": true,
"_disableContribution": false,
"_disableBreadcrumb": false
"_appFooter": "<span>Made with <a href=\"https://dotnet.github.io/docfx\" rel=\"noreferrer\">docfx</a>, <a href=\"https://chat.openai.com/\" rel=\"noreferrer\">ChatGPT</a> and <a href=\"https://www.deepl.com/\" rel=\"noreferrer\">DeepL</a> | Copyright © 2023 <a href=\"https://dev.lepo.co/\">lepo.co</a></span>"
},
"dest": "_site",
"template": ["default", "modern", "template"],
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": ["default", "templates/singulinkfx"],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false,
Expand Down
Loading