Skip to content

Release-4.0.0-for-WPF

Latest

Choose a tag to compare

@nuitsjp nuitsjp released this 11 Jul 06:41

KAMISHIBAI 4.0.0 for WPF

KAMISHIBAI 4.0.0 removes the mandatory Windows API Code Pack dependency and makes the file dialog implementation replaceable. This is a major release because the dependency injection graph and the default runtime implementation have changed.

Important compatibility information

Review these points before upgrading from KAMISHIBAI 3.x.

Existing file dialog interfaces remain unchanged

The following public interfaces and contexts retain their existing members:

  • IPresentationService
  • IPresentationServiceBase
  • IWindowService
  • OpenFileDialogContext
  • SaveFileDialogContext

Existing calls such as presentationService.OpenFile(context) and presentationService.SaveFile(context) do not need to be rewritten.

Dependency injection contains a breaking change

WindowService now requires an IFileDialogService. KamishibaiApplicationBuilder.Build() registers the default implementation automatically, but applications that instantiate WindowService directly or assemble the service graph themselves must register and supply IFileDialogService.

The default runtime implementation has changed

KAMISHIBAI 3.x used Microsoft-WindowsAPICodePack-Shell. KAMISHIBAI 4.0 uses the public Windows Common Item Dialog COM API directly. The standard open, multiple-selection, folder-selection, save, cancel, filter, custom-place, and extension behaviors are covered by integration tests, but applications can observe differences in native validation, exception details, or operating-system-dependent presentation.

Known limitations of the new default implementation:

  • AllowPropertyEditing has no corresponding public Common Item Dialog switch and is not applied.
  • IsExpandedMode maps to FOS_DEFAULTNOMINIMODE, which Windows 7 and later do not support.

The Code Pack is no longer transitively referenced by Kamishibai.View

Applications that used Code Pack APIs through KAMISHIBAI's transitive dependency must add an explicit dependency. Applications that require the exact KAMISHIBAI 3.1.0 dialog implementation should use the compatibility package.

Preserving the KAMISHIBAI 3.1.0 implementation

Install the new package:

dotnet add package Kamishibai.FileDialogs.WindowsApiCodePack --version 4.0.0

Register it before Build():

builder.Services.AddWindowsApiCodePackFileDialogs();
var app = builder.Build();

Installing the package alone does not activate it. The registration call is required.

The compatibility package:

  • contains the same OpenFile and SaveFile method bodies as KAMISHIBAI 3.1.0;
  • preserves the existing result and context-update behavior, including existing quirks;
  • pins Microsoft-WindowsAPICodePack-Shell to exactly version 1.1.4;
  • restores Code Pack as a transitive dependency.

The compatibility package therefore carries the Code Pack dependency and its Microsoft license terms. Applications that cannot accept that dependency should use the new default implementation or provide their own IFileDialogService.

See the complete 3.x to 4.0 migration guide.

Packages

  • Kamishibai 4.0.0
  • Kamishibai.View 4.0.0
  • Kamishibai.Hosting 4.0.0
  • Kamishibai.FileDialogs.WindowsApiCodePack 4.0.0

Validation

  • View and dependency-injection tests: 21 passed
  • Source-generator tests: 23 passed
  • Native Open/Save dialog integration tests: 5 passed
  • net462 and net6.0-windows builds passed for all release packages
  • Compatibility OpenFile and SaveFile method bodies matched KAMISHIBAI 3.1.0 exactly after line-ending normalization

Related issue

Full Changelog: Release-3.1.0...Release-4.0.0