Support for Triggers, DataTriggers?

Posts: 1
Joined: Thu Apr 14, 2016 9:55 am

Support for Triggers, DataTriggers?

Postby klf » Thu Apr 14, 2016 10:03 am

Data triggers or triggers in general don't seem to be supported currently. In the roadmap I can't find them announced.
Is it planned?

When using a MVVM approach, data triggers are pretty essential to me. This is what makes code clean and standardized.
Simple example: show items in a combo box for selection. But if only 1 item exists then show a text block only (nothing to select).

Code: Select all

<UserControl x:Class="CrossPlattformTest.Wpf.ElementPicker"
             d:DesignHeight="300" d:DesignWidth="300">
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        <ComboBox Grid.Row="0" ItemsSource="{Binding Hierarchies}">
                <Style TargetType="ComboBox">
                        <DataTrigger Binding="{Binding Hierarchies.Count}" Value="1">
                            <Setter Property="Visibility" Value="Collapsed" />
                    <TextBlock Text="{Binding Title}" />
                <Style TargetType="Border">
                    <Setter Property="Visibility" Value="Collapsed" />
                        <DataTrigger Binding="{Binding Hierarchies.Count}" Value="1">
                            <Setter Property="Visibility" Value="Visible" />
            <TextBlock Text="{Binding FirstHierarchy.Title}" />

JS-Support @Userware
Site Admin
Posts: 1093
Joined: Tue Apr 08, 2014 3:42 pm

Re: Support for Triggers, DataTriggers?

Postby JS-Support @Userware » Mon Apr 25, 2016 2:12 pm


Thanks for your message.

We have added Triggers and DataTriggers to the roadmap. You can read the updated roadmap here.

The ComboBox is not yet templatable (it uses the native HTML5 combo box, which is also particularly suited for mobile devices, on which it renders differently), but we are working on it.

We have also added a page about how to customize the appearance of controls using Styles and ControlTemplates. On that page you can see the progress that we are making to support this kind of things.

Thanks again.


Return to “General Discussion and Other”

Who is online

Users browsing this forum: No registered users and 1 guest