Reputation: 3956
I cam across the following code in a XAML document, and I do not understand the syntax, nor do I understand how it is supposed to work.
The XAML contains the following Binding (or I guess it's some sort of Binding):
<Button Content="Export all" Command="{atf:CommandService {x:Static MyProgramme:ExportCommands+Commands.ExportAll}}">
In this project, there is a class indeed called CommandService
(which is quite large so I can't share the full code, but see the ATF framework), and another class:
public class ExportCommands
{
private enum Commands
{
ExportAll
}
}
I do no understand the syntax of the XAML expression. How does it relate the CommandService
class to the actual command? Are there similar examples that use this syntax?
Upvotes: 1
Views: 50
Reputation: 10865
The ATF CommandService is a custom MarkupExtension
provided by the framework. An example of a mark up extension can be found here
Upvotes: 1