Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Stretch the diagram (Read 6036 times)
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Stretch the diagram
Jan 19th, 2010 at 7:16am
Print Post  
Hello, Stoyan.
I have the following xaml code
Code
Select All
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" MinHeight="20"/>
            <RowDefinition Height="Auto" MinHeight="25"/>
            <RowDefinition Height="519.723*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="153.75*" />
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="603*" />
        </Grid.ColumnDefinitions>

       <GridSplitter Grid.Column="1" Width="10" VerticalAlignment="Stretch"
                      Grid.RowSpan="2" Grid.Row="2" ResizeDirection="Columns"
                      ResizeBehavior="PreviousAndNext"/>
        <mf:Ruler Grid.Column="2" Grid.Row="2" Margin="0,0,0,2"
            VerticalScaleVisible="Collapsed" HorizontalScaleVisible="Collapsed"
            Width="Auto">
            <mf:Ruler.Document>
                <mf:Diagram Name="m_Diagram" Height="Auto" Width="Auto">
                </mf:Diagram>
            </mf:Ruler.Document>
        </mf:Ruler>
        <mf:NodeListView Name="m_ElemList" Grid.Row="2" Margin="0,0,0,0"/>
 


And I want to stretch my diagram on the whole column width. I tried to set HorisontalAligment and HorisontalContentAligment  of my diagram to Strech. But there is now effect. How can I do this thing?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stretch the diagram
Reply #1 - Jan 19th, 2010 at 8:31am
Print Post  
Hi,

You will have to set a larger Diagram.Bounds value. Try doing that from the ruler's SizeChanged event.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Stretch the diagram
Reply #2 - Jan 19th, 2010 at 9:03am
Print Post  
Thanks!
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Stretch the diagram
Reply #3 - Jan 25th, 2010 at 8:56am
Print Post  
Hello, Stoyan.
I have the same problem again. I add the tab control and make the my user control from the ruler with diagram. And when I add a TabItem into TabControl I need to stretch the diagram. The different alignments don't get any effects. And I don't know the width and height. They are equal to Double.NaN Sad. And my ruler with diagram is places into the center of TabITem. What I have to do?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stretch the diagram
Reply #4 - Jan 25th, 2010 at 9:12am
Print Post  
Hi,

Are you checking the TabItem's ActualWidth and ActualHeight properties, or Width and Height?

Stoyan
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Stretch the diagram
Reply #5 - Jan 25th, 2010 at 9:21am
Print Post  
I can't understand why ActualWidth and Height more less then really it is...
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Stretch the diagram
Reply #6 - Jan 25th, 2010 at 9:33am
Print Post  
May be I send you the project and you give me an advise how to stretch the diagram over whole tab item?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stretch the diagram
Reply #7 - Jan 25th, 2010 at 9:58am
Print Post  
sure 8)
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Stretch the diagram
Reply #8 - Jan 25th, 2010 at 10:31am
Print Post  
I sent the project. But for minimize the archive size I removed all MindFusion dlls form the archive.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stretch the diagram
Reply #9 - Jan 25th, 2010 at 12:42pm
Print Post  
Hi,

Remove the Height="300" Width="300" assignments from the UserControl's Xaml and the control will fill the tab item. In WPF these properties serve to let you override the width and height that would be otherwise calculated dynamically from other properties such as Margins, Alignment, etc.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hunter
Full Member
***
Offline



Posts: 194
Location: Sevastopol
Joined: Dec 1st, 2009
Re: Stretch the diagram
Reply #10 - Jan 25th, 2010 at 12:44pm
Print Post  
Ok! Thanks Smiley. I stay them as is because I forgot about them when convert code from main frame window to user control Wink
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stretch the diagram
Reply #11 - Jan 25th, 2010 at 1:00pm
Print Post  
I see Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint