Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Is there a property on an Editor that will let you know if the column it is in is editable?
posted

I need to bind to something in the style for an Editor that will do something different if the Editor is in a read-only column vs an editable column. If there isn't anything on editor, is there something on the CellValuePresenter that contains the editor?

I tried IsReadOnly, but it seems to always be false.

 

    <Style TargetType="{x:Type editors:XamTextEditor}"
                 x:Key="SomeKey">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <TextBlock/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsReadOnly" Value="False"><!-- what tells me if the editor is in a read-only column or not?-->
                            <Setter Property="SomeProperty" Value="False"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>