Select to view content in your preferred language

how to fill a video in a featurelayer in WPF

748
1
07-27-2010 05:16 AM
SolidSmoke
Emerging Contributor
The below appended code are for silverlight to fill a video in a featurelayer. i have tried to convert this to WPF and had made some changes like instead of video brush, i ve used visualbrush as videobrush tag was not in wpf. but am not able to fill the featurelayer.
somebody please advise me how to do that in WPF.


<UserControl x:Class="ArcGISSilverlightSDK.VideoFills"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
    xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client">
    <Grid x:Name="LayoutRoot" Background="White">

        <Grid.Resources>

            <esriSymbols:SimpleFillSymbol x:Name="BearVideoFillSymbol" BorderBrush="Green" BorderThickness="1" >
                <esriSymbols:SimpleFillSymbol.Fill>
                    <VideoBrush SourceName="BearVideo" Opacity="0.5" Stretch="UniformToFill" />
                </esriSymbols:SimpleFillSymbol.Fill>
            </esriSymbols:SimpleFillSymbol>

           

        </Grid.Resources>

        <MediaElement x:Name="BearVideo" Source="http://serverapps.esri.com/media/bear.wmv" AutoPlay="True"
                IsHitTestVisible="False" IsMuted="True" MediaEnded="State_Media_MediaEnded" Width="0" Height="0" />

       
        <esri:Map x:Name="MyMap" Extent="-120, 20, -90, 60" >
            <esri:Map.Layers>
                <esri:ArcGISTiledMapServiceLayer ID="TopoLayer"
                      Url="http://services.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer"/>

               
                <esri:FeatureLayer ID="MyFeatureLayer"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/Map..."
                    Where="STATE_NAME = 'California'" FeatureSymbol="{StaticResource BearVideoFillSymbol}" >
                </esri:FeatureLayer>

            </esri:Map.Layers>
        </esri:Map>

    </Grid>
</UserControl>
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
I attached the WPF version of this sample.
0 Kudos