I have a custom line shape with start and end point. The ActualWidth and ActualHeight properties however do not return the correct value, that is the difference between the points. Is there a way to override these properties in the derived class, and how would you go about doing it. I need to use the ActualWidth and ActualHeight properties since I am using an algorithm which uses those properties for other shapes.
Overriding ActualWidth and ActualHeight dependency properties
574 Views Asked by mihajlv At
1
There are 1 best solutions below
Related Questions in WPF
- WPF MessageBox Cancel checkbox check
- WPF multiple control property simultaneous changes
- ObservableCollection.CollectionChanged does not select the correct DataTemplate on ToolBar
- Telerik's WPF RadColorPicker NoColorText property not working
- How to automate UI interaction during acceptance test run
- Binding to "this.property" object in VisualStateMenager
- ContextMenu Closes Immediately
- Update ObservableCollection where the items are received from another List
- change content button with trigger
- WPF - How to highlight a combobox border when focused
- Wpf No Highlight on ListBoxItem for Touch Devices
- WPF WebBrowser how best to get Tag trees
- Make a class suitable for Property Change Notification
- WPF Comparing two datatables to find matching values
- how to create folder and file with datetime in wpf application
Related Questions in OVERRIDING
- Implementing Iterator for abstractCollection
- Overriding product list in magento
- overriding custom adapter for list view
- django rest framework - adding to views.obtain_auth_token
- WordPress - Failing to override woocommerce templates
- How to call ".done" after the ajax call in Backbone fetch calls
- Django models: managing transactions when commit_manually is deprecated
- Coherence config default override path
- Spring MVC 2.5 Command object value is changed on form submit
- Swift Compiler Error when overriding function of subclass inheriting from NSObject that is declared within a function
- Changing signature while Overriding in C++
- Polymorphism - why not overloading instead
- I need to check if a method is overridden
- What happens when a method is overridden in Java?
- subclass elements from an arraylist won't use the overriden method in Java
Related Questions in DEPENDENCY-PROPERTIES
- WPF Window hide Content DependencyProperty
- How to bind custom dependecy property to control's view model?
- Trigger vs. Dependency Property precendence
- Can i create SelectedItems Property for multiselect combobox
- XAML Dependency Property vs Regular Properties
- DependencyProperty of type ObservableCollection doesn't bind
- SetValue makes dependencyProperty null
- WPF Dependency Property as Enum Collection
- DependencyPropertyChangedCallback called only once
- WPF, Datagrid Custom DataGridTextColumn DependencyProperty not working
- Binding Dependency Property to View Model
- Binding WPF UserControl to View Model and Code Behind
- WPF dependency properties don't fire onChange on initialization
- how to show red border for invalid Dependency property on WPF TextBox?
- How to build a Maven project with Eclipse with a pom.xml that imports an external properties file?
Related Questions in ACTUALWIDTH
- DataTemplateSelector get parent ActualWidth
- Silverlight Get actual width of Grid that is set as Auto
- Determining the size of a UIElement in Silverlight
- ActualWidth as value of From WPF animation
- How to know the details of calculated ActualWidth/ActualHeight
- wpf - measuring the actual width and actual height
- WPF custom Control with custom drawing and ActualWidth
- wpf - Binding issue ActualWidth
- Setting Margin, Width bound to ActualWidth on Controls causes VS2012 Crash
- Binding to ActualWidth does not work
- Why are ActualWidth and ActualHeight 0.0 in this case?
- WPF MediaElement ActualWidth and ActualHeight is always zero
- binding declared in xaml does not work
- Why is the viewbox's actualwidth growing much faster than it actually is?
- Binding to ListBoxItem's ActualWidth
Related Questions in ACTUALHEIGHT
- Bind to ActualHeight of Item ItemsControl
- How to know the details of calculated ActualWidth/ActualHeight
- Get height of content items
- wpf - measuring the actual width and actual height
- Why are ActualWidth and ActualHeight 0.0 in this case?
- WPF MediaElement ActualWidth and ActualHeight is always zero
- binding declared in xaml does not work
- Get actual height at load time
- Scrollviewer ActualHeight exceeds the screen resolution
- Why is ActualHeight set to NaN?
- getting the size of the combobox's popup at runtime
- ScrollViewer's Viewport Height VS Actual Height
- Use of ItemsControl ActualHeight to paginate a printed XAML form?
- Line element Y value not Binding to Parent StackPanel ActualHeight property
- WPF dependecy property changed ActualWidth == 0
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can't override
ActualWidthandActualHeight, they are computed:So, what you should do instead is to change how your shape behaves during rendering. Either by the way you override
DefiningGeometry(assuming your shape is actuallyShape) or by overridingMeasureOverride().