Hi,I made this simplified application to demostrate my code.MainPage<UserControl x:Class="MapAndVideo.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="600"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:userControls="clr-namespace:ESRI.ArcGIS.SilverlightMapApp"
xmlns:actions="clr-namespace:ESRI.ArcGIS.SilverlightMapApp.Actions">
<Grid x:Name="LayoutRoot" Background="{StaticResource BaseColor}">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!--Menu bar-->
<Grid Grid.Row="0" x:Name="TopMenuGrid" Background="{StaticResource BaseColor}">
<Rectangle x:Name="BackgroundGradient" Opacity=".5" Fill="{StaticResource ReflectionGradient}" />
<Button x:Name="btnOpen" Content="Video" Width="60" ToolTipService.ToolTip="Click to show a help video"/>
</Grid>
<!-- Body of the Application -->
<Grid Grid.Row="1">
<!-- Map View -->
<esri:Map x:Name="Map" Background="{StaticResource BaseColor}" >
<esri:ArcGISTiledMapServiceLayer ID="BaseLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" />
</esri:Map>
<!-- Scale Bar -->
<userControls:ScaleBar x:Name="scaleBar" Opacity=".5" Map="{Binding ElementName=Map}"
MapUnit="DecimalDegrees" Width="200" Fill="White" Margin="5,0,10,0"
IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
</Grid>
</Grid>
</UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using ESRI.ArcGIS.Client;
namespace MapAndVideo
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
btnOpen.Click += BtnOpen_Click;
}
private void BtnOpen_Click(object sender, EventArgs e)
{
ChildWindow1 chdWindow = new ChildWindow1();
chdWindow.Show();
}
}
}
ChildWindow1<controls:ChildWindow
x:Class="MapAndVideo.ChildWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
Width="500" Height="423"
Title="Video - Click on the video to play" Background="{Binding Source={StaticResource BaseColor}}" BorderBrush="{Binding Source={StaticResource BaseColor}}" Foreground="{Binding Source={StaticResource BaseColor}}">
<Grid x:Name="LayoutRoot" Margin="2">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="23" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<MediaElement x:Name="video" Stretch="UniformToFill"/>
</Grid>
<StackPanel Grid.Row="1" Height="23">
<Button x:Name="btnOK" Content="Close" Click="OKButton_Click" Width="75" HorizontalAlignment="Right" ToolTipService.ToolTip="Click to Close the window"/>
</StackPanel>
</Grid>
</controls:ChildWindow>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace MapAndVideo
{
public partial class ChildWindow1 : ChildWindow
{
Boolean isPlaying = false;
public ChildWindow1()
{
InitializeComponent();
video.AutoPlay = false;
video.Source = new Uri("video/Silverlight.wmv", UriKind.RelativeOrAbsolute);
btnOK.Click += OKButton_Click;
video.MouseLeftButtonDown += Video_MouseLeftButtonDown;
}
private void OKButton_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = true;
}
private void Video_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
isPlaying = !isPlaying;
if (isPlaying) video.Play();
else video.Pause();
}
}
}
In it, i have a button that calls an childWindow to show a video.The problem is that the video is big (like 40Mb+) and if i put it as a Resource, when i complie the project it goes inside the xap, that grows to 40mbs.since the idea of the video is to make it a help tool, not all users are gonna use it, but the all have to download the 40mbs of the video because it is inside the xap. is there any way to export the video outside the xap (as an folder, or anything like that)?