Hello,
I am deploying my ArcGIS silverlight api application into another project
and the UserControls (WindowPanel and CollapsiblePanel) don't work at all in another project file. and I changed the resource directory under my current project in generic.xaml .But they still don't work. Please help me out
Thank you!
To get them working you have to:
- copy the usercontrols xaml and c# codes to your project
- change the namespaces to your project namespace
- create a generic.xaml file under themes that includes your usercontrol xaml. Something like:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/yourapp;component/UserControls/WindowPanel.xaml" />
<ResourceDictionary Source="/yourapp;component/UserControls/CollapsiblePanel.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Thank you very much for you respond. I tried and it still didn't work for me.
But I got it work finally by your steps plus one more step. I add the x:name
plus one more step. I add the x:name
I am curious: x:name of what?
hello,
I reviewed my code. here is my solution to figure out the problem. I didn't use generic.xaml. but I put all the merge directory in the app.xaml. and I add the x:Key in the window panel style . here is my codes look like:
<Style x:Key="Windowpanel">
<Setter Property="Effect" Value="{StaticResource dropShadow}" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Background" Value="{StaticResource CommonBackgroundBrush}" />
</Style>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/dms_geo;component/Map/Arc/Styles/NavigationStyle.xaml" />
<ResourceDictionary Source="/dms_geo;component/Map/Arc/UserControls/WindowPanel.xaml" />
<ResourceDictionary Source="/dms_geo;component/Map/Arc/UserControls/CollapsiblePanel.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Application>