Questions tagged [setcurrentvalue]

Sets the value of a dependency property without without affecting the property’s value source.

DependencyObject.SetCurrentValue Method is used by a component that programmatically sets the value of one of its own properties without disabling an application's declared use of the property. The SetCurrentValue method changes the effective value of the property, but existing triggers, data bindings, and styles will continue to work.

A control should always use SetCurrentValue to set the value of its own dependency properties, with the exception of the CLR property setter, which should use SetValue.

6 questions
59
votes
3 answers

What's the difference between Dependency Property SetValue() & SetCurrentValue()

The reason why I am asking this is because I was recommended by @Greg D (from this question) to use SetCurrentValue() instead, but a look at the docs and didn't see whats the difference. Or whats does "without changing its value source"…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
8
votes
6 answers

Android - ViewPager Adapter, set primary item before adapter is instantiated

I know i can do viewPager.setCurrentItem(position) to set my view pager at the desired position. My question is if and how i can do this before the adapter is instantiated. Meaning that if I do pagerAdapter = new…
Anonymous
  • 4,470
  • 3
  • 36
  • 67
7
votes
2 answers

How do I clear the value set by SetCurrentValue in WPF?

For a DependencyProperty, I set a value using DependencyObject.SetCurrentValue(property, value). How does one unset the value so that the property evaluates to the normal local value again?
Kevin Hsu
  • 1,726
  • 11
  • 14
2
votes
2 answers

Silverlight DependencyProperty.SetCurrentValue Equivalent

I'm looking for a SL4 equivalent to .NET 4's SetCurrentValue API, which would appear to be exactly what I need for my scenario. In short, I'm writing an attached behavior that updates the value of a given property at appropriate times. However, I…
0
votes
1 answer

How ADF master detail works for three level structure

I am working with ADF master detail concept. Header form (master page) Detail form (Detail page of Header (master page)) SubDetail form (Detail page of Detail (master page)) So: Header page has h_id as primary key. Detail page has d_id(Detail)…
YLG
  • 855
  • 2
  • 14
  • 36
0
votes
1 answer

wpf twoway bound DependencyProperty setcurrentvalue not working

I'm working on a custom behavior for the visiblox chart. This custom behavior has a dependency property Value that identifies the position of a cursor that consists of vertical line draw in the chart. This cursor follows the mouse if I set the…
maykonvs
  • 31
  • 2