Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting the cursor in a WPF documentViewer
    primarykey
    data
    text
    <p>I am creating a WPF document viewer that will zoom in to a page when it is double clicked on. To this end I am trying to get the cursor to turn into a hand when over a page in the document viewer, and an arrow when elsewhere.</p> <p>I have my xaml set up like so </p> <pre><code>&lt;UserControl x:Class="WPFXPSViewerControl.XPSControl" 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:UI="clr-namespace:Bluewire.Epro.UI;assembly=EproClientCore" xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" Loaded="Window_Loaded" Height="1200" MouseDoubleClick="Double_Click"&gt; &lt;Grid Grid.Row="2" Grid.Column="2" Cursor="Hand"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="*"/&gt; &lt;RowDefinition Height="20" Cursor="Arrow"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;DocumentViewer Name="document" Grid.ColumnSpan="2" Cursor="Arrow"&gt; &lt;/DocumentViewer&gt; &lt;Button Width="200" Name="btnZoomIn" Grid.Row="1" Grid.Column="0" Cursor="Hand" Click="btnZoomIn_Click"&gt;Zoom In&lt;/Button&gt; &lt;Button Width="200" Name="btnZoomOut" Grid.Row="1" Grid.Column="1" Cursor="Hand" Click="btnZoomOut_Click"&gt;Zoom Out&lt;/Button&gt; &lt;/Grid&gt; &lt;/UserControl&gt; </code></pre> <p>However, I cannot seem to change the cursor when it is over a page from its default setting of a text cursor.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload