code_junkie

WPF UserControl - cannot select TextBox

Nov 12th, 2011
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. <UserControl x:Class="dr.SitecoreCompare.WPF.ConnectionEntry"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. x:Name="connEntry"
  5. BorderBrush="Navy" BorderThickness="1" Margin="5,0,0,5" >
  6. <StackPanel Margin="0,10,0,0" >
  7. <Label FontWeight="ExtraBold" Content="{Binding ElementName=connEntry, Path=Title}"></Label>
  8. <Label Margin="0,5,0,0">Server:</Label>
  9. <TextBox x:Name="txtServer" TabIndex="1" Text="{Binding Path=ServerName}" ></TextBox>
  10. <Label>Database:</Label>
  11. <TextBox x:Name="txtDatabase" TabIndex="2" Text="{Binding Path=DatabaseName}"></TextBox>
  12. </StackPanel>
  13.  
  14. <Window x:Class="dr.SitecoreCompare.WPF.ProjectDialog"
  15. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  16. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  17. xmlns:c="clr-namespace:dr.SitecoreCompare.WPF"
  18. Title="Choose project" Height="280" Width="500"
  19. WindowStartupLocation="CenterOwner" WindowStyle="SingleBorderWindow" HorizontalAlignment="Center" ShowInTaskbar="False" ShowActivated="True" ResizeMode="NoResize" VerticalContentAlignment="Top" VerticalAlignment="Center">
  20. <StackPanel>
  21. <Label>Choose databases</Label>
  22. <Grid>
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition />
  25. <ColumnDefinition />
  26. </Grid.ColumnDefinitions>
  27. <c:ConnectionEntry Grid.Column="0" x:Name="connMaster" Title="Master:" Padding="5" />
  28. <c:ConnectionEntry Grid.Column="1" x:Name="connSlave" Title="Slave:" Padding="5" />
  29. </Grid>
  30. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0" >
  31. <Button x:Name="btnCancel" Click="btnCancel_Click">Cancel</Button>
  32. <Button x:Name="btnOK" Click="btnOK_Click">OK</Button>
  33. </StackPanel>
  34. </StackPanel>
  35.  
  36. </Window>
  37.  
  38. <TextBox x:Name="txtDatabase" TabIndex="2" Text="{Binding Path=DatabaseName, Mode=TwoWay}"></TextBox>
Add Comment
Please, Sign In to add comment