- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We are developing a simple markdown solution for a client. The attempt is to host the markdown (mkdocs in this case) inside a DockablePane. We are hosting a ChromiumWebBrowser inside a WPF Page which points to the location of the mkdocs website. The solution is really very simple at this stage.
WPF
<Page x:Class="RevitAddin1.Pane"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:RevitAddin1"
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
Title="Test Panel">
<Grid Background="white">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<cefSharp:ChromiumWebBrowser Grid.Row="1"
Address="https://facelessuser.github.io/pymdown-extensions/"/>
</Grid>
</Grid>
</Page>
Revit
public Result Execute(UIApplication uIApplication)
{
var data = new DockablePaneProviderData();
var page = new Pane();
data.EditorInteraction = new EditorInteraction(EditorInteractionType.KeepAlive);
data.FrameworkElement = page as FrameworkElement;
var starte = new DockablePaneState
{
DockPosition = DockPosition.Right,
};
var dpid = new DockablePaneId(new Guid("39FA492A-6F72-465C-83C9-F7662B89F62C"));
uIApplication.RegisterDockablePane(dpid, "Architype Learn", page as IDockablePaneProvider);
return Result.Succeeded;
}
For the most part, this runs OK. The problem arises when trying to use the built-in 'Search' functionality of the mkdocs platform. The expectation is to be able to query relevant information within the pages of the documentation. A separate page would show all the hits which the user will be able to navigate to straight from the Search results. When done inside Revit this process will 'break' returning to the current page and hiding the Search bar.
Below is a short video demonstrating the problem. Firstly we show the desired functionality running correctly in WPF App and next to it the exact same setup hosted within a DockablePane inside Revit.
Any ideas as to why this is happening and how to solve the issue are very welcomed!
Solved! Go to Solution.