Why:
<Trigger Property="ItemsControl.AlternationIndex" Value="2">
<Setter Property="Background" Value="#FAC896"></Setter>
</Trigger>
and not:
<Trigger Property="ItemsControl.AlternationIndex" Value="2">
<Setter Property="Background" Value="50 50 50 255"></Setter>
</Trigger>
?
Is this for performance reasons of the Xaml parser/compiler?
Reason I ask is, it's really difficult for artists to design an interface when they are used to RGB and/or HSV colors.
Btw I use VS 2010 WPF Editor.
If you're an artist, you should really be using Expression Blend. It will give you a very nice color picker, and it will handle the correct color codes for you. Also, the HEX number you provide is in the form of RGB. Two bytes of RED, two bytes of GREEN, and two bytes of BLUE.
To answer your question, someone from the WPF Design team would have to say, but I suspect it was used to keep some consistency with HTML.
As far as I know there is no difference between a HEX number, and a decimal number, they are all constants and have equal performance, since they are all represented as binary numbers in the computer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With