This is a migrated thread and some comments may be shown as answers.

Property DocumentMapVisible is not available

3 Answers 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manfred
Top achievements
Rank 2
Manfred asked on 05 May 2011, 08:21 AM
Hi there,

I create a report and want to set the DocumentMapVisible to false in my Silverlight application.
But there is no property availabe, not in XAML and also not in code behind.

Any hint?

Best Regards
Manfred

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 10 May 2011, 06:39 PM
Hello Manfred,

You can use the following code snippet as a reference in order to implement the desired functionality:

public partial class Window1 : Window
{
    public Window1()
    {
        InitializeComponent();
    }
 
    private void button1_Click(object sender, RoutedEventArgs e)
    {
        this.ReportViewer1.SetDocumentMapVisibility(false);
    }
}
 
public static class ReportViewerExtensions
{
    public static void SetDocumentMapVisibility(this ReportViewer report, bool isDocumentMapVisible)
    {
        var layoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(report, 0);
        var rvm = (ReportViewerModel)layoutRoot.DataContext;
        rvm.IsDocumentMapVisible = isDocumentMapVisible;
    }
}

Hope this helps.

Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Manfred
Top achievements
Rank 2
answered on 11 May 2011, 07:18 AM
Hi Peter,

sorry, not really because I have a button to set this to false, but I never want them to be shown.
So can you give me a hint, which Event I can use?
There is no event like RenderFinished where I could place the code.

Best Regards
Manfred
0
Peter
Telerik team
answered on 13 May 2011, 05:53 PM
Hi Manfred,

The Silverlight ReportViewer uses a control template build on the MVVM pattern. You can use Expression Blend to modify the template and remove the document map from it.

Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Manfred
Top achievements
Rank 2
Answers by
Peter
Telerik team
Manfred
Top achievements
Rank 2
Share this question
or