Mouse Wheel Zoom

Aug 25, 2009 at 4:13 PM

I've got a WPF app in PowerShell. I have a Grid with 1 Row and 2 Columns.

A textbox and NodeXL side by side.

When I mouse wheel to zoom, the control eventually takes up the entire form.

I am hoping there is a property I can set or embed the NodeXL control in another container to clip the region.

I have not worked this up in a C# app yet it could be a WPF PowerShell issue.

Thanks

Aug 26, 2009 at 12:32 AM

It's not a PowerShell issue, it's a NodeXLControl issue.  I'll have to figure out the proper fix.  In the meantime, a short-term solution that worked in my tests is to put a DockPanel in column 0 with the DockPanel's Background set to some color, and then put the TextBox in the DockPanel.  Here is the XAML:

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300" xmlns:my="clr-namespace:Microsoft.NodeXL.Visualization.Wpf;assembly=Microsoft.NodeXL.Control.Wpf" Loaded="Window_Loaded">
    <Grid ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <my:NodeXLControl Grid.Column="1" Name="nodeXLControl1"  />
        <DockPanel Name="dockPanel1" Background="White">
            <TextBox Height="23" Name="textBox1" Width="120">TextBox</TextBox>
        </DockPanel>
    </Grid>
</Window>