開発中のアプリケーションに TextBox があり、バインディングは xaml で行われます
TextBox Text プロパティのバインディングが完了したときにイベントを発生できるようにしたいのですが、TextBox へのバインディングによってテキストがロード/変更されたときに、これをどのように達成できますか?
TextChanged Event も Loaded Event も試しましたが、バインディングが完了した直後に運がなかったので、どうすればよいですか?
<ListBox x:Name="listBoxCategories" Background="Transparent" BorderThickness="0" Grid.Row="4" Grid.ColumnSpan="2" Margin="0" Padding="0" ItemContainerStyle="{StaticResource ListBoxItemStyle}" ItemsSource="{Binding ElementName=discussion_categoryDomainDataSource, Path=Data}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel x:Name="stackPanelCategory" Orientation="Vertical" Margin="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<TextBlock x:Name="TextBlockCategoryId" Text="{Binding Path=CategoryID}" />
<toolkit:Expander IsExpanded="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Style="{StaticResource ForumExpanderStyleRight}">
<toolkit:Expander.Header>
<TextBlock FontSize="16" FontWeight="Bold" Foreground="White" Margin="4,0,4,0" Text="{Binding CategoryName}" LayoutUpdated="TextBlock_LayoutUpdated" />
</toolkit:Expander.Header>
<ListBox x:Name="listBoxBoards" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" BorderThickness="0" Margin="0" Padding="0" ItemContainerStyle="{StaticResource ListBoxItemStyle}" ItemsSource="{Binding CategoryBoards}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0" HorizontalAlignment="Stretch" x:Name="GridBoard">
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</toolkit:Expander>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
この行で
<TextBlock x:Name="TextBlockCategoryId" Text="{Binding Path=CategoryID}" />
Binding が完了したときに親スタック パネルの下のリスト ボックスに別のデータ ソースを提供するイベントが必要なので、バインド イベントが必要なので、後で非表示になるテキスト ブロックにカテゴリ ID がある場合xaml (現在はテスト上の理由で折りたたまれていません)