touyets
touyets

Reputation: 1325

ElementFlow element disables controls

I am using the Fluidkit ElementFlow control that I use to display a UserControl that contains textblock with a ScrollViewer as well as button and when they are displayed in the ElementFlow control, all of the buttons and the ScrollViewer seem to be disabled because I can't scroll the ScrollViewer scrollbar and even a simple action as hovering over a button doesn't do anything to the button.

Below is an example of the TextBlock in a ScrollViewer that does not allow for scrolling when used in the ElementFlow.

How can this be fixed?

<ScrollViewer
      Height="1200" Width="800"
      MaxHeight="1200" MaxWidth="800"
      VerticalScrollBarVisibility="Auto">
      <TextBlock
           Height="Auto" Width="800"
           MaxWidth="800"
           FontSize="20"
           Text="Super long text"
           TextWrapping="Wrap"/>
 </ScrollViewer>

Upvotes: 4

Views: 172

Answers (1)

Abe Heidebrecht
Abe Heidebrecht

Reputation: 30498

Just looking over the source code for the project, it looks like it is creating a 3D mesh, and painting the controls on the mesh. This would prevent all user interaction. I don't think there is an easy way to work around this.

However, since you have the source code, you can do the work yourself to make it happen. You're going to need to modify how the ElementFlow represents its items. Look at the CreateMeshModel function. It is currently creating a mesh and applying a VisualBrush to it. Instead, look at the blog post Interacting with 2D on 3D in WPF to figure out what needs to happen.

Upvotes: 1

Related Questions