【问题标题】:How to dynamically set Background color for InkPresenter如何为 InkPresenter 动态设置背景颜色
【发布时间】:2013-01-12 11:08:27
【问题描述】:

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

这样可行吗?

ImageBrush ib = 新的 ImageBrush(); ib.Stretch = Stretch.Uniform; ib.ImageSource = new BitmapImage(new Uri(@"/Images/WhiteBoard_1000.jpg", UriKind.Relative)); myInk.Background = ib;

【问题讨论】:

    标签: windows-phone-7


    【解决方案1】:

    是的,您可以像以前那样更改 InkPresenter 的背景。

    【讨论】:

      【解决方案2】:

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

      SolidColorBrush sb = new SolidColorBrush(Colors.Color_you_want);

      InkPresenter.background = sb;

      【讨论】:

        猜你喜欢
        • 2015-07-29
        • 1970-01-01
        • 1970-01-01
        • 2022-12-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-10-26
        • 1970-01-01
        相关资源
        最近更新 更多