I have a requirement that my content pane should not be movable, currently user is able to drag the control & move over the form & dock it wherever he want.
So far I have tried following options, but none of them worked.
IsFloating=False
AllowDockingFloating=False
AllowDocking=False
<ig:ContentPanex:Name="WorkspacesPane"IsFloating="False"AllowDockingFloating="False"IsMaximized="False"AllowDocking="False"Header="Workspaces"Location="Left"Height="Auto"Width="Auto"MinWidth="250"IsActivePane="True"CloseButtonVisibility="Collapsed"WindowPositionMenuVisibility="Collapsed">
Hello,
I have removed the key, attribute, & I didn't get when you say to remove the style assignment.
To answer your question, no there are no further styles to content pane & the content pane is added dynamically.
Here is the dynamic adding code :
Xaml removed key code :
<Style TargetType="ig:ContentPane" x:Name="ContentPaneStyle">
Dynamic adding the control:
if (accessRight != Convert.ToInt32(AccessRights.None)) { ContentPane statusModulePane = new ContentPane(); if(statusModuleItem.Header.Equals("Alerts")) { statusModulePane.Style = Application.Current.Resources["ContentPaneStyle"] as Style; //statusModulePane.IsHitTestVisible = false; } statusModulePane.DataContext = statusModuleItem; statusModulePane.Header = statusModuleItem.Header; Type contentViewType = Type.GetType(statusModuleItem.ContentView + "," + statusModuleItem.AssemblyName); try { statusModulePane.Content = serviceLocator.GetInstance(contentViewType); regionManager.RegisterViewWithRegion(statusModuleItem.Region, () => statusModulePane); this.statusModulePanes.Add(statusModulePane); } catch (Exception ex) { publishBootstrapEvent("Error loading " + contentViewType.FullName + " module:" + ex.ToString()); } }
Hello cfosterj,
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.
I have been looking into your issue. Would you please try to remove the key for the ContentPane style in the App.xaml file. The style is the following: <Style TargetType="ig:ContentPane">
Then you have to remove the style assignment.
One other question – do you have other styles for the content pane? If you do have styles in the resources, where the ContentPane is created – those styles would be assigned to the ContentPane and not the once in the App.xaml file.
Please do not hesitate to let me know if you have any further questions on this matter.
Unfortunately it's a huge application which I am working on. I copied the styles into main project app.xaml then I don't get Application.Current.Resources["ContentPaneStyle"] as Style as null. But it doesn't work I can still move the contentpane. While it worked for one of the form where contentPane was static not added dynamically.
Basically to give you hint : I have one silverlight project called as workspace, another project AlertPanel.
ViewModel of Workspace project adds the assembly of AlertPanel dynamically using following code(here I associate the style dynamically to content pane)
foreach (StatusModuleItem statusModuleItem in statusModuleItems){if (accessRights.ContainsKey(statusModuleItem.ID)){long accessRight = accessRights[statusModuleItem.ID];
if (accessRight != Convert.ToInt32(AccessRights.None)){ContentPane statusModulePane = new ContentPane();if(statusModuleItem.Header.Equals("Alerts")){
statusModulePane.Style = Application.Current.Resources["ContentPaneStyle"] as Style;
//statusModulePane.IsHitTestVisible = false;}
I have been looking into your issue. Would you please modify the last attached sample application with the functionality you are using, in order for the to reproduce the issue and further research it.
Thank you in advance for the cooperation. Looking forward to hearing from you.