attached-properties Questions

2

Solved

When looking at sample attached properties and behaviors, I've seen a mishmash of uses of FrameworkPropertyMetadata, UIPropertyMetadata and PropertyMetadata. Since they all form an inheritance hier...
Erstwhile asked 21/3, 2010 at 12:11

2

I have a problem with read-only attached property. I defined it in this way : public class AttachedPropertyHelper : DependencyObject { public static readonly DependencyPropertyKey SomethingPrope...
Rheims asked 18/5, 2012 at 8:7

6

Solved

Is it possible to set the value behind a two-way binding directly, without knowing the bound property? I have an attached property that is bound to a property like this: <Element my:Utils.MyPr...
Bonis asked 20/6, 2012 at 13:46

3

Solved

I try to use binding with an attached property. But can't get it working. public class Attached { public static DependencyProperty TestProperty = DependencyProperty.RegisterAttached("TestPropert...
Izettaizhevsk asked 29/4, 2011 at 12:45

5

Solved

What's the difference between a (custom) dependency property and an attached property in WPF? What are the uses for each? How do the implementations typically differ?
Inlaw asked 6/8, 2009 at 18:52

1

Solved

What I tried to do is create a Style to apply a WordWrap on all DataGridTextColumns in a Datagrid without explicitly setting it like this. <DataGrid ItemsSource="{Binding Lines}"> <DataG...
Boote asked 11/10, 2017 at 13:53

3

Solved

I'm trying to use caliburn micro message to trigger an attached event that I created: public static class DataChanging { public delegate void DataChangingEventHandler(object sender, DataChanging...
Amiens asked 6/12, 2011 at 15:26

2

I have a problem with binding a context menu to textbox's attached property. So I have TextBox and it has a context menu on right click. So how to bind context menu's property to TextBox's attached...
Machado asked 17/9, 2016 at 9:44

2

Solved

Is there a way to get the parent (ListView) for a GridViewColumn? I have tried with LogicalTreeHelper and VisualTreeHelper but no dice. I can share a what-have-you-tried that is a bit funny, it w...
Abixah asked 8/1, 2014 at 0:48

2

Short question Is there a quick way of knowing what a particular attached property is bound to, at runtime? Detail I'm debugging a UserControl (that inherits ItemsControl) which binds Canvas.Le...
Procathedral asked 6/8, 2015 at 13:32

3

Solved

I'm working on a WPF MVVM application. The thing that I'm noticing is that I have to write an inordinate amount of boilerplate code just to declare commands (through DelegateCommands from the WPF T...
Chalutz asked 11/8, 2009 at 16:8

5

Solved

Okay Stackers, I've spent a good couple of hours on this question, and I want to know if anybody has a definitive answer. For all the research I've done, I can't find ANY difference between .Regist...
Cotyledon asked 27/7, 2011 at 11:56

2

Solved

Assuming I have an attached property defined like that : public static string GetMyProperty(DependencyObject obj) { return (string)obj.GetValue(MyPropertyProperty); } public static void SetM...
Arabella asked 3/8, 2009 at 20:27

1

Solved

I generate objects of framework Rectangle class (which is sealed) and programmatically add them to Canvas. I want to add some information to that objects. Is there such a possibility? I can get and...
Gummy asked 16/2, 2016 at 17:8

3

Solved

My goal is to manipulate the text-styles of my application via DependencyProperties. I got a diagram in which the texts are to be manipulated in size, fontfamily, color, etc. So I'd like to use an ...

1

Solved

I have tried to change the RelativePanel attached properties of a control by XAML in the VisualState.Setters in a Visual State but the properties do not change, so I created a dependency property t...

1

Solved

I am trying to use an Image in Button Control which animates on Hover and Pressed state by showing different images. Accordingly, I have defined 3 attached properties for the Button Control as give...
Oisin asked 27/3, 2015 at 16:9

1

Solved

I'd like to know how to programmatically set the WPF Dependecy Property Viewport2DVisual3D.IsVisualHostMaterialProperty . In the xaml I would use: <Viewport2DVisual3D> <Viewport2DVisual...
Reduplication asked 4/7, 2014 at 9:52

2

Solved

I'm a little bit unclear with all this magic. As I understood dependency properties get inherited from the DependencyObject, so values are stored: in the instance itself if value is assigned (in...
Salomon asked 12/8, 2013 at 14:54

1

Solved

I'm trying to bind from Button's ContentTemplate to attached property. I read all the answers for question similar to "binding to attached property" but I had no luck resolving the problem. Please...
Livonia asked 4/11, 2013 at 13:56

1

Solved

I need to create a new property to existing WPF controls (Groupbox, textbox, checkbox, etc), one that will storage its acess Level, therefore I've found out Attached Properties. I used as example t...

3

I'm messing around with some Storyboards in a Metro XAML app. I have to create a Storyboard in code. I'd like to set the Storyboard.TargetProperty to CompositeTransform.Rotation It seems impossibl...

5

Solved

For a few months I have been successfully using David Justices Default Button example in my SL 3 app. This approach is based on an attached property. After upgrading to SL4, the approach no longer...
Flite asked 21/4, 2010 at 14:37

3

I want to add a Property such as 'Description' to Button control, that i use it in Tooltip. how can i add a property to a control?
Meingolda asked 8/7, 2012 at 10:13

2

Solved

I have a standard style for my buttons but I want certain parts of the style to be configurable. e.g. I have a border appear when MouseOver is triggered for the button and I want the border colour ...
Leena asked 10/2, 2012 at 17:59

© 2022 - 2024 — McMap. All rights reserved.