Note that there are some explanatory texts on larger screens.

plurals
  1. POExecute command on mouse click on image control wpf
    primarykey
    data
    text
    <p>There is a command property in wpf that I am trying to execute on an image click. I am basically changing the style of a scroller. I downloaded sample styles from <a href="http://www.eggheadcafe.com/tutorials/aspnet/f51ddf8c-5227-4f1b-a5df-ec3d1b3439ca/styling-the-wpf-scrollviewer.aspx" rel="nofollow noreferrer">here</a> and after changing my style I end up with something like:</p> <p><img src="https://i.stack.imgur.com/74TCD.png" alt="enter image description here"></p> <p>ok so let me explain. on the top there is an arrow pointing upwards on top of an image. I plan to get rid of the top arrow but the reason why I need it is because in the xaml it has a command that when clicked it scrolls upward. the code for that up arrow is:</p> <pre><code>&lt;RepeatButton Style="{StaticResource ScrollBarButton}" Margin="0,15,0,0" VerticalAlignment="Top" Background="#FFFFFFFF" Grid.Row="0" Command="{x:Static ScrollBar.LineUpCommand}" &lt;!-- This is the line that enables to scroll upwards when clicked --&gt; theme:ScrollChrome.ScrollGlyph="UpArrow" RenderTransformOrigin="0.5, 0.5"&gt; &lt;RepeatButton.RenderTransform&gt; &lt;ScaleTransform ScaleX="4" ScaleY="2"/&gt; &lt;/RepeatButton.RenderTransform&gt; &lt;/RepeatButton&gt; </code></pre> <p>In short I am interested in the following property:</p> <pre><code>Command="{x:Static ScrollBar.LineUpCommand}" </code></pre> <p>It would be nice if I could get rid of the top arrow and place that command in the image instead. The problem is that the image control does not have the property command. I know I can make the alpha of the top arrow equal to 0 and make it appear like there is only an image but I am curios of understanding how does this work and moreover I would like to add more functionality such as changing the image appearance on mouse enter etc..</p>
    singulars
    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