Quantcast
Channel: C#タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9747

C# Prism WPF 公式サンプル(.NET Core版)を動かしてみる

$
0
0

Prism の公式サンプルを動かしてみました。
ソースを見ただけではイメージが付きにくいので画面をキャプションしておきます。

動作させた環境

Windows 10
Microsoft Visual Studio Community 2019

01-BootstrapperShell

基本的なブートストラップとシェルを作成する

Topic : Bootstrapper and the Shell
Description : Create a basic bootstrapper and shell

image.png

image.png

02-Regions

リージョンを作成する

Topic : Regions
Description : Create a region
image.png

image.png

03-CustomRegions

StackPanelのカスタムリージョンアダプターを作成する

Topic : Custom Region Adapter
Description : Create a custom region adapter for the StackPanel

image.png

image.png

04-ViewDiscovery

View Discoveryでビューを自動的に注入する

Topic : View Discovery
Description : Automatically inject views with View Discovery

image.png

image.png

05-ViewInjection

ビューインジェクションを使用して手動でビューを追加および削除する

Topic : View Injection
Description : Manually add and remove views using View Injection

image.png

image.png

[Add View]ボタンをクリックすると
image.png

06-ViewActivationDeactivation

ビューを手動でアクティブ化および非アクティブ化する

Topic : View Activation/Deactivation
Description : Manually activate and deactivate views

image.png

image.png

[Diactivate ViewA]ボタンをクリックすると
image.png

[Activate ViewB]ボタンをクリックすると
image.png

[Diactivate ViewB]ボタンをクリックすると
image.png

07-Modules - AppConfig

App.configファイルを使用してモジュールをロードする

Topic : Modules with App.config
Description : Load modules using an App.config file

image.png

image.png

07-Modules - Code

コードを使用してモジュールをロードする

Topic : Modules with Code
Description : Load modules using code

image.png

image.png

07-Modules - Directory

ディレクトリからモジュールをロードする

Topic : Modules with Directory
Description : Load modules from a directory

image.png

image.png

07-Modules - LoadManual

IModuleManagerを使用して手動でモジュールを読み込む

Topic : Modules loaded manually
Description : Load modules manually using the IModuleManager

image.png

image.png

[Load Module]ボタンをクリックすると
image.png

08-ViewModelLocator

ViewModelLocatorの使用

Topic : ViewModelLocator

Description : using the ViewModelLocator
image.png

image.png

09-ChangeConvention

ViewModelLocatorの命名規則を変更する

Topic : ViewModelLocator - Change Convention
Description : Change the ViewModelLocator naming conventions

image.png

image.png

10-CustomRegistrations

特定のビューのViewModelを手動で登録する

Topic : ViewModelLocator - Custom Registrations
Description : Manually register ViewModels for specific views

image.png

image.png

11-UsingDelegateCommands

DelegateCommandおよびDelegateCommand を使用する

Topic : DelegateCommand
Description : Use DelegateCommand and DelegateCommand

image.png

image.png

[Can Execute Command]をチェックすると
image.png

12-UsingCompositeCommands

CompositeCommandsを使用して複数のコマンドを単一のコマンドとして呼び出す方法を学ぶ

Topic : CompositeCommands
Description : Learn how to use CompositeCommands to invoke multiple commands as a single command

image.png

image.png

[Can Execute]のチェックを解除すると
image.png

[Tab B]を選択すると
image.png

13-IActiveAwareCommands

コマンドをアクティブにして、アクティブなコマンドのみを呼び出す

Topic : IActiveAware Commands
Description : Make your commands IActiveAware to invoke only the active command

image.png

image.png

[Can Execute]のチェックを解除すると
image.png

[Tab B]を選択すると
image.png

14-UsingEventAggregator

IEventAggregatorの使用

Topic : Event Aggregator
Description : Using the IEventAggregator

image.png

image.png

[Send Message]ボタンをクリックすると
image.png

15-FilteringEvents

イベントをサブスクライブするときのイベントのフィルタリング

Topic : Event Aggregator - Filter Events
Description : Filtering events when subscribing to events

image.png

image.png

[Send Message]ボタンをクリックしても変化は認められない

16-RegionContext

RegionContextを使用してネストされた領域にデータを渡す

Topic : RegionContext
Description : Pass data to nested regions using the RegionContext

image.png

image.png

ListBox の行を選択すると
image.png

17-BasicRegionNavigation

基本的なリージョンナビゲーションの実装方法を見る

Topic : Region Navigation
Description : See how to implement basic region navigation

image.png

image.png

[Navigate to View A]ボタンをクリックすると
image.png

[Navigate to View B]ボタンをクリックすると
image.png

18-NavigationCallback

ナビゲーションが完了したときに通知を受け取る

Topic : Navigation Callback
Description : Get notifications when navigation has completed

image.png

image.png

[Navigate to View A]ボタンをクリックすると
image.png

[Navigate to View B]ボタンをクリックすると
image.png

19-NavigationParticipation

INavigationAwareによるViewおよびViewModelナビゲーションへの参加について学ぶ

Topic : Navigation Participation
Description : Learn about View and ViewModel navigation participation with INavigationAware

image.png

image.png

[Navigate to View A]ボタンをクリックすると
image.png

もう一度[Navigate to View A]ボタンをクリックすると
image.png

[Navigate to View B]ボタンをクリックすると
image.png

20-NavigateToExistingViews

ナビゲーション中にビューインスタンスを制御する

Topic : Navigate to existing Views
Description : Control view instances during navigation

image.png

image.png

[Navigate to View A]ボタンをクリックすると
image.png

もう一度[Navigate to View A]ボタンをクリックすると
image.png

[Navigate to View B]ボタンをクリックすると
image.png

21-PassingParameters

View / ViewModelから別のView / ViewModelにパラメーターを渡す

Topic : Passing Parameters
Description : Pass parameters from View/ViewModel to another View/ViewModel

image.png

image.png

ListBox の行を選択すると
image.png

ListBox の別の行を選択すると
image.png

22-ConfirmCancelNavigation

インターフェイスを使用してナビゲーションを確認またはキャンセルする

Topic : Confirm/cancel Navigation
Description : Use the IConfirmNavigationReqest interface to confirm or cancel navigation

image.png

image.png

[Navigate to View A]ボタンをクリックすると
image.png

[Navigate to View B]ボタンをクリックすると
image.png

[はい]をクリックすると
image.png

23-RegionMemberLifetime

IRegionMemberLifetimeでメモリからビューを自動的に削除する

Topic : Controlling View lifetime
Description : Automatically remove views from memory with IRegionMemberLifetime

image.png

image.png

[Navigate to View A]ボタンをクリックすると
image.png

[Navigate to View B]ボタンをクリックすると
image.png

24-NavigationJournal

ナビゲーションジャーナルの使用方法を学ぶ

Topic : Navigation Journal
Description : Learn how to use the Navigation Journal

image.png

image.png

ListBox の行を選択すると
image.png

[Go Back]ボタンをクリックすると
image.png

25-NotificationRequest

InteractionRequestを使用してポップアップを表示する方法を学ぶ

Topic : Interactivity - NotificationRequest
Description : Learn how to show popups using an InteractionRequest

image.png

image.png

[Raise Default Notification]ボタンをクリックすると
image.png

[OK]をクリックすると
image.png

26-ConfirmationRequest

ConfirmationRequestを使用して確認ダイアログを表示する方法を学ぶ

Topic : Interactivity - ConfirmationRequest
Description : Learn how to prompt a confirmation dialog using a ConfirmationRequest

image.png

image.png

[Raise Default Notification]ボタンをクリックすると
image.png

[OK]をクリックすると
image.png

[Raise Default Confirmation]ボタンをクリックすると
image.png

[OK]をクリックすると
image.png

27-CustomContent

InteractionRequestで表示されるダイアログに独自のコンテンツを使用する方法を学ぶ

Topic : Interactivity - Custom Content
Description : Learn how to use your own content for a dialog shown with InteractionRequest

image.png

image.png

[Raise Default Notification]ボタンをクリックすると
image.png

[OK]をクリックすると
image.png

[Raise Default Confirmation]ボタンをクリックすると
image.png

[OK]をクリックすると
image.png

[Raise Custom Popup]ボタンをクリックすると
image.png

[Accept]をクリックすると
image.png

28-CustomRequest

InteractionRequestで使用する独自のカスタムリクエストを作成する

Topic : Interactivity - Custom Request
Description : Create your own custom request to use with an InteractionRequest

image.png

image.png

[Raise Default Notification]ボタンをクリックすると
image.png

[OK]をクリックすると
image.png

[Raise Default Confirmation]ボタンをクリックすると
image.png

[OK]をクリックすると
image.png

[Raise Custom Popup]ボタンをクリックすると
image.png

[Accept]をクリックすると
image.png

[Raise Custom Interaction]ボタンをクリックすると
image.png

ListBox から Item を選択して [Select Item]ボタンをクリックすると
image.png

29-InvokeCommandAction

任意のイベントに応答してコマンドを呼び出す

Topic : Interactivity - InvokeCommandAction
Description : Invoke commands in response to any event

image.png

image.png

ListBoxから行を選択すると
image.png


Viewing all articles
Browse latest Browse all 9747

Trending Articles