wpf attributes vs attached properties

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
 
P

Patrice

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...
 
T

tshad

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top