Skip to content

Commit

Permalink
Good idea: If it's readonly, it's not a tabstop
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Apr 5, 2011
1 parent 48a8dc0 commit d966375
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Demo/Silverlight/EditableTextBlockPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
x:Class="PixelLab.SL.Demo.EditableTextBlockPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:bot="clr-namespace:PixelLab.Common;assembly=PixelLab.Common_SL4"
xmlns:sl="clr-namespace:PixelLab.SL;assembly=PixelLab.SL"

xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">

<UserControl.Resources>
<bot:EnumConverter x:Name="enumConverter" />
</UserControl.Resources>

<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<sl:EditableTextBlock
Width="200" Margin="10"
IsReadOnly="{Binding Path=IsChecked, ElementName=_readOnlyCheckBox, Mode=TwoWay}" Text="News"
IsReadOnly="{Binding Path=IsChecked, ElementName=_readOnlyCheckBox, Mode=TwoWay}"
IsTabStop="{Binding Path=IsChecked, ElementName=_readOnlyCheckBox, Mode=TwoWay, Converter={StaticResource enumConverter}, ConverterParameter='true->false,true'}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>

<CheckBox Content="IsReadOnly" Name="_readOnlyCheckBox"/>
Expand Down

0 comments on commit d966375

Please sign in to comment.