Changeset 2611


Ignore:
Timestamp:
Feb 6, 2011, 9:19:43 PM (11 years ago)
Author:
sauer
Message:

Wizard history: added mouse scrolling support

Location:
trunk/CrypPlugins/Wizard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Wizard/WizardControl.xaml

    r2610 r2611  
    125125                <ColumnDefinition Width="Auto" />
    126126            </Grid.ColumnDefinitions>
    127             <ScrollViewer Name="history" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" />
     127            <ScrollViewer Name="history" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Hidden" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" CanContentScroll="True" MouseMove="history_MouseMove" />
    128128            <StackPanel Height="Auto" HorizontalAlignment="Right" Name="buttonStackPanel" VerticalAlignment="Bottom" Margin="2" Grid.Column="1" Orientation="Horizontal" >
    129129                <Button Content="{Loc BackButton}" Height="23" Name="backButton" Width="75" Margin="1" Click="backButton_Click"/>
  • trunk/CrypPlugins/Wizard/WizardControl.xaml.cs

    r2610 r2611  
    925925        }
    926926
     927        private void history_MouseMove(object sender, MouseEventArgs e)
     928        {
     929            if (e.LeftButton == MouseButtonState.Pressed)
     930            {
     931                Point dir = e.GetPosition(history);
     932                if (dir.X < history.ActualWidth / 2)
     933                    history.LineRight();
     934                else if (dir.X > history.ActualWidth / 2)
     935                    history.LineLeft();
     936            }
     937        }
     938
    927939    }
    928940
Note: See TracChangeset for help on using the changeset viewer.