wpf attributes vs attached properties

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

This seems to be a normal problem with Microsoft.

Not very consistant.

I am not sure what the difference is between attributes vs attached
properties, but in the case of orientation and panels - why not use the same
style???

For example, for a stackpanel you use "Orientation" (Horizontal or
Vertical). But with a Dock Panel you use "DockPanel.Dock" (Bottom,
left...).

Why not use "Dock" as an attribute???

Not a problem just that they could be more consistant in there styles. It
just seems to be an issue with them. In Powerpoint, they use F5 to start a
slideshow for Windows and for the Mac they use "CloverLeaf + Enter"??? Not
intuitive at all.

Thanks,

Tom
 
Hi,

Try :
http://msdn.microsoft.com/en-us/library/ms749011.aspx

In short, if you have done DB applications this is a bit like attributes
that are attached to a relation i.e. let's take an element that is placed
inside a grid.

The row is not a property of the container. As you can place pretty much
anything inside a cell, it would be daunting to create a property that would
not always be used to support the use of the child element in whatever
container you could imagine (and what if using new containers).

So this property is actually stored in the "relation" of the inner element
with its container. This needs arise because of XAML flexilbity as you can
put whatever element inside a container allowing for example to create
dropdowns with videos or images as easily as if it was just text...
 
Good article and makes sense.

Thanks,

Tom
Patrice said:
Hi,

Try :
http://msdn.microsoft.com/en-us/library/ms749011.aspx

In short, if you have done DB applications this is a bit like attributes
that are attached to a relation i.e. let's take an element that is placed
inside a grid.

The row is not a property of the container. As you can place pretty much
anything inside a cell, it would be daunting to create a property that
would not always be used to support the use of the child element in
whatever container you could imagine (and what if using new containers).

So this property is actually stored in the "relation" of the inner element
with its container. This needs arise because of XAML flexilbity as you can
put whatever element inside a container allowing for example to create
dropdowns with videos or images as easily as if it was just text...
 
Back
Top