Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Painting outside of the controls (Read 2358 times)
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Painting outside of the controls
May 8th, 2012 at 9:06am
Print Post  
Hello,
I have a MindFusion WPF 2.7 control in a grid layout control, with the scroll bar sitting in a separate grid column of the same control, and everything placed inside of AvalonDock framework. When the control actual width is smaller then the diagram inside, I get an unpleasant effect that the diagram paints the contents outside of the bounds, over the control borders and up to the next control, but under the scrollbar. Any idea how to fix it?
  

painting_outside.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Painting outside of the controls
Reply #1 - May 8th, 2012 at 2:31pm
Print Post  
What does your Xaml code look like? I could not reproduce that effect even with ClipToBounds explicitly set to false, the diagram is still clipped by its Grid cell:

Code
Select All
<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:my="http://mindfusion.eu/diagramming/wpf"
    Title="Window1" Width="600" Height="500" >

    <Grid ClipToBounds="False">

		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="300" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<my:Diagram x:Name="diag" ClipToBounds="False" />

	</Grid>

</Window> 


  
Back to top
 
IP Logged
 
PetrOs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 36
Joined: May 26th, 2011
Re: Painting outside of the controls
Reply #2 - May 8th, 2012 at 3:10pm
Print Post  
ClipToBounds set explicitely to true worked as a solution Wink However, the code was like this:

Code
Select All
 <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="16" />
        </Grid.ColumnDefinitions>

        <Interactivity:Interaction.Triggers>
            ... omitted
        </Interactivity:Interaction.Triggers>

        <ContentControl Grid.Column="0" SizeChanged="ContentControlSizeChanged" Name="DiagramContainer">
            <BoundDiagram:BoundDiagram x:Name="MyBoundDiagram" DataItems="{Binding Path=VisibleElements}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  AutoResize="None" AutoSnapLinks="False" DynamicLinks="False" RouteLinks="False" Behavior="DoNothing" Background="#FFFFFF" BackBrush="#FFFFFF"  SelectedElement="{Binding Path=SelectedElement, Mode=TwoWay}"/>
        </ContentControl>


        <ScrollBar Name="scrollbar" HorizontalAlignment="Right" Width="16" Grid.Column="1" Value="{Binding Path=CurrentStart, Mode=TwoWay}" Maximum="{Binding Path=TotalSize, Mode=TwoWay}" Minimum="1"  SmallChange="1" LargeChange="10" />
    </Grid> 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint