views:

2

answers:

0

I'm trying to put a rounded border on a control which is hosted through a WindowsFormHost object. It seems like no matter what I set for OpacityMask, it has no effect on the rendering. Is there something I've missed?

Here is the XAML code I am using. The child control is added at run-time. I've tried various combinations of masks, none of which worked for me. Any help would be appreciated. Thanks!

    <WindowsFormsHost Background="#FF2BBA62" Height="414" Width="516" Margin="176.5,223,309.5,92" Name="vcxHost1" UseLayoutRounding="False" ClipToBounds="True" >
        <WindowsFormsHost.OpacityMask>
            <VisualBrush>
                <VisualBrush.Visual>
                    <Rectangle Height="10" Width="100" Name="border1" />
                </VisualBrush.Visual>
            </VisualBrush>
        </WindowsFormsHost.OpacityMask>
    </WindowsFormsHost>