Detect end of ScrollView programatically in Silverlight? - wpf

I am new to WPF and I am having some issues with this.
I have a ScrollView and a RepeatButton. I want to disable the RepeatButton programatically when the ScrollView has moved all the way left or all the way right. Is there an easy way to do this in Silverlight?
I found this page: http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.scrollchanged.aspx and was thinking of adding an event listener for this, but I don't know if that is the best way to tackle the problem.
Thanks guys! Please let me know if you need code samples or anything.

Probably you want to look at the HorizontalOffset and the ScrollableWidth or Vertical/Height respectively.
if the Offset is equal to the Scrollable dimension, then you don't want to display it... Personally I'd leave it though because what you're suggesting isn't really standard behavior, which is not usually good because the the user does not expect it.

Related

WPFToolkit / AvalonDock / Event

What I like to have:
A Dashboard which the user can realigned/move/resize a board with Drag&Drop ability.
The easiest solution could be perhabs to use simple dock windows like AvalonDock. But because I don't like floating windows, I must be possible to automatic re-dock the floating window if the user don't dock it.
What I tried:
I found in LayoutContent.Dock the method, which I need to call when the user stops dragging the floating window. I think, after LayoutFloatingWindowControl.FilterMessage -> case Win32Helper.WM_EXITSIZEMOVE: would be the best place. But after this point I found no event to notify me. Do I didn't see the solution? Next problem: How can I get the object of type LayoutContent to call Dock? :/
Can I continue to pursue my idea?
Or did you know other free controls or ideas to realize this?
Thanks
AvalonDock LayoutDocument and LayoutAnchorable (the controls that hold the content) have a property CanFloatset it to false and it will not be able to float and you don't need to dock it.
see the docs: https://github.com/xceedsoftware/wpftoolkit/wiki/AvalonDock

DevExpress DockPanel Width

I can't change the size of this damn control not even god wanted me to! I've tried https://www.devexpress.com/Support/Center/Question/Details/Q458946, https://www.devexpress.com/Support/Center/Question/Details/B96266 and https://www.devexpress.com/Support/Center/Question/Details/B193170 without success...
My big probem here is that, if I SET "AutoSize", when a panel get hidden by "AutoHide", it WONT be visible again. If I disable "AutoSize" the panel shows up again, but its size will be off...
Any ideas? im really lost here... and I do belive that this is a bug...
I've managed it... the problem was the incapsulation regarding XtraTab regarding the docking of the inner UserControl that contains the other control of the dock, since DockManager needs a ContainerControl the function properly... note that IContainerControl from Control.GetContainerControl() is not enough...

Listbox or Listview or Gridview?

I am trying to achieve this.
I have a list of records (filenames) which I want to show in a list.
Anybody has any idea as to which control to use.
Regards,
Deepak
The information is right at your fingertips. You should learn to use Snoop. Aside from that, you should choose whatever control works best for you, which requires you to learn the difference between each. We can't really provide a good answer because there are many different ways this control could be implemented, and that's why WPF is so powerful.
Basically, you'll want to use a mixture of a Grid and ItemsControl. You can see the layout of the controls that are being used in this screenshot:

Silverlight - Highlight List<> of words/prhases within TextBox

I am new to Silverlight and have a requirement to highlight (or change font color) all words and phrases wtihin a TextBox that match a list of words/phrases. At first I though this would be easy, but the more I look into it, the more confused I get.
My goal is to write something reusable so I can also apply the logic to a RadGridView later. I've seen a few examples of stuff close to what I need, but it's beyond my Silverlight level at this point.
I want to write this myself to get a better understanding of how some of the Silverlight internals work. Can someone point me in the right direction of where to start on something like this? Should this be implemented in a control? Should I use a behavior? I'm using Silverlight 4.
Once I know where to start, I am sure I can get this done - with some help from you guys of course ;-)
Thanks,
-Scott
How about using the RadRichTextBox (I assume you have a licence for it as you mentionned the RadGridView)?
There's also a good sample project on Telerik forum that is doing exactly what you want to do.

Styling WPF slider background

I'm trying to apply a specific style to a slider control and I'm having trouble figuring out what I need to do for the slider's background. What do I need to do to get something like this triangle to show in the background of my slider?
I initially thought I would define a GeometryDrawing and set something in the tickbar tag to it - but I can't find anything suitable.
This is what I'm looking for. Thanks for any ideas.
Slider background http://img16.imageshack.us/img16/690/slider.png
Check out my Intuipic project, which does something similar (only horizontally):
you need to investigate a bit more into styling and templatiting in wpf. I would expect the easiest way would be to define a Control Template but you 'might' be able to achieve this with just styling
Check out this page on msdn for starters. There is probably loads of other resources out there. Big sections on it in the book i'm reading at the moment - pro wpf in c# 2008
Sorry i'm not coming up with an example... you'd be better off doing a bit of background reading and then coming back with any specific issues.

Resources