0
它工作正常:如何在WPF中從類中觸發xaml代碼?
<Button Width="100" Height="30" Content="Click Me!">
<Button.ToolTip>
<Border Margin="-4,0,-4,-3" Padding="10" Background="Silver">
<Border.BitmapEffect>
<OuterGlowBitmapEffect></OuterGlowBitmapEffect>
</Border.BitmapEffect>
<Label>Nice tooltip</Label>
</Border>
</Button.ToolTip>
</Button>
不過,我想代碼,撤銷時,有一個條件。例如:
if(str=="aaa")
MessageBox.Show("All will be o'kay");
else
{
//I would like this code to revoke
/* <Border.BitmapEffect>
<OuterGlowBitmapEffect></OuterGlowBitmapEffect>
</Border.BitmapEffect>
*/
}
怎麼辦?
好的。我將閱讀有關INotifyPropertyChanged接口。 – StepUp