[Ironpython-users] Crash creating watermark

Lance Morrison LMorrison at CalAmp.com
Tue Jul 8 09:30:15 CEST 2014


The following code crashes  with a XamlObjectWriterException -  Failed to create a 'ImageSource' from the text 'watermark.png'.  Is there a way around this?

Using IronPython 2.7.5b2 build.

<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sysmedia="clr-namespace:System.Media;assembly=System"

  Title="Test" Height="800" Width="800" Name="Window">

    <TextBlock Height="Auto">
        <TextBlock.Background>
            <ImageBrush Opacity=".25">
                <ImageBrush.ImageSource>watermark.png</ImageBrush.ImageSource>
            </ImageBrush>
        </TextBlock.Background>
    </TextBlock>
</Window>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140708/4c194824/attachment.html>


More information about the Ironpython-users mailing list