Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created January 29, 2024 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/d902104a34014879a1f138db932c739f to your computer and use it in GitHub Desktop.
Save bjoerntx/d902104a34014879a1f138db932c739f to your computer and use it in GitHub Desktop.
@page "/"
@rendermode InteractiveServer
@inject NavigationManager Navigator;
<div style="width: 800px; height: 600px;">
<TXDocumentViewer
BasePath=@Navigator.BaseUri
@ref="_txdocumentviewer">
</TXDocumentViewer>
</div>
<button @onclick="LoadDocment">Load Document</button>
@code {
private TXDocumentViewer? _txdocumentviewer;
// insert a table using the client-side API
private void LoadDocment()
{
_txdocumentviewer?.LoadDocumentFromFile("App_Data/demo.tx");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment