0

我在 XAML 中添加了一个 InkPresenter。如何动态更改其背景颜色?

这可行吗?

 ImageBrush ib = 新的 ImageBrush();           


ib.Stretch = Stretch.Uniform;

 ib.ImageSource =
new BitmapImage(new Uri(@"/Images/WhiteBoard_1000.jpg", UriKind.Relative));

 myInk.Background = ib;

4

2 回答 2

0

Yes you can change the background of the InkPresenter just as you have done.

于 2013-01-04T06:57:32.790 回答
0

您可以在 XAML 中更改 InkPresenter 背景,但动态更改其背景,请使用以下命令:

SolideColorBrush sb = new SolidColorBrush(Colors.Color_you_want);

InkPresenter.background = 某人;

于 2013-01-12T03:08:27.033 回答