2022-03-01から1ヶ月間の記事一覧

Window.Xaml

WPF

■MainWindow.Xaml

App.Xaml

WPF

■App.Xaml <Application x:Class="WpfApp1.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApp1" StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources></Application> ・x:Cl…

子Componentから親に値を引き渡す

子側で引数付きのイベントを起こし、親はそのイベントを購読する。 ●手順 <<Component側>> ①子側でイベントコールバックを定義 [Parameter] public EventCallback<引き渡す値の型> 任意のイベント名 { get; set; } ②値を渡したいタイミングでイベントを起こす イベントは</component側>…

Navigation

コードからページを遷移する場合、NavigationManagerを使う。 (*)DIして使用すればよい。 ■アプリケーションのルートページに遷移する例 @inject NavigationManager NavigationManage; this.NavigationManager .NavigateTo("./");