This is a migrated thread and some comments may be shown as answers.

My own Enum Editor

2 Answers 55 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ulrich Reinhardt
Top achievements
Rank 1
Ulrich Reinhardt asked on 01 Sep 2015, 11:50 AM

Hi,

i want to register my own EnumEditor, but somehow my ControlTemplate does not get applied to my Editor. That is my code:

Properties.RegisterPropertyEditor(typeof(Enum), typeof(MyEnumEditor));

<Style TargetType="local:MyEnumEditor">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <TextBlock HorizontalAlignment="Left" Foreground="Black" FontSize="16"
                               Text="{Binding PropertyName, Mode=TwoWay}" Margin="0,0,0,2" />
                    <ComboBox Grid.Row="1" ItemsSource="{Binding PropertyValue, Mode=TwoWay}" />
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

and finally my EditorClass:

using Telerik.UI.Xaml.Controls.Data;
 
namespace BizPerf.Dashboard
{
    public class MyEnumEditor:TypeEditor
    {
       public MyEnumEditor()
        {
            this.DefaultStyleKey = (object) typeof(MyEnumEditor);
        }
    }
}

Can you please tell me how I will get this fixed? Every other editor of mine works..

Thank you!

2 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 04 Sep 2015, 11:35 AM
Hi Ulrich,

Thank for contacting us! I can confirm that this is an issue of the control. We have logged it in our system and it will be resolved for the next official release due end of the month.

Please, excuse us for the inconvenience caused!

P.S. I have updated your telerik points!

Regards,
Tsvyatko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
spaze
Top achievements
Rank 1
answered on 20 Dec 2016, 01:52 PM
superb post admin, keep up the good work
Tags
DataForm
Asked by
Ulrich Reinhardt
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
spaze
Top achievements
Rank 1
Share this question
or