私は、プリズム6を使用する最初のWPFアプリケーションで作業しています。 ボタンをクリックすると、約1-2分かかる操作が開始されます。Prism 6(WPF)を使用して時間のかかる操作を表示する操作の進行レイヤー
Iは、ウィンドウ内のすべての他のコントロールの上に半透明層を表示し、操作の進行状況を表示し
<Window x:Class="TestingApplication.Shell"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://www.codeplex.com/prism">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Column="0">
<ContentControl x:Name="NavigationItemsControl"
prism:RegionManager.RegionName="MainNavigationRegion"
Grid.Column="0"/>
</Border>
<ContentControl prism:RegionManager.RegionName="MainContentRegion"
Grid.Row="1"/>
<Grid Grid.RowSpan="2" Background="#5555">
<Border BorderBrush="Gray" BorderThickness="1"
Width="400" Height="200" Background="White">
<StackPanel Margin="10">
<TextBlock Text="Loading... Please wait"
Margin="0,10" FontSize="18"/>
<ProgressBar HorizontalAlignment="Stretch" Height="40"/>
<Button Content="Cancel" HorizontalAlignment="Center"
Margin="0,10"/>
</StackPanel>
</Border>
</Grid>
</Grid>
</Window>
下の画像とコードのように、ボタンをキャンセルしたいです
これを実装してプリズムとMVVMを活用するのがベストプラクティスとなる提案をいただけますか?
は、私がeventAggrgatorを使用することになり、 ナディア
私は混乱しています。あなたが説明することができます、これはあなたが必要なものです: ボタンをクリックすると、プロセスが終了するまで灰色のレイアウトが表示されるはずですか? – safi
はい、それは私が必要なものです – melculetz