Hi Telerik,
I'm using a RadDiagram and I want to change the behavior of the SettingsPane visibility.
Indeed, when the Zoom in the RadDiagram changed, the SettingsPane button visibility is changed to be hidden.
I try to implement this code :
<view:MirBuilderDiagram x:Name="myMirBuilderDiagram" Grid.Row="2" primitives:BackgroundGrid.IsGridVisible="False" primitives:BackgroundPageGrid.IsGridVisible="False" ActiveTool="{Binding ActiveTool, Mode=TwoWay}" DataContext="{Binding Tag}" ItemsChanged="MirBuilderDiagram_ItemsChanged" ScrollViewer.HorizontalScrollBarVisibility="auto" ScrollViewer.VerticalScrollBarVisibility="auto" SelectedItem="{Binding SelectedShape, Mode=OneWayToSource}" FontSize="9" Telerik:DiagramSurface.IsVirtualizing="False" SnapX="4" SnapY="4" ConnectionBridge="Bow" ConnectionStyle="{StaticResource RadDiagramConnectionStyle_RotateText}" CommandExecuted="myMirBuilderDiagram_CommandExecuted"> <primitives:ItemInformationAdorner.AdditionalContent> <extensions:SettingsPane x:Name="mySettingPane" Diagram="{Binding ElementName=myMirBuilderDiagram}" Loaded="mySettingPane_Loaded" /> </primitives:ItemInformationAdorner.AdditionalContent></view:MirBuilderDiagram>
Private Sub mySettingPane_Loaded(sender As Object, e As RoutedEventArgs) Dim settingPane As SettingsPane = TryCast(sender, SettingsPane) If settingPane IsNot Nothing Then Dim informationAdorner As ItemInformationAdorner = settingPane.ParentOfType(Of ItemInformationAdorner)() If informationAdorner IsNot Nothing Then AddHandler informationAdorner.IsAdditionalContentVisibleChanged, AddressOf InformationAdorner_IsAdditionalContentVisibleChanged End If End IfEnd SubPrivate Sub InformationAdorner_IsAdditionalContentVisibleChanged(ByVal sender As Object, ByVal e As EventArgs) Dim informationAdorner As ItemInformationAdorner = TryCast(sender, ItemInformationAdorner) If informationAdorner IsNot Nothing Then If Me.myMirBuilderDiagram.SelectedItem IsNot Nothing Then If Not informationAdorner.IsAdditionalContentVisible Then informationAdorner.IsAdditionalContentVisible = True End If End If End IfEnd Sub
The problem is at the bold line, because the "Setter is not accessible". I try to create an inherit class but the Setter is never accessible.
Do you know how I can keep the SettingsPane button visibility to Visible when the zoom changing (but keep the default behavior when SelectedItem changed, etc..) ?
Thank you.
