Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Using the Overview control (Read 1904 times)
larryBrown
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Jun 15th, 2010
Using the Overview control
Jun 17th, 2010 at 9:58am
Print Post  
Ive tried using the Overview control and setting the Document property to my diagram... Nothing is displayed... Can anyone post some code example of using this control ? or a link to a tutorial or something ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Using the Overview control
Reply #1 - Jun 17th, 2010 at 11:34am
Print Post  
This works for me:

Code
Select All
public MainWindow()
{
	InitializeComponent();
	ovw.Document = diagram;
} 



I can't find a way to set it from Xaml if that's what you are trying to do.

Stoyan
  
Back to top
 
IP Logged
 
larryBrown
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Jun 15th, 2010
Re: Using the Overview control
Reply #2 - Jun 17th, 2010 at 12:30pm
Print Post  
I set it from XAML like this but it doesnt seem to work:

<mf:Overview Document="{StaticResource MainDiagram}"/>

Also when i create a control in code and set its diagram nothing is displayed:

MainDiagram = FindResource("MainDiagram") as MindFusion.Diagramming.Wpf.Diagram;

           var overView = new Overview {Document = MainDiagram};
           OverviewStackPanel.Children.Add(overView);


Any ideas ?
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Using the Overview control
Reply #3 - Jun 17th, 2010 at 1:23pm
Print Post  
Hi,

I seem to be able to set the Document property of the overview with this code:
Code
Select All
    <Application.Resources>

        <d:Diagram x:Key="MainDiagram"/>

    </Application.Resources>

   <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <ScrollViewer Grid.Row="0" Content="{StaticResource MainDiagram}"/>
        <StackPanel Name="OverviewStackPanel" Grid.Row="1" VerticalAlignment="Stretch">
            <d:Overview Name="overview" Height="200" Width="150" Document="{StaticResource MainDiagram}"/>
        </StackPanel>
    </Grid>
 



I hope this helps,
Lyubo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint