--- a/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Wed Nov 25 12:06:26 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/VideoViewer/VideoViewer.xaml Mon Nov 30 10:20:35 2009 +0100
@@ -4,13 +4,13 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
-
+ xmlns:Converter="clr-namespace:Iri.Modernisation.Controls.Converter"
xmlns:Input="clr-namespace:SLExtensions.Input;assembly=SLExtensions"
xmlns:View="clr-namespace:Iri.Modernisation.Controls.View"
x:Class="Iri.Modernisation.Controls.View.VideoViewer" Width="240">
<UserControl.Resources>
-
- </UserControl.Resources>
+ <Converter:BoolToVisibility x:Key="BoolToVisibility"></Converter:BoolToVisibility>
+ </UserControl.Resources>
<StackPanel x:Name="VideoViewerPanel" Margin="0,2,8,0" Background="#FF323232">
<TextBlock x:Name="textBlock" Text="{Binding Info}" TextWrapping="Wrap"/>
@@ -19,13 +19,13 @@
</MediaElement>
<StackPanel x:Name="VideoViewerControlPanel" Orientation="Horizontal" Margin="8,0" VerticalAlignment="Bottom" HorizontalAlignment="Center">
- <Button Input:CommandService.Command="PreviousVideo" x:Name="VideoControlPreviousChapter" Content="<|"/>
- <Button Input:CommandService.Command="RecordVideo" x:Name="VideoControlRecord" Width="43" Content="O" />
- <Button Input:CommandService.Command="LoadVideo" x:Name="VideoControlLoad" Width="30" Content="_" />
- <Button Input:CommandService.Command="PlayVideo" Input:CommandService.CommandParameter="{Binding}" x:Name="VideoControlPlay" Content="|>"/>
- <Button Input:CommandService.Command="PauseVideo" x:Name="VideoControlPause" Content="||"/>
- <Button Input:CommandService.Command="NextVideo" x:Name="VideoControlNextChapter" Content=">>"/>
- <Button Input:CommandService.Command="CloseVideo" x:Name="VideoControlClose" Width="25" Content="X"/>
+ <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PreviousVideo" x:Name="VideoControlPreviousChapter" Content="<<"/>
+ <Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="RecordVideo" x:Name="VideoControlRecord" Width="43" Content="O" />
+ <Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="LoadVideo" x:Name="VideoControlLoad" Width="30" Content="_" />
+ <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PlayVideo" Input:CommandService.CommandParameter="{Binding}" x:Name="VideoControlPlay" Content="|>"/>
+ <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="PauseVideo" x:Name="VideoControlPause" Content="||"/>
+ <Button Visibility="{Binding PlayControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="NextVideo" x:Name="VideoControlNextChapter" Content=">>"/>
+ <Button Visibility="{Binding RecordControl, Converter={StaticResource BoolToVisibility}}" Input:CommandService.Command="CloseVideo" x:Name="VideoControlClose" Width="25" Content="X"/>
</StackPanel>
</StackPanel>
</UserControl>
\ No newline at end of file