L
L
LuVairo2021-11-06 12:12:20
WPF
LuVairo, 2021-11-06 12:12:20

How does indirection work in WPF Storyboard?

Hello! Please explain how item indirection works in Storyboard.TargetProperty .
For example, according to what logic these lines function (how do they differ, and why brackets are put in certain cases):

Storyboard.TargetProperty="Background.Color"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
Storyboard.TargetProperty="(Background.Color)"

Ps: I read an article from microsoft about freezable objects and storyboards, but didn't understand much.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
spaceatmoon, 2021-11-06
@LuVairo

Answers:
https://coderedirect.com/questions/533715/round-br...
https://stackoverflow.com/questions/3737458/why-do...
Storyboard.TargetProperty="Background.Color"
The program knows this object in advance and will be linked to other code on compilation stage.

Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"

This is a late static binding, where the properties of the object are indicated in brackets, which will be known to the program after the program has been launched, and at the compilation stage, notes are left that there will be objects of a certain type.
https://metanit.com/sharp/wpf/13.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question