Changeset 2680


Ignore:
Timestamp:
Feb 13, 2011, 9:39:16 PM (11 years ago)
Author:
sauer
Message:

Wizard: left/right key navigation

Location:
trunk/CrypPlugins/Wizard
Files:
2 edited

Legend:

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

    r2611 r2680  
    55             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    66             mc:Ignorable="d"
    7              d:DesignHeight="300" d:DesignWidth="600">
     7             d:DesignHeight="300" d:DesignWidth="600" Focusable="True">
    88    <UserControl.Resources>
    99        <BitmapImage x:Key="Analyse" UriSource="Images/Analyse.png"/>
     
    127127            <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" >
    129                 <Button Content="{Loc BackButton}" Height="23" Name="backButton" Width="75" Margin="1" Click="backButton_Click"/>
    130                 <Button Content="{Loc NextButton}" Tag="{Loc CreateButton}" Height="23" Name="nextButton" Width="75" Margin="1" IsDefault="True" Click="nextButton_Click"/>
    131                 <Button Content="{Loc AbortButton}" Height="23" Name="abortButton" Width="75" Margin="1" Click="abortButton_Click"/>
     129                <Button Content="{Loc BackButton}" Height="23" Name="backButton" Width="75" Margin="1" Click="backButton_Click" Focusable="False" />
     130                <Button Content="{Loc NextButton}" Tag="{Loc CreateButton}" Height="23" Name="nextButton" Width="75" Margin="1" IsDefault="True" Click="nextButton_Click" Focusable="False" />
     131                <Button Content="{Loc AbortButton}" Height="23" Name="abortButton" Width="75" Margin="1" Click="abortButton_Click" Focusable="False" />
    132132            </StackPanel>
    133133        </Grid>
  • trunk/CrypPlugins/Wizard/WizardControl.xaml.cs

    r2678 r2680  
    8787            SetupPage(wizardConfigXML);
    8888            AddToHistory(wizardConfigXML);
     89
     90            Loaded += delegate { Keyboard.Focus(this); };
    8991        }
    9092
     
    310312
    311313                        RadioButton rb = new RadioButton();
     314                        rb.Focusable = false;
    312315                        string id = GetElementID(ele);
    313316                        rb.Checked += rb_Checked;
     
    611614            {
    612615                var p = new ContentControl();
     616                p.Focusable = false;
    613617                var bg = selectionBrush.Clone();
    614618                bg.Opacity = 1 - (historyStack.Children.Count / (double)currentHistory.Count);
     
    12001204
    12011205                case Key.Left:
     1206                    if (backButton.IsEnabled)
     1207                        SetLastContent(null, null);
    12021208                    break;
    12031209
    12041210                case Key.Right:
     1211                    if (nextButton.IsEnabled)
     1212                        SetNextContent(null, null);
    12051213                    break;
    12061214            }
Note: See TracChangeset for help on using the changeset viewer.