XAML
<Popup Name="popUpProgress" Width="225" Height="85"
IsOpen="{Binding PopUpIsOpen,Mode=OneWay}"
Placement="Center" PlacementTarget="{Binding ElementName=stkListview}"
VerticalAlignment="Top">
<Border BorderThickness="1" Background="Blue" >
<Grid Width="225" Height="85">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Label x:Name="lblProgress" Content="Please Wait ...." Margin="10,5,0,0" HorizontalAlignment="Left" Grid.Row="1" />
</Grid>
</Border>
</Popup>
在视图模型中:
private bool _PopUpIsOpen;
public bool PopUpIsOpen
{
get { return _PopUpIsOpen; }
set
{
_PopUpIsOpen = value;
RaisePropertyChanged(() => this.PopUpIsOpen);
}
}
public RelayCommand SubmitCommand { get; private set; }
private bool SubmitCommandCanExecute()
{
return true;
}
private void SubmitCommandExecute()
{
PopUpIsOpen = true;
dsStandardListbyMarket = marketBL.StandardListbyMarketBL(Convert.ToInt32(SelectdMarketId), Convert.ToInt32(Users.UserId));
GetComboboxMappingCollections(Convert.ToInt32(this.SelectdMarketId), Users.UserId);
FItems = new ObservableCollection<MarketRecord.FItem>();
FItems.CollectionChanged += OnUICollectionChanged;
marketBL.FetchMarketRecords(Convert.ToInt32(this.SelectdMarketId));
IsSubmitButtonVisible = true;
PopUpIsOpen = false;
}
当我单击提交按钮控件时,SubmitCommandExecute
但Popup
窗口未显示。我对 WPF 有点陌生,摸不着头脑。最后在这里提出这个问题。可能有什么问题。