Is it possible to click drag a button image in WPF? - wpf

I have a Toolbar with buttons that have images just above their text. I want users to click the button and then drag. That should drag the image as long as the mouse button is held down. This should also work for touch screens (fingers).
I've been trying to use the code from this answer Mouse click and drag Event WPF. But it doesn't seem to do anything. I end up dragging the entire form.
Any suggestions on how I can start this or if it is even possible?

Related

How to create a sliding side border WPF?

So, if you have seen the Windows 11 Store UI. I want to replicate the border or the sliding bar on the side where every time you click a button the border or sliding bar would go to that button and center it self in the middle.
Create a custom template for the button that has an ItemControl of a single border on the left along with the button content, and when it is selected and animate it.

Create a button with a down arrow icon

I want to create a button with a down arrow icon that displays a menu when clicked. I have found the following button type:
But this button can be pressed in two places (on the left of the vertical line and on the right of the vertical line), also I don't want the button to have a vertical line, I want it to be something like this:
Can this be done in Windows API?
What you are looking for can be done using either:
a standard COMBOBOX control with the CBS_DROPDOWNLIST window style:
(source: s-msft.com)
A Menu button:
(source: s-msft.com)
However, this is not a standard Win32 control. MFC has a CMFCMenuButton class for it, but in Win32 you have to owner-draw a standard BUTTON control to achieve the same effect:
Menu button arrow with raw Win32
When the button is pushed, you can display your pop-up menu as needed, using TrackPopupMenu() or equivalent.

Telerik RadDock on left side of main form in Winform application

I have a WinForm application that I would like to add a RadDoc like a popup menu on the left inside form main.
The user should be able to hover to the left side of the screen or click some tab on the left side of the screen and then the menu bar will appear.
The RadDock control itself does not have a auto hide.
I can hide the ToolWindow inside the RadDock but this leaves a blue background where the ToolWindow would show.
Also, when the ToolWindows are "AutoHide" they are tabbed at the bottom but they need to be tabbed vertically on the left.
The last thing is that I can't seem to set the "popup" size of the ToolWindows.
I would suggest that you go through the RadDock documentation.
Auto Hide article: http://www.telerik.com/help/winforms/dock-architecture-and-features-auto-hiding-windows.html
Arranging windows: http://www.telerik.com/help/winforms/dock-architecture-and-features-arranging-dockwindows.html
Modifying windows size: http://www.telerik.com/help/winforms/dock-object-model-example-building-an-advanced-layout-at-runtime.html
To make the whole control collapsible, you can use the RadCollapsiblePanel control: link.

extjs 4 scroilling WITHOUT a scrollbar

I have this narrow panel which is basically a list of thumbnails, and i need to be able to scroll over them using buttons.
We have a panel (anchor layout), with containers in it, and each container contains the image.
there isn't space for a scrollbar, and anyway we don't want one.
I thought it would be as easy as in the listener for my button calling panel.getEL().scroll('b',20)
but this isn't working because the scrollHeight === ClientHeight so scroll does nothing.
Is there a technique I am missing or should this work?
So you're using a button to scroll through the images? What about having the button's listener remove/hide the containers/images at the front of the panel to allow the others to use the space?

Reset the scrollviewer to its initial position with Silverlight

I have a Silverlight application, containing a scrollviewer in a grid layout.
When I move the scroller down and close this grid with the close button, the scroller remains at the bottom whenever I reopen the grid.
Is there a way I can reset the scroller to the top position?
Hello supriya khamesra,
Please Try this.
Please Put your grid inside scroll viewer and then write your bellow code after grid selection change.
grdDetail.ScrollToVerticalOffset(0d);
OR
grdDetail.ScrollToTop();

Resources